skysphere solved

Started by
0 comments, last by comedypedro 18 years, 5 months ago
I finally figured out how to make a skysphere for my space game. And even though I am probably the only person who has trouble with things like this, I still thought it would be nice to post what I did, just in case it might help anone else. 1. Load up Milkshape and create a GeoSphere centered on the origin. 2. Export this object to a Wavefront .obj file. 3. Load UV Mapper Classic, and open the .obj file from Milkshape. 4. Select Edit--> New UV Map--> Box (Box seems to keep most of the triangles their original size. 5. Scale and move the Vertices in UV mapper to fit nicely on the screen. 6. Save the object in UV Mapper and save the texture in UV Mapper. 7. Now you can load the texture up in a paint program and draw your stars or whatever. If your using OpenGL you can then resize the texture to something like 512x512. 8. Open Milkshape again, and import the .obj file saved from UV Mapper. 9. Create a new material with the texture you created, and apply it to the object. 10. Now you can save the object in the .ms3d format (milkshape format). 11. Go read up on the tutorial for loading milkshape models at www.nehe.gamedev.net 12. In your own program you can scale and position the sphere, also you can inverse the order of drawing so the sphere faces inward (sky sphere style) 13. Just remember to draw the sphere first, before other objects, and use glDepthMask() to keep the sphere from depth sorting, and most importat, keep the sphere positioned with its center at the camera location. Thats it Well I hope this might be of some help to someone.
Advertisement
You can also use a gluQuadric to draw backdrops, much less hassle involved!! A few lines of code and glu can even generate UV coords for you.

This topic is closed to new replies.

Advertisement