# Which one looks better?

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

## Recommended Posts

Hi I've been playing around with my lighting falloff, but looking at the same scene so much, I've lost all objectivity on it. Which one of these scenes looks 'better'? A, B or C? This just uses the diffuse term, not specular. A is the most traditional falloff, C is what I think is more physically correct, and B is somewhere in the middle. Thanks & Regards elFarto

##### Share on other sites
Um.. kind of hard to say which is better. What are you trying to achieve? Do you want a dark or a bright scene? A flashlight or a floodlight?

I think B looks too saturated (a lot of detail looks washed out), but between A and C one just is brighter than the other, so its really up to you.

##### Share on other sites
Put it into a scene that it would actually be used in, then we can make a good judgement.

##### Share on other sites
I think C looks best. However it depends on where you are using this lighting. C looks good for this scene, but it may not be the best choice for another scene...

##### Share on other sites
Quote:
 Original post by ArKano22I think C looks best. However it depends on where you are using this lighting. C looks good for this scene, but it may not be the best choice for another scene...

That's the choice I expected people to go for. However, I've noticed that the equation used in C isn't quite right.

I've always thought (and noticed others have too) that the regular falloff (1 / dist*dist) is technically correct, but doesn't look/feel right. People usually fix this by adding a bit of linear falloff, but I decided to go looking for the reason why it doesn't look right.

I came to the conclusion that the regular falloff equation is incomplete. The equation used is really the illuminance equation:

lux = lumen / area in meter²

This value is then applied directly to a pixel without any regard for the area that the pixel covers. So I attempted to correct this by doing the following:

float att = lightPower / (dist * dist); //Illuminance in lux(lumen/m²)
float area = (eyeDist * eyeDist) * 0.0000012271846328125; //Area in m²
float total = att * area;

The 'magic' number above should be the solid angle in steradians of 1 pixel on my screen, however I'm pretty sure I'm not calculating it correctly. My FOV is 90°, and width is 1280px, so I converted the FOV to radians (1.57079633) and divided by 1280.

However, using this gives an odd effect. When moving the camera back, away from the rhinos, they get brighter which doesn't seem right.

Regards
elFarto

##### Share on other sites
When dealing with lighting falloff, you don't need to do any weird computations involving pixel size or camera geometry: The formula that decays as 1/distance^2 is exactly right.

Your scene may not look correct with that formula for a number of reasons. Off the top of my head:
* Perhaps you are not being careful with tone mapping.
* Perhaps the parameters for your light sources are not realistic.
* Perhaps the contributions from indirect lighting are relevant and you are not computing them (global illumination is hard).

##### Share on other sites
I guess it depends on what atmosphere u wanna create. Both A & C look good to me.
I may choose C because A looks kinda strange as it abruptly goes from very lit to rather dark (smth similar happens in the bottom line of C's rhinos, but as u can see more, it's not so noticeable at first). I would choose A if light were more even :)

Synth

##### Share on other sites

I can quess that you are not using gamma correction on end of your rendering,
and sRGB monitor gamma eats your light.

Simple fix: try gamma of 2.2 to image and adjust lights down a bit.

Ps: And please try useing white light with light pink rhino :P

/Tyrian

##### Share on other sites
Quote:
 Original post by TyrianFinYou nead gamma correct pipeline!I can quess that you are not using gamma correction on end of your rendering,and sRGB monitor gamma eats your light.Simple fix: try gamma of 2.2 to image and adjust lights down a bit.Ps: And please try useing white light with light pink rhino :P/Tyrian

Thanks, that actually made a surprising amount of difference, just by enabling GL_FRAMEBUFFER_SRGB.

FWIW, the scene has a white light, and blue rhinos, I guess they're from Pandora or something :D.

Regards
elFarto

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 29
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631739
• Total Posts
3001957
×