Whenever I show my sky object, the terrain I have gets all dark. However, when the sky object is hidden (still loaded but just hidden) it looks fine. Has anyone had this sort of problem before? I'm not sure if it is a bug or my fault. Here are my loading functions:
function LoadTerrain()
` load base and detail texture
tex=FreeImage()
load image "terrain/texture.bmp", tex
det=FreeImage()
load image "terrain/detail.tga", det
terob=FreeObject()
make object terrain terob ` create the terrain object
set terrain heightmap terob, "terrain/map.bmp" ` set the heightmap
set terrain scale terob, 3, 0.6, 3 ` set the scale
set terrain split terob, 16 ` split value by 16 * 16
set terrain tiling terob, 4 ` detail map tiling
set terrain light terob, 1, -0.25, 0, 1, 1, 0.78, 0.5 ` light - xdir, ydir, zdir, red, green, blue, intensity
set terrain texture terob, tex, det ` base and detail texture
build terrain terob ` finally build the terrain
endfunction
function LoadSkybox()
intBoxNum = FreeObject()
load object "skycielo.x", intBoxNum ` the box is a 3D cube named cielo
set object light intBoxNum, 0 ` lighting is baked into the textures already
set object texture intBoxNum, 2, 1 ` avoid those messy seams at the edges
scale object intBoxNum, 30000, 30000, 30000 ` skies are big...
position object intBoxNum, 0,0,0 ` center the box
position camera 0,0,0 ` put camera INSIDE the box
endfunction
I've attached a screenshot to show the problem.
Get Decal Maker now and make your own decals for FPSC as easy as clicking your mouse!
Click Here!