Seamless Skyboxes?
Hello,
Is a proper skybox really just about putting the world inside a large box? When I do this, no matter the resolution of the texture or the size of the box, it is possible to make out seams. Also even if I alter the textures, some perspective is still visible as the further textures get smaller.
Whats the secret to good skyboxes and how do you make them seamless?
Many thanks,
~ Goatie
the key is to first make them seamless by offsetting the texture coordinates. i do this by getting the texture description and offsetting by 0.5f.
for the perspective i take the current view matrix and 0 the translation element so that the box moves in concert with my camera.
Dredd
for the perspective i take the current view matrix and 0 the translation element so that the box moves in concert with my camera.
Dredd
Make sure you''re not using texture wrapping. This will cause visible artifacts when you use linear filtering.
Set your texture address mode to D3DTADDRESS_CLAMP for the u/v coordinates.
---
http://www.gapingwolf.com
Set your texture address mode to D3DTADDRESS_CLAMP for the u/v coordinates.
---
http://www.gapingwolf.com
Even with clamping I still had seams. The only way I could get rid of them was to offset the texture coordinates by 1/1000th. For example instead of a tex coordinate being (0,1) it would be (0.001,0.999).
ATS
ATS
It doesn''t solve the problem, at least not on my computer, but if the hardware vendors would add bilinear filtering between texels that are on different faces from a cube map, you could use a cube map with your sky texture and draw one quad as background with the appropriate texture coordinates. too bad they just clamp the texture if it''s near the edge of the cube map.
My Site
My Site
quote:Original post by drewslater
The only way I could get rid of them was to offset the texture coordinates by 1/1000th. For example instead of a tex coordinate being (0,1) it would be (0.001,0.999).
ATS
The correct offset amounts depend on the resolution of the texture. IIRC it should be:
(1/textureWidth, 1 - 1/textureHeight)
quote:Original post by OrangyTangquote:Original post by drewslater
The only way I could get rid of them was to offset the texture coordinates by 1/1000th. For example instead of a tex coordinate being (0,1) it would be (0.001,0.999).
ATS
The correct offset amounts depend on the resolution of the texture. IIRC it should be:
(1/textureWidth, 1 - 1/textureHeight)
Interesting. I just tweaked the values manually and what I posted worked well for 512x512 and 1024x1024. I''m iterested to know if this is method will make it look right on most(if not all) cards. Looks great on all the ones I''ve tried it on.
ATS
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement