Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Cracking Sky when using spherical distorted map on planar mapping

Recommended Posts

After generating a spherical distorted map (or just polar distorted) in Photoshop and creating planar mapped mesh in max, when I match up the parts together, I get a cracking sky right at the top..
I assume the texture is good enough, you can find the tutorial from the web, so the problem lies in probably in the u,v of the mesh. Since we are no artists, I don't want to always bake the u,v out of the dcc, I wish I could make 2 functions which create the standard planar mapping u,v and spherical mapping u,v on the fly, right built into my application. More then often, the standard ones are good enough. But How do I find the math?

So this picture exhibits the cracking situation:

sky.thumb.png.c8862e3f490e63c95c29bfead368f7fd.png

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement

Having a divine spike, when

for (int i = 0; i < numVerts; i++)
        {
            D3DXVECTOR3 v;
            v = pVerts.pos - vCent;
            D3DXVec3Normalize(&v, &v);
            pVerts.norm = v;
            pVerts.tu = 0.5 + (atan2(v.z, v.x) / (2*D3DX_PI));
            pVerts.tv = 0.5 - (asin(v.y) / D3DX_PI);
              
        }

sky2.thumb.jpg.0a298dcca1eb91bd3bbd24f609f52d4b.jpg

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  

  • 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!