EMF_TRANSPARENT_ALPHA rendering problem

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Klunk
Posts: 264
Joined: Mon Jan 10, 2011 5:21 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by Klunk »

Yeah, that or you have to write your own custom nodes which do their own sorting I guess.
it's not a problem that can always be solved with code (and a common one in games). for example doing an alpha sort on a crossing tree, as a single mesh or two seperate scene nodes, which face/node is in front ?

Image

in the left model there is no way to tell which face is in front, the right hand model may be a solution but doubles faces or nodes you need to sort.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by mongoose7 »

X-trees should use TRANSPARENT_ALPHA_CHANNEL_REF, which is treated as solid, not transparent, so there is no problem as the depth buffer will be used.
Klunk
Posts: 264
Joined: Mon Jan 10, 2011 5:21 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by Klunk »

I know, it's just an example to show where alpha sorting can never work.
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by Harch »

Still can not understand. Minecraft, for example, does not apply to the operation of ordering polygons for blending operations for water. How, then they normally everything is drawn?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by mongoose7 »

Probably Minecraft only renders the top of the water. You must know, surely, that if Minecraft rendered *every* cube, it would not run at a reasonable frame rate. The real cleverness with a Minecraft implementation is in the optimisations that are perfomed. Choosing cubes as a basis makes this manageable but not trivial.
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: EMF_TRANSPARENT_ALPHA rendering problem

Post by Harch »

Minecraft removes invisible face, but the water in it is rendered normally, you can see through the water the water, and so on. Also, normally rendered water in build a world and in minetest. I was there asked, me no one has normally not answer :(
Post Reply