diffuse/lightmap/normalmap

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Dog-E
Posts: 28
Joined: Sun Mar 30, 2008 5:52 am

diffuse/lightmap/normalmap

Post by Dog-E »

Hi everyone,

I'm still trying to get the hang of material handling of Irrlicht.

How would one go about having a diffuse, lightmap and bumpmap for an
animated mesh with the scene node pointer of the type IAnimatedMeshSceneNode?

Also ISceneNode has the getMaterial(count); function with a max value of 4. Does this mean a scene node automatically has 4 materials that are combined somehow?

Thanks.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

How would one go about having a diffuse, lightmap and bumpmap for an
animated mesh with the scene node pointer of the type IAnimatedMeshSceneNode?
It requires you to set vertices of your mesh to correct format and use material which can render your mesh with all those textures.
In case of vertex format you would want S3DVertexTangents. You can convert your mesh to that by using mesh manipulator I think.
In case of material you would need to create your own since there is no build in material which can render both, light map and bump map. Only one or another: EMT_LIGHTMAP or EMT_NORMAL_MAP_SOLID.
Also ISceneNode has the getMaterial(count); function with a max value of 4. Does this mean a scene node automatically has 4 materials that are combined somehow?
I don't know where did you find that information. There is no limit mentioned in API for that function and as much as I know number of materials scene node can have is unlimited. How much materials node is using is custom and mostly equal to number of mesh buffers.
Post Reply