Page 1 of 1

Multiple materials per mesh?

Posted: Thu Sep 29, 2005 1:57 am
by rakkar
If I have one mesh, say a spaceship, and want to have a different specular value for the cockpit than the body of the ship how would I do this? As I see from the code you can only apply one material per mesh.

Posted: Thu Sep 29, 2005 1:58 am
by rakkar
Also, I want to tag points in the 3ds file and read them into the game. For example, a light source with certain properties. How would I do this?

Posted: Thu Sep 29, 2005 3:06 am
by selles

Posted: Thu Sep 29, 2005 8:16 am
by etcaptor
rakkar wrote:Also, I want to tag points in the 3ds file and read them into the game. For example, a light source with certain properties. How would I do this?
You want to import these lights in game? Remember that Irrlicht at now still support 8 hardware lights and only one light type. If you want lightmapping, you can use my3d or other formats.
But you can import map nodes that will be generated in engine if you check loader code. By me easy way is creating of groups /librarry/ for lights, effects and other stuffs. Each group has own parameters, then creating of any empty node /in Max for example/ with name which points to some class name from librarry/. For example you can generate different particle effects like many type of fires, smokes, waterfalls on the map with given coordinates when you load your map.

Posted: Thu Sep 29, 2005 6:50 pm
by pfo
If you want to use multiple materials in a model, then for each model part that has a different material you need a different mesh (or group, whatever...) and texture that individual mesh appropriately. For a spaceship for example, make then engine a mesh and texture that, then make the cockpit a mesh and texture that, make the body a mesh and texture that etc....

If you want to save a specific position relative to the model in a file, use a bone . You can get the positions of these later in code and use to say... attach a particle effect to the engine, or save a location so that when a weapon fires the projectile launches from the correct position, it's up to you how to use these.

Posted: Fri Sep 30, 2005 10:53 pm
by r3i
Ok...but what about mesh where we have 3 textures one for regular, one specular and one bump ???
I've read the forum but I use 3ds: how can I use multiple materials or solve this problem?

Posted: Fri Sep 30, 2005 10:59 pm
by MikeR
I don't think you can use 3 materials on one mesh in irrlicht. You can use 2. You may be able to code it tho, but I really don't know. I use DeleD so I don't have to worry about materials.

Posted: Mon Oct 03, 2005 8:04 pm
by needforhint
I use DeleD so I don't have to worry about materials.
why is that?