Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Page Curl

  1. #11
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,411

    Re: Page Curl

    Assuming this is video, doing an A->B roll, the background quad is the B footage (destination image).

    Doing a really realistic page curl without stretching is somewhat hard. You might need to look into cloth simulation systems for that.

    Doing cheesy page curl; either roll-up or peel-off; is a matter of sweeping an imaginary rolling pin across the mesh, and rolling/peeling up the vertices that are on the "back" end of that pin, by rotating them around the pin's center axis. This will stretch a bit, but you often don't notice.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  2. #12
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941

    Re: Page Curl

    Poster "john", my simple quad was the background and it doesn't curl, my *MESH* was the foreground, picture mesh = *subdivided* surface under arbitrary warp. This is simple stuff and doesn't need debate. Sorry, no offence but we both know this is obvious and I explained it clearly.

    Poster stephenRuan; .... yea..... what jwatte said, except that the rolling pin won't stretch the sheet, sorry jwatte, rolling pin for page curl = unstretchy goodness. It's probably the simplest solution.

    Addendum; rolling pins stretch dough etc. not infinitely thin surfaces.


    [This message has been edited by dorbie (edited 09-06-2003).]

  3. #13
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,411

    Re: Page Curl

    > rolling pin for page curl = unstretchy goodness

    Except for those triangle edges that cut into the imaginary rolling pin's surface because they're straight, and the pin is round, of course :-)

    I hope we could agree that if you tesselate really highly ("limit infinity") then stretchiness goes to 0, and you probably hit "good enough" WAY before you get to infinity.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  4. #14
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941

    Re: Page Curl

    Well now you're talking about the approximation of tesselation, the theoretical surface won't stretch but the surface tesselation edges will actually shrink slightly due to piecewise surface approximation, however this will only happen at the interface between the flat and curved surface, as it rolls over it's on a rolling pin of constant radius and won't stretch or shrink unless you reorient the cylinder. You can't claim some simulation would do better, you can't get path length and absolute location correct simultaneously in any scheme without infinite subdivision, and it's debatable which is more correct.

    Ultimately this is a real nit. W.r.t. the difference you're talking about the length of a chord vs the arc path length. I'd be much more concerned about the piecewise linear image interpolation on texture and the effect on any edges in the image, and tesselation on all silhouettes. This is the more compelling reason for highly tesselating the curl.

    You could subdivide the cyliner through the surface rather than at the verts on the surface, i.e. fake the radius slightly higher based on the subdivision chord vs arc error but it probably ain't worth the trouble, it won't help with the piecewise linear visual problems that are the real challenge.

    [This message has been edited by dorbie (edited 09-06-2003).]

  5. #15
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    765

    Re: Page Curl

    "He didn't say you would curl the simple quad, but the mesh on top of the quad"
    .. except a mesh IS also a quad of one mesh. My point is that there is a differnce between a mesh which is one quad, and a mesh which is a series of quadstrips where #vertices >> 4.

    quad == polygon(n=4) == mesh of one primitive

    which was my point.

  6. #16
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941

    Re: Page Curl

    Unbelievable, no "john" you're wrong. The meaning especially in context with one entity called a "mesh" another entity called a "simple quad" should have been clear. Your second post made your error absolutely clear, your followup is just pedantic and flagrantly dishonest.

  7. #17
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    765

    Re: Page Curl

    Well, each to his own. But clarity IS important and it is IMHO that your message was not as clear as it could have been. It isn't a small thing; technical writing MUST be precise.

    The key problem is the meaning you attribute to a mesh. A mesh does NOT imply a set of triangle quad strips. A mesh is simply a group of connected vertices: hence, a quad is a mesh, a quad strip is also a mesh, and a set of quad strips is also a mesh. that might not be true where you come from, but I'd argue that is most certainly the case in most rigiourous discussions of what a mesh is defined to be. This is the same as the argument that a triangle is a polygon, a quadrilateral is a polygon, and an n-sided shade is a polygon, but a polygon is NOT NECESSARILY a triangle.

    You wrote:

    The new image is drawn to the screen on a simple quad then the old image is drawn on a geometry mesh on top.
    all of which says "we have two sets of geometry. one is a simple quad, and the other is [some geometry]". you MIGHT have meant that a mesh is a grid, but that isn't what you said and it is NOT a known and standard term to describe a quadrilateral strip as a mesh. call it pedantic if you will, but that is NOT what you wrote and it IS important to be clear especially when describing something to someone who asked the question in the first place.

    writing technical papers/discussion MUST be clear.


    [This message has been edited by john (edited 09-09-2003).]

  8. #18
    Junior Member Newbie
    Join Date
    Sep 2003
    Location
    beijing,China
    Posts
    4

    Re: Page Curl

    Doing cheesy page curl; either roll-up or peel-off; is a matter of sweeping an imaginary rolling pin across the mesh, and rolling/peeling up the vertices that are on the "back" end of that pin, by rotating them around the pin's center axis. This will stretch a bit, but you often don't notice.
    How can I define each vertex's rotating angle,is there a mathmatical model to describe simple page curl?

  9. #19
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941

    Re: Page Curl

    John, my post was absolutely clear.

    Originally posted by john:
    well, a simple quad isn't a quad mesh, is it?
    That was your position, but now you are saying:

    Originally posted by john:
    .. except a mesh IS also a quad of one mesh.
    It's clear that that wasn't your point in the earlier post, but I don't really care. It has to be the most pedantic observation I've seen, and is wrong anyway. A mesh clearly describes subdivision of some sort.

    It's important to be clear, yes, but you observing it's important doesn't mean I wasn't. Clearly I was.

    [This message has been edited by dorbie (edited 09-09-2003).]

  10. #20
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941

    Re: Page Curl

    Stephen,

    One way is to start with a page of some width, to roll this around a moving cylinder or rolling pin, you want to start a cylinder resting at the end of the page and over time decrease it's horizontal location. You then subtract each vertex location from the cylinder location and use the remainder if it is less than 0.0 as the distance around the radius of a circle in x and z to move the point. It would be the rolling pin effect described above and you can play with the radius etc for best effect. Pre and post rotate in x and y while starting at a corner for diagonal curl effects.

Posting Permissions

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