Horde3D
http://horde3d.org/forums/

Is it possible to achieve this selective translucency effect
http://horde3d.org/forums/viewtopic.php?f=1&t=2301
Page 1 of 1

Author:  FatDog [ 08.02.2017, 16:01 ]
Post subject:  Is it possible to achieve this selective translucency effect

Hi,

I have a hobbyist project that up until now has been using my own code for graphics using opengl. I'm looking into graphics engines to use instead, I have mostly standard requirements for this but there are one or two finicky things I need to do that make me worry about giving up control.

Here's an example, I'm rendering an RPG scene from a top down or isometric perspective with a fixed camera orientation. I want to ensure character models are always visible, preferably by rendering them as translucent overlays selectively where they are occluded by foreground level geometry. You can see an example of this idea in this image, taken from the game Pillars of Eternity.

Attachment:
PoETransparency.jpg
PoETransparency.jpg [ 44.5 KiB | Viewed 10493 times ]


As you can see the character models are rendered with a different shader that produces a kind of outlining effect and I believe doesn't consider lighting or effects, but only appears where they would be covered by foreground wall, but not when covered by anything else such as another character model.

In my code I can accomplish something similar by rendering the subset of occluding geometry into a depth buffer only, and then using the reverse of the standard depth test to render the characters only in those regions where geometry is in front of the character model. I also do some shenanigans with the stencil buffer to get the character selection circles overlays to show a similar effect but appear correctly behind the character model overlays.

Do you think something like this is straight forward or possible using the horde3d pipeline?

Author:  Irdis [ 14.02.2017, 18:40 ]
Post subject:  Re: Is it possible to achieve this selective translucency ef

Hello.
Check this thread: https://www.gamedev.net/topic/324328-tr ... tric-view/
It is not related directly to Horde3D, but may give you some hints.

You may also try to render characters to another fbo and then draw a quad with a composite shader that will check, whether transparency is needed for the current pixel.
As for the overlays - current horde's overlay system is not very flexible, so I don't know exactly how to render selection overlays for your characters. You'll probably have to get transform matrices of each character, check the screen space position of each character and reposition overlay vertices accordingly.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/