PDA

View Full Version : Turning a book page



philroc
11-05-2010, 07:55 AM
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

david_f_knight
11-05-2010, 08:54 AM
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.

philroc
11-05-2010, 10:00 AM
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?

Alfonse Reinheart
11-05-2010, 12:17 PM
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.