• Advertisement
Sign in to follow this  

Cube map problems - please help

This topic is 4903 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'm trying to texture a sphere (representing a planet), by using cube maps. I think I understand the concepts fully, and have got it working, however I can't get the seams of the cube to match up properly. I'll try to demonstrate - here's a screenshot of my application; its just a sphere set to use the 'lobby.dds' taken from a DirectX 8.1 sample. I've highlighted the seam of the front cube face, to aid clarity. Assuming that the sample cube map is correct (as it is taken from a Microsoft sample), the problem must surely be the texture coordinates. The sphere is centered at the origin, and I set the texture coordinates (a 3D unit vector 'uvr') equal to the position vector of the vertex (vector 'xyz'), for example: D3DXVECTOR3 uvr = xyz; Does anyone have any idea what the problem might be? Alternatively, would anyone mind posting any of their own code, on how to calculate the texture coordinates for each vertex? As always, your help is extremely appreciated. P.S. I've tried to keep the initial description brief, please ask if any code extracts would help.

Share this post


Link to post
Share on other sites
Advertisement
I don't know how you render the sphere by texture.
May you post your some codes?
In general ,there will not be seams unless you use different method to calculate the reflection line for texture cooridinate.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement