Sign in to follow this  

indirect lighting for terrain

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

If you intended to correct an error in the post then please contact us.

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

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this