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.

Newcomers DBPro Corner / Torch (Stick+fire)

Author
Message
Social Disease
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 21st Oct 2003 18:25
Hello all.
I want to make a lightsource that will show a "glow area" around the player. But it currently only iluminates the walls, not the floor or the ceiling.
Any suggestions? Has somebody written a really good DBpro tutorial on lights? Like, what is a spot light or a point light? Are there any good subroutines to determine what light sources a player can see and only draw those sources? That sort of thing.
-thanx


So many games... so little time!
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 21st Oct 2003 18:38
Codez?

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 22nd Oct 2003 14:08
point light is a light that has a position and a range. Every face pointing towards the light will be lit, based on the distance to that point. This is what you would use for a torch.

Spot light is basically like a cone that has a position, angle and a range. (it also has radius values that control the size) It works like flashlight, illuminating only the faces that are in front of it, or in the path of the light, so to speak. It won't lit the faces that are behind it.

Directional lights would be lights with direction, they don't have a position because the light itself goes on forever. So the angle is constant on every face, unlike in the previous two light types. Directional light, lighting the area from left would always do that, unlike a point light because when you move the objects, the angle between the light center and the faces would change > causing the lighting to change.

Social Disease
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 22nd Oct 2003 19:53
But the point light dosen't light the floor or ceiling! Is it because I'm using plain objects instead of cubes or boxes?




So many games... so little time!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 22nd Oct 2003 20:47
Lights only really like objects with lots of vertices. Standard plains and boxes are not good enough for lights to work properly.

If you have a large plain you will find lights only affect a small area around each corner. Also look at 'set ambient light' command to lower ambient light level as default is to flood all objects with maximum light, thus rendering any extra lights useless.

Suggest you use a 3d package like milkshape to make a box or plain with multiple vertices per face as they respond to light much better

If your mansion house needs haunting, just call Rentaghost!
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 22nd Oct 2003 22:15
spooky is right! your walls are probably made of lots of cubes at the moment so walls=lots of vertices, but the the floor and ceiling are just 2 big plains, so floor+ceiling=very few vertices, because light is worked out based on the vertices the less you have the poorer the light effect will be


Go on, click on my signature image, you know you want to
Favourite smiley>>>
ifman1
21
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 23rd Oct 2003 02:27
heh, stick with fire.... heh... maybe a flashlight..... heh....

sorry, couldn't resist!

Login to post a reply

Server time is: 2024-11-25 14:26:31
Your offset time is: 2024-11-25 14:26:31