Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: shadow question

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2012
    Posts
    1

    shadow question

    if someone can help with this i would appreciate it.

    say i have a model and i want to draw a shadow of the model just "below" the model such that it appears that a light is above the model and shadow is projected onto a plane. since, the model may be rotated, etc. i want the shadow to reflect the orientation of the model.

    can anyone give me a hint as how to proceed?

    thanks

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2006
    Location
    greece
    Posts
    183

    Re: shadow question

    There are standard techniques for this kind of stuff. Look into shadow mapping and stencil shadows.
    while(1){keyboardsolo(FORTE, BPM_190);}

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    Re: shadow question

    Beyond those, google "planar projected shadows". Depends on all your requirements which one you should go with.

  4. #4
    Junior Member Regular Contributor Kopelrativ's Avatar
    Join Date
    Apr 2011
    Posts
    212

    Re: shadow question

    You didnd't ask for it, but consider the possibility to use a more simple form of shadows. It is quite easy to update the shader so as to simply add some circular darkness beneath the object. This doesn't meet your requirement of "shadow is projected onto the plane", but it is very simple and use less GPU resources. It is also an alternative to offer if you want to support graphic cards that are not as powerful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •