Scenegraph basics

I’m really having problems getting putting models and Boxes etc… on my terrain. I’ve been playing around with my scenegraph and settled on the following at the moment:



                 rootNode
            


            |                 |
            |                 |
            |                 |
            |                 |
         sceneNode          light
            |
            |
   
   |         |                  |
Box    terrainNode         MSmodel
             |
             |
          TerrainBlock



Am I doing something very wrong here?

The only way I can get the MilkShape model into my scene is to attach it to the terrainNode, but this looks strange and only actually apears if you go close to it.

I don't know if I should be using terrain like this? Is their a demo of terrain with other jme objects (e.g. crude looking trees) available?

Ok sorry about that - I was calling:



display.getRenderer().draw(terrainNode);



instead of:



display.getRenderer().draw(sceneNode);



://

Ok, I added a test TestTerrainTrees, that just put a bunch (500) trees on the terrain block.



The scenegraph is basically set up like:


rootNode
           


            |                 |
            |                 |
            |                 |
            |                 |
            |              light
            |
            |
             
             |                          |
             |                           Tree 1 - 500
          TerrainBlock



Now this is using TerrainBlock which is geometry and thus could not have children. If this was a TerrainPage, I'd add the trees as children to it.

BTW, 500 trees tends to slow down the demo on my older machine, so I found turning off lighting (L) really helped.

Thanks.



Sorry about the stupid error.



I’m having fun sticking stuff on my terrain at the moment! :slight_smile:



I’ll post my code for any other n00b next time I have a problem & need to start a thread.