Sign in to follow this  
cheese

Cube map problems - please help

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

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