hierarchy of model

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
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

hierarchy of model

Post by condrula »

hello
i made a unique model .x with many mesh in it(made with DeleD), then I loaded it in my demo project but I dont know how to call a single mesh in my level.
If its possible can someone help me to understand how to select a sub-node in my model in irrlicht?
thx
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

I dont think it's possible, you have to load each mesh separately.
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

Post by condrula »

maybe someone more expert than you can say something more usefull?
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

so I am not expert enough for you ha?!!!! ..... :evil:


:wink: look, when you export your model out of your modeling program, everithing inside is going to change it to bunch of data, basicly storing positions of vertices. When loaded in to the Irrlicht (and any other similar engine) its just one big group of vertices. One way modeling programs sometimes store diferent objects in one file is to make them diferent groups. But Irrlicht up to my knoweledge cant handle information about groups and there are no functions to manipulate groups separately.
Mr_Ridd
Posts: 63
Joined: Tue Sep 28, 2004 5:16 am

Post by Mr_Ridd »

maybe someone more expert than you can say something more usefull?
Ouch, that was a bit harsh.

Anyway...

Can you tell us what you are trying to do? Why would you want to call certain meshes instead of adding new meshes.
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

Post by condrula »

[quote="arras"]so I am not expert enough for you ha?!!!! ..... :evil:
.[/quote]

Im sorry, I didnt want hurt you, buy your first answer sound a little strange...
a kind of "you cant do this but i dont know why"
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

Post by condrula »

[quote="Mr_Ridd"][quote]maybe someone more expert than you can say something more usefull?[/quote]

Ouch, that was a bit harsh.

Anyway...

Can you tell us what you are trying to do? Why would you want to call certain meshes instead of adding new meshes.[/quote]

If you build many meshes and load them separately, then you must search for correct position in your world, instead with a 3dcad (in this moment i use deled) you can position each mesh in a correct position more easly, and then export in .x format as a unique big mesh. If mview.exe can recognising the real hierarchy of my big mesh why Irrlicht cant do this?
Maybe this is a lack of the loader of Irrlicht.
Mr_Ridd
Posts: 63
Joined: Tue Sep 28, 2004 5:16 am

Post by Mr_Ridd »

Ok, well first of all. Irrlicht is not a 3D package. It's not as though you are making a movie where you can adjust this and that for the current scene.

I'm not sure how Irrlicht does its Octree calculations but if you had to load a huge mesh into one node I'm sure you will be taking up a lot more memory than individual meshes. Personally I wouldn't want to do it that way. It would make your whole game design a mess.

Remember that for games you want to optimize it as much as possible, with one huge mesh you will have to run through vertices that are not even going to be used.

Just one question... are you using Irrlicht for game development?

:?:
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

Post by condrula »

I dont want to make a film, but if you want to make a believable scene you have to use many meshes. Memory isnt a problem, just use lowpoly and load/unload scenes if needs.

"Just one question... are you using Irrlicht for game development?"
well...im trying
Mr_Ridd
Posts: 63
Joined: Tue Sep 28, 2004 5:16 am

Post by Mr_Ridd »

Do you know why it will become a mission with the way you are trying to do it?

Take this for example:

What if you place a tree. Now you want to knock that tree down when you drive into it. When the tree falls you want to change it's position and rotation. A ISceneNode already has functions to adjust the position, rotation and scale. Why would you want to go and write those yourself?

Put the effort in and make a level editor. I started making one and after one hour of programming I made something where I could visually place, move, select and delete meshes.

It will pay off in the long run. 8)
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

I know both .obj and .3ds can hold group information, which most modelers will export. If you really want to, you could write your own loader which loads groups seperately. I do not know if .x supports groups, and anyway writing your won .x loader would be quite hard.

None of this is prob worth the work, I'm just saying thta it would be possible if you really want multiple objects in a single file.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Post Reply