Sign in to follow this  
troxtril

Texture deformation in Orthographic projection

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this