Skip to main content
gamedev.net
🔒 Locked

Simple Shadows

Started by Juicy Dec 3, 2002 at 3:12 PM 5 replies 350+ views
Original Post
Juicy
Juicy
I understand the principal behind creating primitive shadows onto a flat surface. A trivial case of projecting the model (whatever that might be), from the light source to the flat surface (in my case, really simple, the plane the shadow will be cast on is on the horizontal at y=0). So, knowing the principal, you''d think it''d be easy to implement, but I''m completely confused. Can anyone help?
I like pie! - weebl.
Oneiric - Another graphics engine in the works.
RipTorn
RipTorn
glScalef(1,0,1);

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
llvllatrix
llvllatrix
Could always do it realistically, and easily. They talk about this effect in the red book. Basically you take screenshots of your image with each individual light activated. Then you blend the images in the accumulation buffer and you''re done. These are called soft shadows. Only problem is that they are slow

"Free advice is seldom cheap."
-- Rule of Acquisition #59
DarkKiller
DarkKiller
@RipTorn: Scaling the model to 1,0,1 would generate a totaly flat model. Drawing this model on the groung at 0,0,0 would generate a good shadow under the 1,1,1 model. Is this what you do?
DarkMcNugget next time... ;)
vincoof
vincoof
RipTorn: what you do is correct, but for directional light that comes from the Y axis only. Though that shows the technique.

Mark J. Kilgard wrote something about planar shadows and I found it again at opengl.org at this page. Also he wrote something about volumetric stencil shadows (at opengl.org too) at this page. Check them out !

[edited by - vincoof on December 4, 2002 6:21:00 AM]
Juicy
Juicy
vincoof, you''re a star!
Thankyou for all your answers; I should be sorted now.


Neil.
I like pie! - weebl.
Oneiric - Another graphics engine in the works.
vincoof
vincoof
Be sure to check both pages (I''ve edited my post)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.