You are not logged in.
So now that I have my buildings and bullets. I read somewhere that lights don't actually cause shadows to appear. whats the easiest way to start baking/casting some shadows in GRRLIB?
I want something looking like this: http://vimeo.com/9284867
Offline
I'm sorry, I did not code the 3D stuff, but the examples called 3D_Light1, 3D_Light2, 3D_Light3 and 3D_Light4 are not OK for what you need to do?
Offline
I am already familiar with those examples but they do not have shadows in them, only lights. I think.
Offline
like in real
put your cam at the light position and looking at your light direction. turn the light off, capture it, then replace your cam where you want it to be, turn light on. you have now a nice texture of the shadow map it where you want
Offline
What? I'm confused by what you just said. Why do I have to turn off the lights?
Offline
you have to done it in two steps,
1/ render the shadow (so you need to light off) and grab it to a texture (you will have to put your cam at the light position)
2/ clear the screen
3/ render your object as usually (light on) cam at the normal place, (and use the shadow texture of step 1 to map the object you want
Offline
OK, I understand what you are saying now. My problem is step 1, how do I render a shadow?
Offline
shadow = your object seen at the light position and direction mapped on a surface
i adivised you to turn off the light before rendering shadow to have a black object
Offline
Oh yes, I understand what you are saying now, I will attempt to do it (I hope it does not kill my framerate). I also read wikipedia and they said the samething but now I understand what is going on. http://en.wikipedia.org/wiki/Shadow_mapping
Offline