# Thread: Skydome techniques

1. ## Skydome techniques

I`m looking for an effective method to generate the vertices of a skydome, given the radius and height. Any ideas?
Thanks.

2. ## Re: Skydome techniques

Check on www.flipcode.com in the development tutorials section, there was on on sky domes a while ago.

Nate Miller

3. ## Re: Skydome techniques

I`ve seen this turorial, I wonder could someone tell me what that following Matrix member methods do:

m.MakeHPR(0, fVertSweep * (i + 1), 0);
m.PreMultiply(vPoint, vPoint);
m .SetHPR (fHorzSweep * j, 0, 0);

Thanks

4. ## Re: Skydome techniques

I dont know exactly whats going on in that code, but this is the way I do mine you can see the demo at http://www.geocities.com/kyberteknik there is no code, but its quite a long complicated peice anyways so I'll just tell you how it works (the theory is alot easier than my implementation

Basically:

You have a "player" camera that is travelling around the world.

You have a box (dome/whatever) centered around the origin (mine's actually off in space somewhere like Unreal's).

You then yaw/pitch and roll your new matrix to the same as your "player" camera and center it on the origin, then draw the sky [box/dome/whatever] then you change back to your "player" camera and draw the rest of the world.

I think thats clear.. but if not just let me know I'll gladly elaborate

in psuedo-code it would be something like this:
Code :
```Load camera matrix without translation
DrawSkyBox
Load camera matrix with translation
DrawWorld```
The theory behind how the thing works is basically, the sky is so far away that it doesnt actually move, thats why the camera is always centered on the origin and so is the skybox the world moves around "under" the sky. If you have a really big world you have to do other trickery though (and I mean a HUGE world, one that you want to physically travel partially around the globe, like in Asheron's Call). But thats not even that hard, just rotate the skybox by your latitude and longitude on your world and your set.

Ack... lots of writing, I've probably just confused you more. Like I said, just ask away and I'll try to help.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•