Skip to main content
GameDev.net gamedev.net
🔒 Locked

Skybox Artifacts

Started by mbalrog6 Feb 16, 2011 at 7:58 AM 2 replies 4.6k views
Original Post
mbalrog6
mbalrog6
Hello all. I have gone ahead and read a few chapter in advance. I have implemented the skybox content pipeline example in the book. It seems to work fine except that at the top and bottom faces of the skybox, for all sides except the front side a line occurs at the seam. Here is a link to an image of what I am seeing. I have circled the visual artifact in green. I have downloaded the skybox texture from a free sample site and converted it to the format needed for the content processor.

skybox-artifact.jpg


The skybox texture can be found here:

http://dl.dropbox.com/u/9337327/skybox3.png

If anyone can shed some light on why this is happening and how it can be compensated for I would appreciate the help.
thank you.
Sammie22
Sammie22
Did you have these issues using the skybox texture provided on the cd? I am working through this chapter now so don't have any input for you beyond checking the texture on the cd and looking for differences (perhaps in size / aspect ratio).
Erik Rufelt
Erik Rufelt
That is caused by bilinear filtering, and wrapping at the edges. Try using clamping instead of wrapping, which should fix part of it. However, some edges might still be visible. The reason is that with bilinear filtering the pixels neighboring the white part of the image are averaged with white when scaled, to give a smooth appearance. Normally this is desired, but when you tile textures in a single larger texture it can give you artifacts. The solution is to put borders along the textures that have the same color as the texture it is supposed to blend with. For example your four images at the top of the skybox texture blend perfectly into each other in the image, so therefore you don't get any artifacts at those edges.
mbalrog6
mbalrog6

That is caused by bilinear filtering, and wrapping at the edges. Try using clamping instead of wrapping, which should fix part of it. However, some edges might still be visible. The reason is that with bilinear filtering the pixels neighboring the white part of the image are averaged with white when scaled, to give a smooth appearance. Normally this is desired, but when you tile textures in a single larger texture it can give you artifacts. The solution is to put borders along the textures that have the same color as the texture it is supposed to blend with. For example your four images at the top of the skybox texture blend perfectly into each other in the image, so therefore you don't get any artifacts at those edges.


Thank you for the information that makes perfect since. I will try fixing that tonight when I get home.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.