Changing the light level of certain polygons of a 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
Unwise owl
Posts: 6
Joined: Thu May 20, 2004 9:40 pm

Changing the light level of certain polygons of a mesh...

Post by Unwise owl »

Sorry for starting lots of new threads all the time ;).

After a 4h bug hunt which ended well I've managed to get a simple island out in the sea to look like this:
Image

Now there is the visual attribute of it that all of its sides are exactly of the same light level. This leads to my question about how to go on assign it so that the light level on certain polygons is different than the others (I would compute it depending on the face normals' direction compared to the sun's). How do I modify the mesh/render this?[/img]
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

I don't think you want to alter light levels on a per poly basis, that really breaks the realism of the mesh. X-Com was using this 12 odd years ago, that's how old that effect is. Irrlicht will actually cast shadows for you if you put in a light. Check out the tech demo for how to get your meshes to cast shadows. Should work with the terrain node ( looks like you made that with a height map, right? ).
Post Reply