PDA

View Full Version : how do I texture on the inside of a sphere?



dodgyposse
05-04-2001, 04:36 AM
I am writing a 3d space trading simulation,
and would like to add a textured backdrop to my world.

My ideal way of doing this would be to apply a texture to the inside of a sphere which I would draw relative to my viewpoint.

Has anyone got a good way of doing this?

dd

DaViper
05-04-2001, 04:47 AM
do a search on skyboxes in the forum, there sould be your answer.

Chris

Nutty
05-04-2001, 07:30 AM
My cube mapping demo has code in to render a skybox from 6 textures. Pretty simple.

Few points. These might be simplistic, but I'm sure some people dont know this.

1) Render the sky box first without Z writing. This way you dont have to worry about the size of the sky box, as nothing will ever pop out of it.

2) With skyboxes you are rendering the entire frame buffer, so dont bother clearing the color buffer, just Z buffer each frame.

3) If you want to render your own skyboxes, make sure you use a FOV of 90 degrees.

Nutty www.nutty.org (http://www.nutty.org)