Several Models in one file

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Guest

Several Models in one file

Post by Guest »

hi!

im not really the modeller guy, so i wanted to ask a few of you artists if its possible to have multiple meshes and textures in one single .x file?

example:

animation frame 1: cube - tex1.jpg
animation frame 2: sphere - tex2.jpg

etc...

because i got the idea of setting up my building models for rts like this:

frame 1: construct_1
frame 2: construct_2
frame 3: construct_3
frame 4: construct_4
frame 5: destruct_1
frame 6: destruct_2
frame 7: destruct_3
frame 8: destruct_4
frame 9: lod_1
frame 10: lod_2
frame 11: lod_3
frame 12: lod_4
frame 13: update_1
frame 14: update_2
frame 15: update_3
frame 16: update_4
frame 17: building

where each frame has a different mesh and a different texture (or can i make one big texture for all frames?)

otherwise i would have to switch the models all the time, i think a simple
setAnimationFrame or something like that is way more easy and better because the model gets loaded all toghether and not in pieces.

i dont know if thats possible, though :)
omaremad_

Post by omaremad_ »

i wanted the same tactic to use multiple gun meshes for a single gun node

may be loading normal meshes and dumping their data in to the mesh buffer of the node would work?

we dont want to maek a new format
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

One thing you could do is embed all those meshes inside the file, then selecively turn them visible / invisible when you need them. You'd have to modify the Irrlicht source for your mesh loader to know what is default visible / invisible, and then create some events when they change status. Each mesh would get its own mesh buffer, and its own material; you could turn the material's visible flag on and off to achieve this.
example:

animation frame 1: cube - tex1.jpg
animation frame 2: sphere - tex2.jpg
I don't think that would work... The number of mesh buffers and materials will have to be constant (I.E., if you have a cube and a sphere each with different textures, they will each be in a mesh buffer with their respective material)
because i got the idea of setting up my building models for rts like this:

frame 1: construct_1
frame 2: construct_2
frame 3: construct_3
frame 4: construct_4
frame 5: destruct_1
frame 6: destruct_2
frame 7: destruct_3
frame 8: destruct_4
...
I think instead of using 'frames' you should just make a different mesh to represent different constructs and different LODs, etc... I don't think meshes allow texture animation, so you couldn't move / rotate / scale UVs through animation, and you can't replace textures through animation (you can through code though...)
Bob

Re: Several Models in one file

Post by Bob »

GFXstyLER wrote:hi!

im not really the modeller guy, so i wanted to ask a few of you artists if its possible to have multiple meshes and textures in one single .x file?

example:

animation frame 1: cube - tex1.jpg
animation frame 2: sphere - tex2.jpg

etc...

because i got the idea of setting up my building models for rts like this:

frame 1: construct_1
frame 2: construct_2
frame 3: construct_3
frame 4: construct_4
frame 5: destruct_1
frame 6: destruct_2
frame 7: destruct_3
frame 8: destruct_4
frame 9: lod_1
frame 10: lod_2
frame 11: lod_3
frame 12: lod_4
frame 13: update_1
frame 14: update_2
frame 15: update_3
frame 16: update_4
frame 17: building

where each frame has a different mesh and a different texture (or can i make one big texture for all frames?)

otherwise i would have to switch the models all the time, i think a simple
setAnimationFrame or something like that is way more easy and better because the model gets loaded all toghether and not in pieces.

i dont know if thats possible, though :)


Why dont you use the search button? Seems like your standard answer to others?


.
Guest

Post by Guest »

its the standart answer to standart questions, idiot!

because this is not covered by searching, at least i know how to search. i guess you are the pissed of n00b which i told to use the search function (beginners forum, eh?)

but before you didnt register your stupid nickname i dont give a gently caress about what you are saying anyway!
Maize
Posts: 163
Joined: Sat Oct 29, 2005 12:12 am
Location: In a cave...
Contact:

Post by Maize »

GFXstyler has a point. He wouldnt tell you to search if there wasnt an answer somewhere else. I can see where he was coming from because I would get annoyed when people always reask questions. GFXstyler has gained my respect.
Guest

Post by Guest »

GFXstyler has gained my respect.

Yes, he almost always is focussed on the subject. And i think he is a good programmer. But its not necessary to bash ppl for almost no reason. Please be more gentle. If you give good feelings you can also harvest them.

Imagine...
GueZt

Post by GueZt »

1). Let say u got 5 group models with bones each of group has it
its own animaton.


G1 G2 G3 G4 G5
0---------------------|<<< <<< GROUND LEVEL


1). for some animation frames i only need this group 1,3,5
just hide actually not hide but MOVE the object u dont
need beyond ground level


G1 G3 G4
0---------------------|<<< <<< GROUND LEVEL

G2 G5


2). for some animation frames i only need this group G2 G5
just hide the object u dont need beyond ground level


G2 G5
0---------------------|<<< <<< GROUND LEVEL

G1 G2 G4


This will work only on a fixed ground without collision for the ground
but hieght offsetting will do it.
Guest

Post by Guest »

i guess i will just load several models then :)
Post Reply