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 Discussion / 3D Lighting

Author
Message
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 1st Nov 2002 22:28
Hi, this is the first time ive experimented with 3d lights (ive never needed them before). But i cant get them working. My car needs to have headlights in order to see in the dark. I dont know which type of light to use (i was going to go through them all to see which one best suits the scene).

Before loop:


Inside loop:


It just doesnt seem to work, ive tried hiding light zero and all sorts but i cant see light one ever. Please help me, thanx peeps
www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 1st Nov 2002 22:56
I'd use a spotlight, set spot light number, inner angle, outer angle. However, I can't see to get this to work either. Hmm... have you tried setting the ambient light lower?
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 2nd Nov 2002 14:21
yes setting ambient light doesnt work either

has the dbs team released the code for the new tank demo with the coloured lights? That would be helpfull.

www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 2nd Nov 2002 16:53
Actually i think ive found the problem. (well 2 problems ).

1: Light doesnt light up the matrix, only objects (is this normal??)

2: The light is very weak (ambient is 10, and i can only just see the light from my car on the objects). Is there a way to make it brighter (its coloured at 255,255,255 already).

www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 2nd Nov 2002 17:29
1. The lights should light up a matrix, my 'ripples 'n' lights' DBPro 20 liner was done using lights on a matrix.

2. You could try 'set light range' to increase the brightness of the lights.
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 2nd Nov 2002 17:55
set light range didnt change it at all (even if i set the value to 999999). I might buy dbpro soon anyways, how much did you pay for it? Its £49.99 on amazon

www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 2nd Nov 2002 19:11
actually, scrap that idea. Ive just download 3 of the demos from the downloads page, and a total of 0 out of 3 work All 3 get illegal ops on both of my machines, which are both running dx 8.1 with the latest graphics card drivers.

I know everyone said bdpro was buggy, but i never thought that buggy

Specs:

Macine one:
450mhz Pent 3
128megs ram
Onboard i810 intel graphics

Machine two:
1.8ghz Pent 4
256megs ram
GeForce 2 64meg

I would of thought the demos would run on both machines (maybe a little slow on machine one), but since they dont even open before they cause the illegal operations, i wont be getting dbpro.

www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
Leade
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 8th Nov 2002 15:53
What i do when making a car with headlights is design to extra boxes for where the lights go.
then allyou do is glue the lights to the two box positions and hide the limbs saves you time with code.
you can also use the main angles of the car to apply rotation to each lights.

Alternatively if you are really smart you can use Sin(), Cos() and Tan() function to update each positions. Which is really long and tedious and i'm not in the mood to place it here now i'll post it on my site when it's up.

Leade
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 8th Nov 2002 15:55
Oh i forgot to mention spotlights make the best headlights they just need to be set to the length of the car. and tilted down to the floor.

And you need to use the SET MATRIX() function to allow the matrix to conform to lighting.

Login to post a reply

Server time is: 2024-03-28 17:07:54
Your offset time is: 2024-03-28 17:07:54