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

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.

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?

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.