Monday 2 January 2012

Setting the world alight

My use of 3D packages in the past like 3Dmax and povray help me realise that shadows are cast from scene light sources that can cast shadows.

These light sources are part of the world and cast shadows by varying techniques like ray tracing. This works fine in pre rendered scenes as the shadows don't dynamically move depending on player input.

Also, XNA doesn't have world lighting, you apply how an object is lit and you can have this info as a global variable so all objects are lit the same.

Problem is that no object knows about any other objects lighting and therefore can't block any light rays.

This means that shadows aren't a given in XNA. You can't just apply a light source and say cause this to cast shadows.

So it's not as easy as I thought. But I still think shadows are the best way to achieve my game mechanic so time to google!

No comments:

Post a Comment