Multiple materials per mesh?

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
rakkar
Posts: 19
Joined: Sun Aug 07, 2005 11:24 pm

Multiple materials per mesh?

Post 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.
rakkar
Posts: 19
Joined: Sun Aug 07, 2005 11:24 pm

Post 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?
selles
Posts: 8
Joined: Sun Jul 03, 2005 9:21 pm

Post by selles »

etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post 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.
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Post 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?
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post 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.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

I use DeleD so I don't have to worry about materials.
why is that?
what is this thing...
Post Reply