Master Lolo
01-09-2002, 09:14 AM
Hi all, I'm trying to do what some people call "lightmaps". This is no texture or multitexturing related question, but more about a method to perform this (even if I don't know exactly how to render a shadow).
So let me explain what I exactly want to do :
First I want to cast shadows from a single light source. This light source is STATIC (the sun), it won't move, so I want to perform a minimum of calculations each frame. Of course I can perform a lot of precalculations while the app is loading, I can even store the results in a file.
I want to use this to cast shadows from trees, as they are lit by the sun. The leaves of my tree are rendered with alpha textures, and I want theses "holes in the polys" to be rendered on the ground shadows. The ground is NOT flat, and I want the tree to self shadow if necessary.
The best, I think, would be to store these shadows in a file (so what should I store exactly ?), and to render them as if it were textured on the objects of my scene (by multitexturing or any other way)
Second I want to perform the same thing, but with multiple light sources (for indoor lightmapping). If shadows overlap, then the "resulting shadow color" will be darker.
Any suggestions, any links, any help of any kind would be much appreciated.
Lolo
PS : At the moment I am reading a pdf written by Mark Kilgard from nVidia about stencil shadows, is it the best way for my problem ?
[This message has been edited by Master Lolo (edited 01-09-2002).]
So let me explain what I exactly want to do :
First I want to cast shadows from a single light source. This light source is STATIC (the sun), it won't move, so I want to perform a minimum of calculations each frame. Of course I can perform a lot of precalculations while the app is loading, I can even store the results in a file.
I want to use this to cast shadows from trees, as they are lit by the sun. The leaves of my tree are rendered with alpha textures, and I want theses "holes in the polys" to be rendered on the ground shadows. The ground is NOT flat, and I want the tree to self shadow if necessary.
The best, I think, would be to store these shadows in a file (so what should I store exactly ?), and to render them as if it were textured on the objects of my scene (by multitexturing or any other way)
Second I want to perform the same thing, but with multiple light sources (for indoor lightmapping). If shadows overlap, then the "resulting shadow color" will be darker.
Any suggestions, any links, any help of any kind would be much appreciated.
Lolo
PS : At the moment I am reading a pdf written by Mark Kilgard from nVidia about stencil shadows, is it the best way for my problem ?
[This message has been edited by Master Lolo (edited 01-09-2002).]