Can an object disregard z-buffer?


Can an object always be in front of everything else, and not be blocked?

Yes, use a disabled ZBufferState, or one with the function set to Always pass.


One of my text3d object is a child of its parent node.
In this case, the text is blocked by another object even if I set the buffer disabled.


There is a setFunction method, which I will try next.

Still, I cannot get that Text3D nested inside a node to not be blocked.

I used

        ZBufferState        buf          = renderer.createZBufferState();
        buf.setEnabled(true);
        buf.setFunction(ZBufferState.CF_ALWAYS);



Ah,

In fact, Text3D does not have to be a child of a node.

Text3D itself is blocked.


I had to place my texts near Camera than any other objects.

If anyone knows how to disregard z-buffer for Text3D, please let me know.

Umm, did you set Node.setRenderState( buf ) ???

Also, you may need to have your text as a seperate Node, with its own zBuffer state



But maybe Node.setZOrder() would help you out.


OK. I will try those.

Well I have tried the first two ones before.

And my initial try on setting the ZOrder is not doing what I want. But if I get it working, I will post it here.