Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / what goes on with ambient?

Author
Message
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2003 00:01 Edited at: 5th Aug 2003 00:31
first I tried to make a matrix react to ambient light but it refused to play, so I listed it as a bug, then I was told I would have to set the matrix vertices to make it respond to light with a chunk of code that trawls through the matrix and sets it up to respond to light (why?), now it responds to ambient light but when I try to shine a spotlight on it nothing happens, so I put some objects in the scene and they respond to the spot, right!, so must be doing something wrong with the spotlight, so look in the help and load light2-example.dba, now I am scratching my head (and I don`t have much hair left anyway), the example responds to ambient light and spotlights....and it doesn`t have any code to set the matrix vertices to respond to light, works with spots, ambient, negative light, Doh!, but my matrix (I won`t post code...just make and texture a matrix and then make a spotlight that points straight down at it to make a highlight on the floor with a beam width of 20deg inner 25 outer) the floor won`t respond, refuses to light up even when you scatter spheres over the floor and they respond to the light, yes, I have used set matrix, still no results, what gives here?, and how come the example seems to work fine when a simple matrix and one light won`t?

Mentor.

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2003 03:17
Tell me about it!

See my little demo below for different types of lights on a matrix.

Cursors to move, 0-3 = different lights

The programmer formerly known as sonic
ICERGB
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 5th Aug 2003 11:06
Also,
I found that if your ambient light is set to strong it will easily wipe out any spot lights you can see.
Directional ambience can make big difference to.

<Drove me nuts for a while>
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2003 12:40 Edited at: 5th Aug 2003 12:43
sorted , "set light range" affects intensity, I thought it was just an abrupt cut of (like "set camera range") but it has more finesse than that and fades away over the set range, I was putting the spotlight 200 away from the matrix and setting the range to 201, you couldn`t see the light at that, then I was playing about and set the range to 300 and you could see a dim light, so I set the range to 5000 and it was bright enough to see clearly, so "set light range" realy should be called "set light intensity", I don`t normaly make software with effects, but I just had an idea for a game that needs effects to work, so I guess I have to figure out how to make them do what I want

Mentor.

Ps: thanks for the code but, it still don`t explain why matrixes ignore ambient (but if you hide ambient they go black)

Login to post a reply

Server time is: 2026-07-23 02:10:19
Your offset time is: 2026-07-23 02:10:19