Light colour
Blitz3D Forums/Blitz3D Beginners Area/Light colour
| ||
I was woundering if it is possible to change the colour (color to silly people) of a light (their deosn't seem to be a way, but it's somthing blitz should have) can you change the colour of a light (not an ambient light) ? |
| ||
LightColor() not working? |
| ||
I was under the impression that it seosn't actually change the colour, it deosn't seem to Sets the color of a light. An r,g,b value of 255,255,255 will brighten anything the light shines on. An r,g,b value of 0,0,0 will have no affect on anything it shines on. An r,g,b value of -255,-255,-255 will darken anything it shines on. This is known as 'negative lighting', and is useful for shadow effects. yea it deosn't change the colour for me, only the brightness |
| ||
This works fine. Note that unlit surfaces will be effected by AmbientLight, so its best to use LightColor and AmbientLight alongside each other, rather than expecting an all-round solution from one or the other.Graphics3D 800,600 AmbientLight 0,0,50 ;Comment this line out to prove that LightColor does actually work cube = CreateCube() camera = CreateCamera() light = CreateLight(2) MoveEntity light,-4,4,-4 LightRange light,10 MoveEntity camera,0,3,-10 LightColor light,0,0,255 While Not KeyDown(1) TurnEntity cube,0,1,0 RenderWorld() Flip Wend |
| ||
yea yours definetly works, i think mine is tangled in a jumbled mess of if comands, thanx for the enligtenment. |
| ||
ok it wasn't the if's afterall it was to do with the use of lightrange and lightconeangles. |