Archived

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

trysil

projecting a a cloudmap on a skydome

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


Link to post
Share on other sites
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
Share on other sites
Guest Anonymous Poster
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)

Share this post


Link to post
Share on other sites