Planetside Software Forums

General => Terragen Discussion => Topic started by: Blonderator on June 10, 2008, 07:10:45 PM

Title: Lightsource Not Working
Post by: Blonderator on June 10, 2008, 07:10:45 PM
I've added a lightsource to my project, but it seems to have no effect on anything. It doesn't cast light on the terrain, on objects... nothing. No matter how big or how powerful I make it, it just does nothing.

Any help?
Title: Re: Lightsource Not Working
Post by: Mr_Lamppost on June 10, 2008, 07:43:15 PM
You say "No matter how powerful", you do have to use some quite high values.  The light source in this example is 100m above the ground and has a strength of 1000; as you see it casts only a dim light on the ground.  I have included the .tgd so that you can test this result.
Title: Re: Lightsource Not Working
Post by: Blonderator on June 10, 2008, 08:24:06 PM
Strength values in the millions (I belive 1 million is 1e+006) still are showing no light.



Wait... sorry I figured out what the problem was. Diameter values around 10,000 yield no light output.
Title: Re: Lightsource Not Working
Post by: rcallicotte on June 10, 2008, 09:47:55 PM
Diameter and strength...playing with these can create different variations.  It's fun using these to light up stuff...like water or terrain from underneath.
Title: Re: Lightsource Not Working
Post by: jo on June 10, 2008, 11:08:32 PM
Hi,

I believe the larger you make the lightsource the stronger it has to be, because the amount of light emitted by the surface is proportional to the strength divided by the area.

Regards,

Jo
Title: Re: Lightsource Not Working
Post by: Oshyan on June 11, 2008, 11:55:12 PM
Quote from: jo on June 10, 2008, 11:08:32 PM
Hi,

I believe the larger you make the lightsource the stronger it has to be, because the amount of light emitted by the surface is proportional to the strength divided by the area.

Regards,

Jo

That's my understanding as well.

- Oshyan
Title: Re: Lightsource Not Working
Post by: Matt on June 12, 2008, 09:25:51 AM
Quote from: jo on June 10, 2008, 11:08:32 PM
Hi,

I believe the larger you make the lightsource the stronger it has to be, because the amount of light emitted by the surface is proportional to the strength divided by the area.

Regards,

Jo

That is not quite correct. The light source radius only affects the intensity of light very close to the light source (either within the radius or just a few radii outside). That happens because the light source is not a singularity and the inverse square law does not apply close to the source. Further from the source, the illumination effect of the light source depends only on the distance and the intensity value that you provide.

On the other hand, the apparent brightness of the surface of the light source, if you enable "visible source", is divided by the square of the radius. That is necessary to simulate the brightness of the surface which would keep the illumination effect constant.

This is similar to how TG deals with Sunlight. You can change the diameter of the sun without it affecting the intensity of the illumination on the landscape, but to keep things physically correct it changes the apparent brightness of the surface of the sun.

Matt