Texture deformation in Orthographic projection

Started by
2 comments, last by KulSeran 13 years, 6 months ago
I would like to write a mesh warper in 2d orthographic projection mode but apparently even in simple Quads, texture on mesh deforms as triangles;

for example:

before warping

.---.
|1*/| 1) not deformed
|*/*| 2) not deformed
|/*2|
.---.

after warping

.---.
|1./*\ 1) not deformed
|*/*2*\ 2) deformed
|/*****.
.---------.

I want both 1 and 2 deformed uniformly after warping even with more tessellated polygons. isn't this possible in orthographic projection?

edit: ok. sorry for my ascii art fail :)
Advertisement
it may just be me, but it's hard to tell what you're asking.

If you put you're ascii art between "pre" html tags or "code" tags, it should work. Or you can upload an image.

As far as I understand you're try to change the shape of a 2D mesh using texture displacement maps. I assume this is done in the vertex/geometry shader? I'm not sure what your problem is though.
have you tried breaking your texture into smaller sections and somehow linking the verticies together, so when one is pulled, it pulls the others? Kinda like cloth simulation.

ie, make one square actual 4 little squares, that are each two triangles?
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.
Graphics APIs only understand triangles. Any mesh, even a quad, is represented only as triangles. You will likely have to come up with the math to describe the image you want, and apply it in a shader. Though I'm unsure of how you would describe the transform mathmatically.

This topic is closed to new replies.

Advertisement