Quad Distortion not matching
  • moocha
    junior Member
    Posts: 3
    Joined: Sat Nov 26, 2011 4:17 am

    Quad Distortion not matching

    by moocha » Sat Nov 26, 2011 4:32 am

    I'm not sure if I'm missing something here as I'm trying the demo out for the first time:
    I've used one of MadMapper's simple checked test grids, applied two quad distortions - the first applied to the top half, the second to the bottom half of the image. I've then distorted the two quads in the preview output into some kind of perspective but aligned the bottom plane and the top plane of the two quads together. I would expect the corresponding squares of the grid to meet along these two planes but they don't. Am I missing something here?
    Screen Shot .png
    Screen Shot .png (87.94 KiB) Viewed 5858 times
  • franz
    madMapper master
    Posts: 1082
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

    Re: Quad Distortion not matching

    by franz » Sat Nov 26, 2011 12:08 pm

    the two distortions won't match on the edges, simply because the perspective won't match.
    This is a mathematical problem: trying to match 2 random perspectives will always lead to this result.

    To do this, I suggest you make a grid warp, with 2 subdivisions on the Y axis, and 1 subdiv. on the X axis (for linked surfaces)
    or 2 quads-grid warped with no subdiv.
    Then you'll adjust the vertices, which will lead to your wanted result.

    Upcoming version of MM will address this by allowing the user to turn perspective on/off.
    Last edited by franz on Sun Nov 27, 2011 4:49 am, edited 1 time in total.
  • moocha
    junior Member
    Posts: 3
    Joined: Sat Nov 26, 2011 4:17 am

    Re: Quad Distortion not matching

    by moocha » Sat Nov 26, 2011 6:08 pm

    Franz - Thank's for the reply.
    What do you mean by random perspective, i.e. how's the perspective being determined once you start distorting the quad?

    I've had a go at at the suggested grid warp 'work around', but still struggled to get any accuracy in aligning the grids, which makes (unless I'm mistaken) using Madmapper to map anything other than flat colours onto an object near impossible.
    If I am mistaken I apologise, otherwise I'll have to wait for the perspective switch before being able to use it within a performance scenario.
  • franz
    madMapper master
    Posts: 1082
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

    Re: Quad Distortion not matching

    by franz » Sat Nov 26, 2011 8:19 pm

    The quads are what we call "perspective correct", which means they actually stay as quads, just viewed with a specific perspective.
    Matching the edges of 2 quads in perspective assumes that the perspective "physically" matches.
    (= same point of view (POV) and same field of view (FOV))

    In your example, you're not mapping any real object. So basically you have just 2 random perspective, which can never match.
    (or unless you fiddle a lot)

    To match the edges, do as I said: use the grid warp with no subdivision to match the edges.

    Screen shot 2011-11-26 at 7.18.48 PM.png
    perspective correct VS. no perspective
    Screen shot 2011-11-26 at 7.18.48 PM.png (64.26 KiB) Viewed 5851 times


    For the records, Perspective does a matrix transformation, while GridWarp does a vertex transformation.
    If you don't believe me, try with Photoshop... you'll see the same result as MadMapper.
    Perspective rulez !
  • moocha
    junior Member
    Posts: 3
    Joined: Sat Nov 26, 2011 4:17 am

    Re: Quad Distortion not matching

    by moocha » Sun Nov 27, 2011 1:03 am

    Franz - again, thanks for the reply - this has made the perspective concept and the workaround method much clearer.
    I'll look forward to trying things out in reality.

Who is online

Users browsing this forum: No registered users and 36 guests