Sign in to follow this  
Axiverse

Calculating texture cordinates

Recommended Posts

Axiverse    366
I created a geosphere, but am having a few problems putting texture coordinates on it. The problem is that where the texture wraps around. as the geosphere is created from tessellation and not angles, I can't calculate it that way. Instead I'm using this: (theta of (x,y) / 2pi + 0.5, asin(x)/pi + 0.5) There are some triangles whose theta values for the vertex have different signs, so it basically goes from zero to one. But does anyone have any ideas how to solve this problem? Image of defect

Share this post


Link to post
Share on other sites
LilBudyWizer    491
I take it "theta of (x,y)" is atan2(x,y) and asin(x) is asin(z) or some permutation of the x's, y's and z's? My only guess it that your problem is when you wrap from 0 to 1. Perhaps pretty much drawing the complete width of the image across one polygon. Like perhaps them strips out in the indian ocean are africe, south america and indonesia.

Share this post


Link to post
Share on other sites
tksuoran    186
You need to figure out where the texture coordinates wrap, and duplicate those vertices. By duplicating I mean that the vertex positions are the same, but the texture coordinate t0 on one vertex is in the range 0..1 and the other vertex has texture coordinate t1 = t0 + 1, being in range 1..2.

With slices and stacks spheres it is trivial to 'duplicate', by creating slice edge vertices both at 0 and 2*Pi - their positions will end up same, but the texture coordinates will be different.

Share this post


Link to post
Share on other sites
LilBudyWizer    491
How did you do that? Specifically how did you get the URL for that page? I know they use to have a place you could click to copy the URL, but I searched all over and just couldn't see it.

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