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 / THE LIGHTS DON'T WORK ANYMORE?????????!!!!!!

Author
Message
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 9th Jan 2003 12:54
Has anyone managed to get the spot light or the point light to work????

They certainly don't work like DB1.13 if at all?

Anyone have a snippet?
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 9th Jan 2003 13:12
You could show us your snippet that doesn't work.

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 10th Jan 2003 01:27
Here's something I made quickly



Here's some code I made quickly. The point light should light up everything except the cone, because the light's inside it, and the plain, because it's too big. Huge polygons won't be lit up effectively due to the way they are rendered, taking light information from it's vertices. The spot light should be facing away from the camera as it rotates, but doesn't light stuff up as I'd expect.
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 10th Jan 2003 04:37
Thanks for the attempt...

But I am trying to get the light to move...
So that I can see it; so I know what it is doing...

Here is an example of the light usage that was attainable from db1.13...

http://www.boyar.net/background/allied2002a.zip

When I load the code into dbpro it looks like a dead planet.

It might be I need to use a 3d object from a 3d program... DBPro seems to favour such objects...

Pulling teeth

It should be a cone of light... Not light shining on a cone...

Maybe it something to do with distance of the light?
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 10th Jan 2003 04:39
rem here is another attempt to get the light moving

make object sphere 1,2

make object cube 2,10
move object 2,20
move camera 20
autocam off
x=object position x(2)
y=object position y(2)
z=object position z(2)
make object plain 3,100,100
move object 3,100

color ambient light rgb(0,0,255)
la=100
lb=100
make light 1
color light 1,rgb(255,0,0)
set spot light 1,la,lb
rem point light 1,0,0,110
fix object pivot 1
do
turn object right 2,.5
set cursor 0,0
lr#=light range (1)
print "light range=";lr#
if inkey$()="s" then inc la:pp=1
if inkey$()="x" then dec la:pp=1
if inkey$()="d" then inc lb:pp=1
if inkey$()="c" then dec lb:pp=1


if pp=1
if la>360 then la=1
if la<0 then la=360
if lb>360 then lb=1
if lb<0 then lb=360
set spot light 1,la,lb
t=timer()
repeat
until timer()>t+50
pp=0
endif
set cursor 0,12
print "Inner;";la;" Outer";lb

if upkey()=1
move object 1,.1
ff=1
endif
if downkey()=1
move object 1,-.1
ff=1
endif
if leftkey()=1 then move object left 1,.1:ff=1
if rightkey()=1 then move object right 1,.1:ff=1
if inkey$()="a" then move object up 1,.1:ff=1
if inkey$()="z" then move object down 1,.1:ff=1


if ff=1
x=object position x(1)
y=object position y(1)
z=object position z(1)
position light 1,x,y,z
ff=0
set light to object orientation 1,1
endif


if inkey$()="h"
cx=camera position x()
cy=camera position y()
cz=camera position z()
position camera cx,cy-1,cz
endif
if inkey$()="n"
cx=camera position x()
cy=camera position y()
cz=camera position z()
position camera cx,cy+1,cz
endif



loop
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 11th Jan 2003 01:41
This spotlight appears to work, but only just. I used more polys so it would show up.



Move the light using the mouse, and the point light commands are commented out.

Login to post a reply

Server time is: 2024-05-18 17:30:09
Your offset time is: 2024-05-18 17:30:09