Game Development Community

Volume Light

by Howard Dortch · in · 05/02/2005 (11:26 am) · 4 replies

I guess the best thing to do is describe what I want to do.

The light casting visible rays down from a fixture is what Im doing. IN the Common/lighting directory there are a couple of files like lightfalloffmono. The texture is 256 x 256. I have a small street light and want the rays to appear. This I can do and it looks ok but I would like to know how to make some adjustments.

1. The light when I create it makes a 3d sprite much larger than my light, I tried scale in the light settings but didn't cut down the x,y size of the sprite casting the rays. How do I reduce the apparent size of lightfalloffmono so it fits in the size of the dts fixture?

2. The rays that get cast down from this sprite seem to have no cone size adjustments, in other words they shine straight down and dont disperse out, looks more like a directed beam. How do I change the angle of cone or dispersion of the light.

I have played with all the numbers for a while and can't get the effect I want. I read the info John has on it but still can't wrap my head around how to do this.

new volumeLight(DigShopRear) {
position = "-206.038 -267.127 137.952";
rotation = "1 0 0 208.167";
scale = "1 1 1";
dataBlock = "sgSpotDataBlock";
Enable = "1";
IconSize = "1";
ParticleColorAttenuation = "1";
texture = "common/lighting/lightFalloffMono";
lpDistance = "8";
ShootDistance = "35";
Xextent = "2";
Yextent = "2";
SubdivideU = "4";
SubdivideV = "4";
FootColour = "1.000000 1.000000 1.000000 0.200000";
TailColour = "0.000000 0.000000 0.000000 0.000000";
NearSize = "1";
FarSize = "20";
};

I also made changes to NearSize and FarSize and still can't get it to look right.
Any hints?

#1
05/02/2005 (11:42 am)
Hi Howard,

Changing the Xextent and Yextent to smaller numbers reduces the radius of the beam, and changing the ShootDistance increases and decreases the beams length. The lpDistance variable changes the beam's angle, but with a somewhat random effect (like streaks from a lens flare).

-John
#2
05/02/2005 (3:11 pm)
I changed lpDistance from 8 to 18 and it looks the same. Any other suggestions?
#3
05/02/2005 (4:23 pm)
Smaller numbers create wider angles, try 1 - 4.
#4
05/03/2005 (7:41 am)
Thanks John that worked. Some of the names for these members are a bit confusing. I got the beam spread out but now it seems the beams are not even intensity, any way to make the beams appear even ?