# indirect lighting for terrain

This topic is 4443 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

well im not rly into indirect lighting... havent rly looked into it but ive got a few ideas... just posting it here for confirmation... in the first pass i have each point illuminted by a lightsource using the dotproduct of the points normal and the lightnormal... in the second pass i take a point and use the dotvector between the point and each surrounding point withing a certain distance and in the horizon of the points ... multipliying this with the other points brightness and dividing it by the distance times a constant... it would look somethig like this...
Point = P
PointNormal = PN
Surrounding point = SP
Surrounding point normal = SPN

for each P on the terrain
P Brightness = max(0,DotProduct(PN, LightDirectionNormal)) * Light Brightness

for each P on the terrain
for each SP within a certain distance
if SP is within horizon
FinalPointBrightness = P Brightness + SP Brightness *max(0,DotProduct(PN, SPN))/(distance from P to SP * constant)


would this work in realtime? if i have a precalcualted horizonmap

1. 1
2. 2
3. 3
frob
20
4. 4
Rutin
19
5. 5

• 32
• 13
• 11
• 9
• 18
• ### Forum Statistics

• Total Topics
632555
• Total Posts
3007066

×