Nodes not under 'render' or 'render2D'

Hey Guys,

I’ve got nodes I see rendering on screen yet they are neither in the render tree or in the render2D tree. I can tell by running ls() or analyze() on render. What happens to those nodes that are not connected?

Thanks!

The precise rule is: the only nodes that will be rendered are those that are under the same scene graph which also contains your camera. Normally, this is only render and render2d, unless you have reparented your base.camera and base.cam2d somewhere else.

It’s also possible to create a new DisplayRegion, and hence a new camera. Then you can put this new camera under a different node and render the stuff under that node. But you really have to go out of your way to do this; you wouldn’t do it accidentally.

So, assuming you haven’t done anything nutty with your cameras or your DisplayRegions, if you have nodes rendering, they must be under render or render2d. Nodes that are not attached to a live scene graph are not rendered, I emphatically assure you.

David

I see, thanks for the reply!

When I place a break point in

void GraphicsEngine::render_frame()

I can see it iterating over many display regions. Perhaps that is what is going on. A good direction to dig at the very least.

You can iterate through the display regions using win->get_num_active_display_regions() and win->get_active_display_region(). For each one, you can get the camera, and from that, the scene graph it is under (e.g. display_region->get_camera().get_top()).

David