Nesting scenes is possible. What is it good for?

Interesting point.

It doesn’t have to be, I’m just curious if it is.



In my own project (I’m working on WebGL rendering with Three.js in the threejs branch), Scene’s have a size, and that size determines how big the scene is in CSS pixels (i.e. the DOM size on the screen).

After I figure out how to map Three space to CSS3D DOM space, I’d like to be able to nest scenes inside scenes: a scene inside a scene would be a “PlaneGeometry” in Three terms, and inside that plane would be drawn the inner scene (f.e. like a TV display inside a 3D world, everything in the TV is an inner scene). This would be unlike how Three’s currently treats a Scene as simply a Object3D, and rendering it in a plane takes extra effort.

So I’m just pondering ideas on how to treat nested scenes in my project, thinking about making a nested scene default to being rendered in a plane. :slight_smile:



@fifonik That’s interesting! So, f.e., we could have a scene that’s a whole game, then if we want to have selectable items that when selected can be previewed alone in a separate viewport, we can just render that selected item as it’s own scene with another camera. But this can also be done by placing a camera somewhere in the scene (but then we get the whole rest of the scene in the background).

Interesting to note that in Pixi we can render using any object as the root, it doesn’t have to be a specific sort of Scene node.