[SOLVED] render order?

I have made a skybox which moves with the camera. Now I want to render the skybox after all the other nodes in the scene. How?
PS. Can I get an answer to my previous question as well please?

https://discourse.panda3d.org/viewtopic.php?t=3192 <-4th post should be what you’r looking for.
btw . what previous question do you mean?link?

This works for me:

self.skybox = loader.loadModel('models/skybox.egg')
self.skybox.setBin('background', 1)

Thanks both of you.
But what does this

skyBox.setBin('background', 1)



this do?
Oh and my previous question is here: discourse.panda3d.org/viewtopic.php?t=7602

setBin places it in the “background” bin, meaning it will get rendered first.

setDepthWrite(0) disables writing to the z-buffer for the skybox, which is a performance optimization I guess, as you don’t need it (no ordering).
I guess you could also call setDepthTest(0) to squeeze another nanosecond out of the performance.

Note that the 0 there actually is supposed to be False, but it evaluates to the same thing anyways.

PS. Advertising your question won’t make us more likely to answer it. If you don’t get many replies, that usually implies that people don’t know the answer.

or put into other terms “it does exactly what you want it to do”.

about your previous question. the model you provided for download saves as an 0Byte file. so noone will be able to tell what’s wrong with it cause it looks like it contains no model.

it worked few days ago

I have a similar render order question.
I am loading a rectangular image ( actually a flat 3d plane:

image = loader.loadModel( "assets/dialog" )
image.reparentTo( aspect2d )

And then i load text on the image to make a dialog like when you speak with a character in a game.
How can i make the text render in front of the image?
Or maybe there is an easier way to make a dialog?

You can use DirectFrame or DirectDialog to make a dialog. Whether you find it easier or not is for you to decide.

If you’re doing it by hand, simply parent your text to the the image–that will generally make it show up in front.


Where can i find docs for that?
I found an example for a yes and no window…

Have you looked in the manual?