views:

280

answers:

2
+3  Q: 

Procedural skydome

Does anybody know how to or where I can find info related on how to do a procedural skydome? Any help is welcome.

+2  A: 

See this thread from GameDev. There's some example code in C++ in there too.

Jeff Foster
I don't think they're discussing what I've asked. I want to generate a skydome mesh procedurally, not to change the texture that's applied, nor calculate it automatically (though I may do something like that in the future so it's an interesting read anyway, thanks for that.)
webdreamer
Why do you want to change the mesh? the whole point of a skydome is to be arbitrarily far away. So, almost by definition, the mesh isn't really important: you choose a simple, fixed set of polys (e.g., a giant box) and use textures to draw the skydome. If that's not what you mean by a "procedural skydome", what *do* you mean?
comingstorm
Er, let me correct myself: the mesh can be in the shape of a sphere (which is what makes it a dome), but generally you will use textures in the shape of a giant box. These textures are what determines the color of the sky at any particular point -- so when you asked for info on a "procedural skydome", we assumed you wanted to replace these textures with a procedural shader of some sort.
comingstorm
I wasn't sure how to call it, I'm sorry if the question is confusing. What I want is to create a sphere procedurally; I know what a skydome is. I'm also going to do some sort of procedural shader to apply to the skydome, but I'm going to do it after, and I have it more or less figured out. I'm still kind of a newbie on computer graphics, with much to read and learn, sorry if my question was confusing.
webdreamer
+1  A: 

A skydome is simply a sphere, drawn around the entire level. Just draw a sphere, make sure back face culling is off, and front face culling is on (since you're inside the sphere).

To procedurally generate a sphere is trivial, my usual approach is to start with a hardcoded Icosahedron and subdivide the faces until the required detail is reached. There is a thread on gamedev about generating a sphere: http://www.gamedev.net/community/forums/topic.asp?topic%5Fid=537269

I'm not sure that really answers your question, seeing your response to the other answer makes me think there is some confusion about what a skydome is. To reiterate it's just a sphere, the important bit is the texture you draw on it.

Martin