#### Archived

This topic is now archived and is closed to further replies.

# projecting a a cloudmap on a skydome

This topic is 5974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi! I'm looking for a algorithm for projecting a sky texture on the inside of a dome. The problem is that the sky texture is square and the dome is, well... dome shaped. What I'm looking for in particular is a way to calculate texture coordinates for the triangles strips and fan that defines the skydome. "A witty and slightly sarcastic quote from an unkown source" -- The generic SIG /trysil Edited by - trysil on February 7, 2002 4:37:55 AM

##### Share on other sites
hi tyrsil,

I made some balls (domes) using polar 3d coords. You can use the normalized vertices as normal vectors and then can do envmapping. Use normal.x, normal.y as (u,v) into texture.

Ofcourse I don''t know exactly how this looks with a skymap. But I figure with some rotation of the normals you can get the sky moving a bit.

Pieter (earx)

PS btw, how do you generate the dome? I use the polar way by drawing circles around the y-axis.

##### Share on other sites
I do it the same way I. At certain interwalls I calculate the x,y and z coordiates of the
vertices based on the distance to the skydome from the origin. Theese I use when
creating the triangle fan and triangle strips. This is done at loadtime, but since I
use animated noise for the clouds I need to find an algorithm to map this on the
dome without to much effort.

"A witty and slightly sarcastic quote from an unkown source"
-- The generic SIG

/trysil

##### Share on other sites
seems to me either you rotate the normals and use n.x as u and n.y as v, or you wrap the texture around.. ofcourse you need some wrappable texture for that.

hope this will help.

pieter (earx)

1. 1
2. 2
3. 3
4. 4
Rutin
16
5. 5

• 12
• 9
• 12
• 37
• 12
• ### Forum Statistics

• Total Topics
631419
• Total Posts
2999981
×