Opinion requested on structuring scenes

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
ceisnaugle

Opinion requested on structuring scenes

Post by ceisnaugle »

Currentl I am working on some experiments with scene layouts that can encompass the following:

Outdoor:

- Terrain (heigthmap or mesh)
- Skybox
- Static Meshes for Trees/Buildings/etc that are laid out in mini towns around the terrain.

Indoor:

- Mesh for caves or Mesh for dungeons


Currently my interest is in figuring out the best method for handling Outdoor. I dont wish to make a huge mesh with the terrain, buildings, etc in one giant polygon soup since its rather unweildy. Current thoughts are having a custom scene node for the terrain that will be rendered using either geomipmapping or a quadtree. The buildings and trees I was thinking of a second scene node that is a quadtree that does not break the quadtree down into polygons but uses their bounding boxes as the elements in the quadtree. This would mean if a building was in a node the entire thing would get drawn. This allows me to remove huge numbers of polygons fast as I can drop entire buildings, but it also means the buildings are a bruteforce render (may want to Octree or BSP the buildings to help that).

My question really is, does this sound reasonable and is it reasonable to create these 2 scenenodes, or would it be better to have 1 Scene node that handles both Terrain and the static objects in one pass (aka Render the terrain then the statics through the onrender method in my own scenenode). I like the idea of breakign it up into 2 scene nodes since it is less messy, but wanted to see if others thought this was reasonable.

Also on a side note, are there any good examples out there with custom scene nodes that use relatively complex meshes, multiple textures/materials etc?

Thanks,

Chris
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

You can do what most mmorpg's that use large terrain scapes do and break each landblock into it's own mesh and then load/unload them per need.

A semi-example of this is http://www.saigumi.net/archives/000027.html and http://www.saigumi.net/archives/000021.html.

Asheron's Call does this on a larger scale. The landblocks are less defined at a greater distance and don't have child objects like tree/rocks/houses/monsters drawn. When the landblock is 2 miles or less away, more detail is loaded as well as the objects on those tiles.

It may not be a multi-texture mesh, but the Terrain demo on the tutorials page on the main irrlicht site is a complex custom scene node.
Crud, how do I do this again?
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

about a month and a half ago i modified the custom scene node tutorial so that it dispalys a texture on it. do you think that i should clean it up and post it here for others to see?
ceisnaugle

Tutorial

Post by ceisnaugle »

I wouldnt mind seeing it. Also be nice if it used multiple textures (1 each side) of a cube perhaps.

Been reading documentation, does irrlicht support Multitexturing?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

stampsm, maybe you should post a howto in the howto forum, and a link here.

ceisnaugle, not quite.

currently there are different 'materials', including alpha, lightmap, and reflectance, as well as some others. perhaps one of these will suit your needs.

if not-- perhaps you can extend the materials to include what you need, otherise, no.
a screen cap is worth 0x100000 DWORDS
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

yea i will work on getting it ready mainly all i have to do is clean up the code and write stuff to explain what i am doing
Post Reply