Jump to content
  • Advertisement
Sign in to follow this  
k00k

Skyboxes or Skydomes

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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;
};

Share this post


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

Share this post


Link to post
Share on other sites
I think it's using wrap or mirror mode. As a previous poster suggested, you need to set the addressmode to clamp.

Share this post


Link to post
Share on other sites
here is the sampler setup from my effect file ..



float4x4 worldMatrix; // World matrix for object
float4x4 worldViewProjection; // World * View * Projection matrix
texture 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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!