Jump to content
  • Advertisement
Sign in to follow this  
Zaph-0

Problems with Texturing...

This topic is 3721 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

Hi, I am having problems with distorted textures. In the picture below you can see what I mean: In the upper picture you can see the high LoD version with a big quad drawn by 4 smaller quads and they look perfect. In the lower version, the low LoD version (the one it switches too), the 4 outer vertices have the same coordinates but the texture inside is somehow garbled. I have no idea how that happens. It actually should look quite similar considering of course the lower detail texture and using only 1 quad (4 vertices/2 triangles/1 texture) instead of 4 quads (9 vertices/8 triangles/4 textures). And as I said before the outer 4 corner vertices are the same... Somehow the texture doesn't look right in the low LoD version (the high LoD version looks right) and it causes some serious "popping"... Could someone explain to me why that happens and how I can prevent it ?

Share this post


Link to post
Share on other sites
Advertisement
How are you generating the load LoD?

If you just save the LoD surfaces, how do they look?

Share this post


Link to post
Share on other sites
Hi,

I am not certain what you mean, but the textures are correct. I use for the higher LoD a generated Texture with a grey square with a number and a red border outside it at a high res and for the lower LoD I just copy 4 of them (copyrect) together.

They look correct when I save the texture and look at it. If you check the square right of the 2 I marked on the lower screen you can see that the same texture is used there correctly.

It's just sometimes that the inside is completely deformed for no apparent reason as you can see on the 2 squares I highlighted on the lower screen.

I really have no idea what is causing this...

Could it be some perspective thingy ?



Share this post


Link to post
Share on other sites

Ok, I found the error. I didn't count on the quads being made out of 2 triangles that are not aligned 180° to each other and have a depth component that distorts the texture because of perspective correction.

Is there somehow a way to disable perspective correction for texture mapping in directx ?

Share this post


Link to post
Share on other sites
Quote:
Is there somehow a way to disable perspective correction for texture mapping in directx ?

I think I understand what you are trying to ask. However, remember that textures aren't "perspective corrected." The texture is mapped by the texture coordinates of the vertices and it is the vertex positions which are adjusted by the projection matrix.

If you're creating a perspective texture from the high LOD render and trying to use it as a "flat" texture on a perspective object, you're getting a perspective view of a perspective view.

EDIT: Why not use the same "flat" texture for all LOD's?

Share this post


Link to post
Share on other sites
I am not creating a perspective texture but am using the same for everything the problem is though that while applying the texture the renderer also seems to use the depth information to apply it in a 3 dimensional way.

I think that is called perspective textureing instead of affine texturing.

http://en.wikipedia.org/wiki/Texture_mapping

And I need to know how to turn the perspective off...

I hope that made it somehow clearer...

^_^

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!