render order question

You can set the render order of nodes, but what if the nodes have different parents like render, aspect2d and render2d?

render and render2d are different DisplayRegions. You can change the relative ordering of these two DisplayRegions, if you like, but you can’t intermix drawing between them. One of them is drawn first, and the other one is drawn second.

aspect2d is just a child of render2d, so you can use standard binning techniques to order things parented to aspect2d with respect to things parented to render2d.

David

What if I want to use a gradient image instead of a background colour? Should I make it a child of camera then?

Sure, that’s a fine approach. It’s either that or create a new DisplayRegion just to render that image. Parenting it to the camera is probably simpler.

David

Hm, I reparented my quad to base.camera. No matter what value I set in setBin(‘fixed’,x) , it intersects with other geometry…

Turn off depth test and write, and set it to render first:

model.setDepthTest(False)
model.setDepthWrite(False)
model.setBin('background', -1000)

David