lighting/shadowing with octrees and aabb trees
Hiya everyone,
Designing and building my engine so far has been a hard, but fun task. Lately how ever, I have been wondering if my design plan will support everything I plan to implement later on.
The mesh class will handle static and dynamic objects, sending them to either the octree or AABB tree according to if there static or dynamic objects. Anyway though, my problem lies with shadowing and lighting.
static objects will use lightmaps, some however will cast shadows on dynamic objects as well as static objects. In turn, the dynamic objects
will cast shadows on both static and other dynamic objects. The terrain will be lit primarley from the sun representation, the terrain will cast shadows on itself as well as static and dynanmic objects, etc. The problem is though, once the data is in the trees, how will shadows and light be applied to everything..?
My first though was that each light source will get a list of all tris and aabb nodes around it and then calc the light on them, shadows will then be calculated as usual. This doesnt seems to be the best solution, but then, how exaclt and or when exactly should the light be applied
to the world...
Im not asking for a perfect answer, or any source examples, but
some comments and suggestions would be nice. If my question seems
vague or is unclear, please let me know in your post. Im open to
critism.
Thanks a lot and Cheers!
~yodaman
www.jinx.com www.thebroken.org www.suprnova.org www.mozilla.org
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement