Creating a sky sphere?

Started by
0 comments, last by Illco 17 years, 12 months ago
Hi I've currently got a skybox for me space game, but I want to implement a sky sphere. I'm not sure where to start though. First is it possible to use D3DXCreateSphere to create the mesh? Like i've been able to create a sphere with the triangles facing outwards, but how would I make them face inward for a sky? And also how would I map texture coordinates to the mesh? As in the dx docs it says the D3DXCreateSphere only uses the fvf D3DFVF_XYZ | D3DFVF_NORMAL. Also if there are any tutorials, as I am having a hard time finding any. Thanks
Advertisement
You can use the sphere created by D3DXCreateMesh. If you clone the mesh you can indicate new FVF flags (D3DXCloneMesh if I'm correct); ommit the flag for normals. You can render the mesh with reversed culling (D3DRS_CULLMODE) and it will appear folded inside out. Be sure to turn off lighting. Heck; you don't even have to clone it; with lighting off the normals simply don't bother anyway.

Alternatively you can use a 3D modeling package to produce the sphere (dome).

Illco

This topic is closed to new replies.

Advertisement