Jump to content
  • Advertisement
Sign in to follow this  
troxtril

Texture deformation in Orthographic projection

This topic is 2855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!