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: Turning a book page

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2008
    Location
    France
    Posts
    5

    Turning a book page

    Hello,

    let us say that you are using a quad to model a book page
    and that you want to make it turn.

    How do you make the right-hand corner bend and move to the
    left-hand corner of the book?

    How do you render the shadow caused by the corner bending?

    Many thanks.

    philroc

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jul 2010
    Posts
    199

    Re: Turning a book page

    You have to tessellate the quad if you want the page to bend. You can either do that on the CPU (so you are in fact not using a quad at all, but a number of triangles to model each page), or you can do it on the GPU with OpenGL 4 (where you in fact model the page with a single quad-shaped GL_PATCHES primitive).

    I'll let someone else tackle the shadow casting question. There are a number of different techniques to accomplish that.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2008
    Location
    France
    Posts
    5

    Re: Turning a book page

    Thank for your feedback, David.

    I guess if I add a few lights to the scenes and bend the pages by moving some of the tessallation points, shadows will appear, won't they?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726

    Re: Turning a book page

    I guess if I add a few lights to the scenes and bend the pages by moving some of the tessallation points, shadows will appear, won't they?
    Nothing in computer graphics appears unless you expressly make it appear. That goes double for shadows.

Posting Permissions

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