Skyboxes or Skydomes

Started by
17 comments, last by k00k 18 years, 8 months ago
What do you guys think is the easiest to implement a SkyBox or a SkyDome, I currently have my SkyBox setup as just a simple Mesh Cube with the Textures backfacing so that you can see them inside the Cube. but im wondering if it would be easier or even better to Not use a Mesh and draw it manually for either the box or a dome scenario? Also does anyone have any good tutorials for Creating Sky Boxes or Domes with Code Examples not just theory. How i do it now is simply load the mesh up into memory .. then when rendering i turn the zbuffer off, turn lighting off, set cullmode to none, then render the skybox, then turn everything back on and then continue to render my terrain. is this also the correct method in doing this or .. thanks for any input guys soon ill post up some screen shots of what I got going so far. ttyl
Advertisement
Skyboxes are easier, certainly. Also, I use them because I find a lot of source art for skyboxes (ie 6 textures - up, down, left, right, foward, and backward).

Turning the zbuffer off should be ok, as long as you render the skybox first. Also, have you set your AddressU and AddressV sampler states to D3DTADDRESS_CLAMP? That should hide any seams in the box.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
this is a good skybox tutorial
and this is a site with skybox textures
if you want more textures search in google you will find more
Quote:Original post by circlesoft
Skyboxes are easier, certainly. Also, I use them because I find a lot of source art for skyboxes (ie 6 textures - up, down, left, right, foward, and backward).

Turning the zbuffer off should be ok, as long as you render the skybox first. Also, have you set your AddressU and AddressV sampler states to D3DTADDRESS_CLAMP? That should hide any seams in the box.


Thanks guys for the great responses. Ya I have to work on my effect file a little more to smooth out the edges in the skyboxes because there completely visible. do you happend to have any code snips from how you go about adjusting the address_clamps int eh effect files? im bout to hunt down some of this in google see what i can find. thanks for the heads up
Yea, just like this:

sampler TextureSampler = sampler_state {    texture = <diffuseTexture>;    AddressU  = CLAMP;            AddressV  = CLAMP;    AddressW  = CLAMP;    MIPFILTER = LINEAR;   // Your other states here    MINFILTER = LINEAR;    MAGFILTER = LINEAR;};
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Thanks man that seem's to help a little bit .. but here is what im still looking at in my skybox mabey you can help ..




here is a front shot ..



mind the wonderful FPS lol my laptop's ATI card is not the greatest but it works :)
I think it's using wrap or mirror mode. As a previous poster suggested, you need to set the addressmode to clamp.
here is the sampler setup from my effect file ..

float4x4 worldMatrix;	        // World matrix for objectfloat4x4 worldViewProjection;	// World * View * Projection matrixtexture  sceneTexture;sampler  g_samScene =sampler_state{        Texture = &lt;sceneTexture&gt;;    AddressU  = CLAMP;            AddressV  = CLAMP;    AddressW  = CLAMP;    MinFilter = Linear;    MagFilter = Linear;    MipFilter = Linear;};void VertScene( float4 Pos : POSITION,                float2 Tex : TEXCOORD0,                out float4 oPos : POSITION,                out float2 oTex : TEXCOORD0 ){    oPos = mul( Pos, worldViewProjection );    oTex = Tex;}float4 PixScene( float2 Tex : TEXCOORD0 ) : COLOR0{    return tex2D( g_samScene, Tex );}technique RenderScene{    pass P0    {        VertexShader = compile vs_1_1 VertScene();        PixelShader = compile ps_1_1 PixScene();    }}


am i missing something else?
If it helps, here is a good article on sky domes.
....[size="1"]Brent Gunning
k00k, I'm using skybox textures from the same site, using FF not shaders, setting the addressU/V the same as you, and getting the same problem! Have you solved it yet?

This topic is closed to new replies.

Advertisement