Is there a way to “Project a Geometry” the same way we project textures?
I found this example: http://www.imgtec.com/powervr/insider/demos/shadowtechniques.asp
But from what I understand as long as the “ground” is a plane its working fine but if its like a terrain not really. Is there any way to tweak this technique in order to use it with a terrain?
I would no think so - what are you trying to accomplish with this?
No, at least not in a simple way as you would have to start clipping or subdividing geometry.
Though there are other techniques that produces similar results to some of the effects that uses it, but that depends a little on what your end result should be like.
Well Im working on hardware with OpenGL ES that doesn’t have no stencil buffer so no shadow volume… And projected shadowmap is not even an option (too limited in memory)… Im using glLight for the shading (cuz I have no other choice), and Im looking for a “fast” way to get hard shadows.
A pretty common hack is to “drop” a shadow onto the geometry from one direction. You get a bit of stretch off-axis, but it’s usually not too bad. Find the axis that best represents the “normal” of the receiver then make that the plane of projection. (If this ends up looking like monkyspunk, pretend I never said anything.)
nah… already tried that one… work fine when terrain is smooth but as soon as you got like an hard edge it’s looking really strange the shadow it like half hanging in the air… not cool…
If your dealing with those kind of limitation i think hard shadows are a bit too much to hope for, the only method left for you is using the model to create a cutout of the terrain, this is somewhat processor intensive and seeing your using openGL ES i don’t know if you have any to spare.