skybox cracks

Blitz3D Forums/Blitz3D Programming/skybox cracks

Ruz(Posted 2003) [#1]
just wonder if there was anyway to get rid of the 'cracks' in skyboxes. i had the same probs in uT2003. basically where each face meets, there appears a white line. its almost like each face has shrunk a little .perhap;s texture stretching?
Anyone have a workaround


Caff(Posted 2003) [#2]
Try turning off mipmapping when you load the texture (flag 8, I believe) to see if that helps.


Caff(Posted 2003) [#3]
-


Ruz(Posted 2003) [#4]
ahh, sounds like a good idea, will try that


sswift(Posted 2003) [#5]
It's quite simple to work around.

0,0 is the top left corner of the top left pixel in your skybox image. 1,1 is the bottom right corner of the bottom right corner of your skybox image.

You need to scale the texture up by one pixel on the X and Y axis, and move it up and left by half a pixel. Then these two points will be in the CENTER of the texels at the corners, and you won't have bleeding from the opposite sides of the texture.

Alternatively, when you load the textures, set the texture flags on the load command to enable U clamp and V clamp. Then bilinear filtering won't grab pixels from the opposite edges.


Ruz(Posted 2003) [#6]
cheers, sswift , will try that tomorrow


Ruz(Posted 2003) [#7]
hey that worked, thanks.
used the texture filter using 16 and 32 flags


JoshK(Posted 2003) [#8]
Set the CameraClsMode to 0,1 or 1,0, or forget which...if the problem is cracks in geometry.


sswift(Posted 2003) [#9]
Halo, how is it that you can write the "Best physics engine EVER!" and yet you have difficulty grasping the whole "texture's bleed at the edge of my skybox" issue, and until a week ago you apparently had no clue that UV clamping existed? :-)


JoshK(Posted 2003) [#10]
He said "skybox cracks", which sounds like those little flecks of background you see through skyboxes sometimes.


Ruz(Posted 2003) [#11]
its when there are cracks in the 'real' sky I will start to worry


jfk EO-11110(Posted 2003) [#12]
:)
BTW. If you load the Skybox with automatic Textures Loading (like DarkMatter Skyboxes) then you might use this:

cleartexturefilters
texturefilter "",48 or whatever
thingy=loadmesh("skybox.3ds")
cleartexturefilters
texturefilter "",9 ; reset to defaults


Ruz(Posted 2003) [#13]
What is the clear texture filters for?. have been ignoring it so far.
just been doing
textureflter "blah.bmp", 16, 32
textureflter "blah1.bmp", 16, 32
textureflter "blah2.bmp", 16, 32.
seems to cause massive frame rate slow down when I use clear texture filters .
BTW ,My skyboxes are just 3dsmax cubes with terragen textures mapped to em


sswift(Posted 2003) [#14]
normally the mipmap and color filters are automatically applied no matter what you type for the filter parameter.

Cleartexturefilters disables that automatic setting. You can change the automatic settings to something else too, but I think that's pretty worthless.

Anyhow, the slowdown is because you no longer have any mipmaps on. full size textures are used all the way into the distance. And 3d cards don't like that.

The end.


Ruz(Posted 2003) [#15]
gotcha, thanks sswift