We get it. We use ad blockers too. But GameDev.net displays them so we can continue to be a great platform for you.
Please whitelist GameDev.net and our advertisers.
Also consider a GDNet+ Pro subscription to remove all ads from GameDev.net.
Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 29 June 2009 - 02:45 PM
Posted 29 June 2009 - 04:45 PM
Posted 29 June 2009 - 05:03 PM
Posted 29 June 2009 - 05:23 PM
Quote:
Original post by Emergent
Can't always be done. Not all quads can be transformed by an affine transformation to a unit square. In fact, only parallelograms can...
Of course, here I'm assuming you want to map a 2d quad to a 2d square. Do you actually want to infer perspective or something? Then you have more degrees of freedom...
Posted 29 June 2009 - 05:27 PM
Quote:
Original post by Dave Eberly
The perspective mapping between two *convex* quadrilaterals is described in this 1-page document: Perspective Mapping.
Posted 30 June 2009 - 01:19 AM
Posted 30 June 2009 - 03:09 AM
Quote:
Original post by Kuroyume0161 Quote:
Original post by Dave Eberly
The perspective mapping between two *convex* quadrilaterals is described in this 1-page document: Perspective Mapping.
How would this relate to matrix transformation? As I stated, this must go both ways with an inversion of the quad-to-unitsquare after some processing.
Thanks!
Posted 30 June 2009 - 03:12 PM
Quote:
Original post by Kuroyume0161
You assume correctly. :) A 3D quadrangle polygon has been transformed to the world center and 'placed' on the X-Z plane so that its y-values are 0.0f (essentially a 2D quadrangle). Now I want to matrix transform it to a unit square (on the same plane)
(u1,v1)------(u2,v2)Then to all points in triangle A you can perform the affine transformation
| . B |
| . |
| A . |
(u3, v3)-----(u4,v4)
Posted 30 June 2009 - 03:26 PM
Posted 30 June 2009 - 04:56 PM
Posted 01 July 2009 - 05:23 PM
Quote:
Original post by Emergent
Apologies... I wasn't familiar enough with homographies, so my whole previous post may be pointless. alvaro: I haven't thought about this much; can a homography map between any two quads in R^2? Are there any restrictions on the types of quads that can be mapped to each other?
Posted 01 July 2009 - 05:55 PM
Posted 02 July 2009 - 02:15 AM
Quote:
Original post by alvaro
Hmmm... It's been too long since I was comfortable with this subject. You can convert any projective reference into any other projective reference. Projective references in the plane are sets of 4 points such that any 3 are not collinear. It might be the case that the homography will send a line that intersects the quadrilateral to infinity, which might not satisfy your idea of "mapping between two quads". My intuition tells me this would happen when you try to map a convex quad to a non-convex quad, but I am not completely sure.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.