Topic: Shader questions

Hi,

I know this might be a little much to ask be is there any example to load models with 4 different textures onto a single model? I'm working on making a space strategy games and would really like to be able to have models in a folder as "ship.x" "Ship_tex.bmp", "ship_lights.bmp", "ship_spec.bmp", "Ship_normal.bmp", and would just load the model with all these applied. From what i understand i need shaders to do this but i haven't fully understood how. is anyone able to give me a working example of just a model with a specular map, normal map, self illumination Map (windows lights,engine glow, etc...), and a color map all applied to it? Or is it really not that easy to get a primitive example working?

Thanks,

Paul

Re: Shader questions

greetings smile  im not sure you need shaders for this.  im definately not advanced in this type of thing but i can hopefully guide you in the right direction.  check out the SMaterial structure in the Irrlicht manual.  each node can have 4 materials added to it.  you do this by creating the material, setting its properties, and then adding it to the node.  an example of that would be (this is from the Irrlicht sample 07):

Local material:SMaterial=SMaterial.Create()
material.setTexture(0,driver.getTexture("faerie2.bmp"))
material.setLighting(True)

Local node:IAnimatedMeshSceneNode
Local faerie:IAnimatedMesh = smgr.getMesh("faerie.md2")
node.setMaterial(0,material)

some other methods to look at are SMaterial.setMaterialType(), ISceneNode.getMaterial().  something to keep in mind is there are a lot of properties on SMaterial that are accessed directly.  in BMAX i had to convert those to get/set methods.

also check out the 11 and 10 Irrlicht examples.