4.4 Elements of scenegraph design | JAVA 3D Programming | Chapter 4

Designing a good scenegraph structure may involve making trade−offs across several factors. The scenegraph should be easy to manipulate at runtime (you may want to dynamically attach and detach entire branches to switch them on or off) as well as easy to customize in the future. You may have to make compromises to get good performance to ensure that Java 3D can process your scenegraph efficiently.

Object−oriented
        Object orientation allows easy reuse of scenegraph branches. Ideally, each branch should define a component of the application that can be meaningfully used independently of the other scenegraph branches. You should imagine having to drop the scenegraph branch in question into another application.

Compilable
      
  This property is related to the goal of object orientation. If scenegraph branches can be reused within the scenegraph without modification of their appearance or relative position, then Java 3D can further optimize application performance by removing the duplicated branches and replacing them with a reference to a single, unique branch. Learn more about scenegraph compilation in chapter 5. In the F1 example, trees, billboards, and bales might all be good candidates for some form of compilation optimization.

Level of detail independent
        A scenegraph branch should be able to have new child Nodes added to introduce new complexity into the scene, without disrupting other scenegraph branches.

Polymorphic (customizable)
        By replacing child elements of a parent Group, you should be able to create new but related scenegraph branches.

Bounds and level of detail aware

        Objects with large bounding volumes tend to imply “often visible” which generally implies “performance critical.” Do not make objects that are often visible (such as the trees in the Trees Group) of such high level of detail that they negatively impact application performance. Using high−detail models for the F1 cars themselves may be less critical as they have smaller Bounds and hence fewer of them are visible for most of the time. How you choose to apportion the detail within your scene will always be application/domain−specific or only domain specific, and may be related to the Bounds information of your scenegraph Nodes.

Comments

Popular Posts

2.2.3 Drawing filled triangles | JAVA 3D Programming | Chapter 2

3.1.4 Java 2 development environment (optional) | JAVA 3D Programming | Chapter 3

4.7 Immediate mode vs. retained mode vs. mixed mode

What is Java 3D and is it for me? | Chapter 1