Order of children not necessary respected?

classic Classic list List threaded Threaded
48 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

gouessej
Administrator
This post was updated on .
This sort might be very useful when mixing opaque objects with transparent objects for example. This project is open source, you can look at the source code of the classes extending AbstractRenderBucket.

No this is not a bug, this is the expected behaviour. If I had been able to reproduce it, I would have tried to fix it. I'm not a magician.

There's a user guide and some online API documentation, you already know that but I admit that it's a bit slim. I'm alone, it's an open source project, I'm only a volunteer, I do what I can on my spare time.

If it was really a non deterministic behaviour, I would be really worried.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

ThomasR
I think I should be worried, because of the behavior I've described. When the depth test is turned off, textures don't seem to be drawn the way they should, but the Quads are just fine. I will experiment some more on different hardware. Perhaps
I can have a Node with the layers as children and disable the depth test just for this node, and bypass the sort just for this Node. Is this possible?
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

ThomasR
Just to clear, with ZBufferState enabled (depth test on) OpenGL will render nearest tris to the eye on top of those which are farther, regardless of what is done in all of the RenderQueue and RenderBucket logic?
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

gouessej
Administrator
No z-buffering operates at the pixel level:
https://en.wikipedia.org/wiki/Z-buffering

Maybe you make a confusion with z-culling.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

ThomasR
So the RenderQueue logic may be doing z-culling?
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

gouessej
Administrator
The sort can be used to apply the Painter's algorithm : "painting distant parts of a scene before parts which are nearer thereby covering some areas of distant parts" https://en.wikipedia.org/wiki/Painter%27s_algorithm
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

ThomasR
Hi,

Does Jogamp Ardor3D do anything differently depending on the ZBufferState (enabled or disable), or is this just passed on to OpenGL?

Can the RenderQueue logic remove or modify Spatials prior to OpenGL rendering them on the screen?

I think the effect I want could be achieved if opaque objects could be rendered first (with the ZBuffer depth test enabled) and semi-transparent objects rendered next with ZBuffer disabled. Is this possible? Could the opaque and transparent objects be separated into separate peer branches, one with ZBufferState enabled, the other disabled? Or would I need to create a custom RenderBucket.



Reply | Threaded
Open this post in threaded view
|

Re: Order of children not necessary respected?

gouessej
Administrator
Hey

I'm almost sure that it's only passed to OpenGL.

JogAmp's Ardor3D Continuation doesn't put nodes without render delegate into render queues by default, you can do it if necessary. You can call Renderer.clearBuffers(Renderer.BUFFER_DEPTH) in the method draw(Renderer) of a node just before calling super.draw(), this is what I do in T.U.E.R to prevent the weapons from being clipped into 3D objects.
Julien Gouesse | Personal blog | Website
123