A simple way is to create a SkySphere.
The Skysphere will be a ball around your camera with a nice texture painted on the INSIDE. Then some code to ensure the SKYSPHERE is always drawn behind everything else to make it seem like the sky is naturally further away.
This achieved by the following:
skybox=CreateSphere(50) ; creates a smooth looking ball
ScaleEntity skybox,1.9,1.9,1.9 ; makes the ball just large enough fit around the camera
FlipMesh skybox ; Ensures the sky texture is painted to the INSIDE of the ball.
skytexture=LoadTexture("SkyTexture.bmp",777)
EntityTexture skybox,skytexture
FreeTexture skytexture
EntityFX skybox,1 ;stops any local lighting factors affecting the sky
EntityParent skybox,cam
EntityOrder skybox,999 ; always draw the Sky first
---EDIT---
Remeber in your main loop, you will need to add:
RotateEntity skybox,0,0,0,1
This will stop the Sky turning with the camera.
If you wanted more specifically to change between daytime/nighttime, that's a little more detailed. There was some code elsewhere in this forum, Il try and find it if necessary.
---------------------------------
Edit (Again) A mmore complicated aproach, but for better results is a SKYBOX, which uses a cube around the camera: the tutorial for using Terragen (which can be downloaded free is very useful)
http://www.blitzbasic.com/Community/posts.php?topic=56962
|