Creating Scene with "submeshes"

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
xaddict
Posts: 23
Joined: Tue Jan 29, 2008 7:18 pm

Creating Scene with "submeshes"

Post by xaddict »

What is the best way to set up a large map with buildings and stuff on it and have a triangle-selector for collision detection?

I'm right now loading one map with a terrain and one building on it and I want to add buildings to it. I'm thinking about flats which will consist out of multiple duplicate blocks of static meshes on top of each other and normal houses between these flats...

Any ideas?
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Use a metatriangleselector?
xaddict
Posts: 23
Joined: Tue Jan 29, 2008 7:18 pm

Post by xaddict »

The main problem I have is how to easily (1/2 lines of code) add the buildings to the map... that's my main problem.. the getMesh thingie from the examples all assume you use IAnimatedMesh... but there must be an easier way for setting it up right?
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

You mean like a level editor? Like IrrEdit? You can design your scene in that then export it as a single .irr file.

By the way, IAnimatedMesh is used for both animated and non animated meshes... Strange isn't it?
xaddict
Posts: 23
Joined: Tue Jan 29, 2008 7:18 pm

Post by xaddict »

xDan wrote:You mean like a level editor? Like IrrEdit? You can design your scene in that then export it as a single .irr file.

By the way, IAnimatedMesh is used for both animated and non animated meshes... Strange isn't it?
that's just plain weird yeah:P It does not really make sense:)

But I was not talking about some IrrEdit like thing. I want to enable the highest FPS possible on my map and that means I should add every buildingblock separately because than the app can 'delete' models not in the view at that point.. or do .irr files work exactly like that? (I though .irr files were just combined files that so to say 'merge' the objects and buildings)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Whether scene node culling is better than avoiding the trasnformation setup of those many small nodes depends heavily on your scene. Because many small nodes will slow down the whole rendering, which means that culling has to perform very well.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

(I though .irr files were just combined files that so to say 'merge' the objects and buildings)
I'm pretty sure the irr files have scene nodes in them... So the meshes aren't merged, so your buildings will still be culled separately.

and there are functions to iterate through all scene nodes, if you want to do your own culling (e.g. setting nodes visible or not based on distance). Or just set the camera far plane closer.

(you don't really need to "delete" the nodes as it were, setting them to be invisible is good enough... unless you have a really really huge environment where you might want to stream from disk or something)
Post Reply