Quote: "Quote: "where 2 makes the program retains the colour of the last pixel at the textures edge and paint with that..."
I wouldn't do it that way as you could get blank lines, rather than a smooth edgeless transition. the way I posted of constructing the box out of plains with overlapping edges and the backdrop off I've found to be the best way of doing it. (but you're right to turn filtering off.)"
Wha?
The ,2,0 method works... have you tried it? It seems much cleaner to me to use texture flags than to create faces that are too large. Overlapping stuff makes me worry about Z-fighting, etc.
Here is a tweaked skybox tutorial from the SkyMatter packs free example. At least I think it's tweaked - I put my name on it!!
`Testing Sky Boxes
`======================
`Paul Apgar
`======================
`Main Source File
` Used textures from the "Sky Matter Example".
`Just a simple skybox test
`set display mode 800, 600, 32, 1
set display mode 1024, 768, 32, 1
global dim SkyBox(6) as integer
global dim Texture(6) as integer ` Texture image numbers
global scaleFactor as integer
global textureDir$ as string
textureDir$ = "textures\"
`textureDir$ = "small textures\"
scaleFactor = 5000
autocam off
position camera 0, 0, 0
point camera 0, 0, 100
set camera range 1, 5000
loadTextures()
setupSkyBox()
set ambient light 80
backdrop off
`set text opaque
sync rate 0
do
control camera using arrowkeys 0, 100, 1
text 0, 0, "FPS: " + str$(screen fps())
text 0, 15, "CamAngX: " + str$(camera angle x())
text 0, 30, "CamAngY: " + str$(camera angle y())
text 0, 45, "CamAngZ: " + str$(camera angle z())
text 0, 60, "CamPosX: " + str$(camera position x())
text 0, 75, "CamPosY: " + str$(camera position y())
text 0, 90, "CamPosZ: " + str$(camera position z())
`paste image Texture(1), 100, 100
`if spacekey() = 1 then PITCH CAMERA UP 1
`if returnkey() = 1 then PITCH CAMERA DOWN 1
sync
loop
end
function loadTextures()
Texture(1) = 1
load image textureDir$ + "pos_z.bmp", Texture(1)
Texture(2) = 2
load image textureDir$ + "neg_x.bmp", Texture(2)
Texture(3) = 3
load image textureDir$ + "neg_z.bmp", Texture(3)
Texture(4) = 4
load image textureDir$ + "pos_x.bmp", Texture(4)
Texture(5) = 5
load image textureDir$ + "neg_y.bmp", Texture(5)
Texture(6) = 6
load image textureDir$ + "pos_y.bmp", Texture(6)
endfunction
function setupSkyBox()
` mipmap flag
mipmap = 0
SkyBox(1) = 1
make object plain SkyBox(1), 100, 100, 1
scale object SkyBox(1), scaleFactor, scaleFactor, 100
position object SkyBox(1), 0, 0, scaleFactor/2
point object SkyBox(1), 0, 0, 0
texture object SkyBox(1), Texture(1)
set object texture SkyBox(1), 2, mipmap
set object light SkyBox(1), 0
SkyBox(2) = 2
make object plain SkyBox(2), 100, 100, 1
scale object SkyBox(2), scaleFactor, scaleFactor, 100
position object SkyBox(2), scaleFactor/2, 0, 0
point object SkyBox(2), 0, 0, 0
texture object SkyBox(2), Texture(2)
set object texture SkyBox(2), 2, mipmap
set object light SkyBox(2), 0
SkyBox(3) = 3
make object plain SkyBox(3), 100, 100, 1
scale object SkyBox(3), scaleFactor, scaleFactor, 100
position object SkyBox(3), 0, 0, -(scaleFactor/2)
point object SkyBox(3), 0, 0, 0
texture object SkyBox(3), Texture(3)
set object texture SkyBox(3), 2, mipmap
set object light SkyBox(3), 0
SkyBox(4) = 4
make object plain SkyBox(4), 100, 100, 1
scale object SkyBox(4), scaleFactor, scaleFactor, 100
position object SkyBox(4), -(scaleFactor/2), 0, 0
point object SkyBox(4), 0, 0, 0
texture object SkyBox(4), Texture(4)
set object texture SkyBox(4), 2, mipmap
set object light SkyBox(4), 0
SkyBox(5) = 5
make object plain SkyBox(5), 100, 100, 1
scale object SkyBox(5), scaleFactor, scaleFactor, 100
` For some reason ground needs to be turned 270 degrees....
rotate object SkyBox(5), 0, 0, 270
fix object pivot SkyBox(5)
position object SkyBox(5), 0, -(scaleFactor/2), 0
point object SkyBox(5), 0, 0, 0
texture object SkyBox(5), Texture(5)
set object texture SkyBox(5), 2, mipmap
set object light SkyBox(5), 0
SkyBox(6) = 6
make object plain SkyBox(6), 100, 100, 1
scale object SkyBox(6), scaleFactor, scaleFactor, 100
` For some reason sky needs to be turned 90 degrees....
rotate object SkyBox(6), 0, 0, 90
fix object pivot SkyBox(6)
position object SkyBox(6), 0, (scaleFactor/2), 0
point object SkyBox(6), 0, 0, 0
texture object SkyBox(6), Texture(6)
set object texture SkyBox(6), 2, mipmap
set object light SkyBox(6), 0
endfunction

A 3D marble platformer using Newton physics.