Sign in to follow this  

Which one looks better?

This topic is 2812 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

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by ArKano22
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...

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
You 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



Share this post


Link to post
Share on other sites
Quote:
Original post by TyrianFin
You 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

Share this post


Link to post
Share on other sites

This topic is 2812 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