f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.53k stars 181 forks source link

Improve default HDRI #1063

Open spiraloid opened 7 months ago

spiraloid commented 7 months ago

I created two defaults that I think work better for defaults in case they are usefull.

I'm creating 3D models with lumalabs.com/genie and I thought others might like.

first is the viewer.

image


{
  "global": {
    "axis": false,
    "tone-mapping": false,
    "grid": false,
    "progress": false,
    "anti-aliasing": true,
    "filename": false,
    "scalars": "",
    "camera-direction": "-1,-0.33,-1",
    "hdri-skybox": false,
    "hdri-ambient": true,
    "hdri-file": "X:/Prod/Library/Textures/Lightmaps/green_point_park_256.hdr",
    "blur-background": true,
    "blur-background-coc": 20.0,
    "ambient-occlusion": true
  }
}

the second, is that the default HDRI is not artist friendly. the light and exposure needs to be near neutral light. just like in photography, the baseline mid tone is green grass at noon on and overcast day. This HDRI is great for 50% gray and is the best baseline for evaluating textures with neutral brightness and exposure. it's open source. the high res original is here w cco license

https://polyhaven.com/a/green_point_park

I resized it to 256 so it's very fast without any real noticeable difference. Here's the file.

green_point_park_256.zip

here's the thumbnail configs.


 {
  "global": {
    "no-background": true,
    "max-size": 100,
    "camera-direction": "-1,-0.5,-1",
    "tone-mapping": false,
    "grid": false,
    "progress": false,
    "anti-aliasing": true,
    "filename": false,
    "scalars": "",
    "hdri-skybox": false,
    "hdri-ambient": true,
    "hdri-file": "X:/Prod/Library/Textures/Lightmaps/green_point_park_256.hdr",
    "ambient-occlusion": true
  }
}

here's how it looks in windows explorer. image

f3d is awesome

Meakk commented 7 months ago

the light and exposure needs to be near neutral light. just like in photography, the baseline mid tone is green grass at noon on and overcast day.

Interesting. Do you have a source that confirms this statement?

mwestphal commented 7 months ago

BTW @spiraloid we have a discord now, I'm sure the community will be happy to take a look at that!

https://discord.f3d.app

spiraloid commented 7 months ago

statement

Ansel Adams's "zone system" And a photographry text book chapter on "middle gray" are good places to start.

"Metering off of grass" too.

https://photography-on-the.net/forum/showthread.php?t=887128

mwestphal commented 7 months ago

@spiraloid please provide a bit more info. We would love to improve the default HDRI but we dont have enough info to make informed decisions.

spiraloid commented 7 months ago

Not sure what more I can tell you. Exposure should be middle gray to encourage authoring/capture in the center of the color gamut. Expert opinion is what it is.

mwestphal commented 7 months ago

Exposure should be middle gray to encourage authoring/capture in the center of the color gamut.

Great! How do we compute that ?

Expert opinion is what it is.

And thanks for sharing it! The problem is that currently I do not understand it because I do not have any background in photography or color science. We just picked the current default HDRI because it looked right and made it as small as possible. We would love to change that to something better but first we have to understand the theory behind it.

snoyer commented 7 months ago

Not sure what more I can tell you. Exposure should be middle gray to encourage authoring/capture in the center of the color gamut. Expert opinion is what it is.

I don't think anyone is questioning whether you're right or not, we all respect expert opinions but we all have our different areas of expertise and may need more info on other's :) You can't really expect a bunch of software nerds to know what "metering off grass" means because photography is an arcane art. Also arguments of authority don't usually go down well with engineers and scientists so requests for explanations/sources are to be expected. (or maybe we're just a bit slow around here and we need to be told things with small words, idk)

snoyer commented 7 months ago

We started discussing it on discord (and quickly ran out subject matter knowledge) and it went like this:

maybe he means use the park hdri because it matches what you would supposedly use as a reference if you were photographing actual things outside in the real world?

my limited understanding is you would aim your camera at the grass and let it guess exposure/speed/iso and then keep these settings to shoot whatever subject around, but photography is hard so maybe I'm just wrong there

That's my understanding too.

Isnt is a bit subjective ?

it seems like it's not completely subjective and based on photography best practices

ideally we should understand the theory and craft an HDRI that fit the bill for it.

basically we need to bridge the gap between the photo theory and the software rendering tech to come up with the best implementation.

@spiraloid, could you confirm the fist point (ie. using the park hdri when rendering a model of a physical object is a way to emulate a picture taken using metering best practices irl)? Then, does that apply to any objects/scenes or are there limitations we should be aware of (eg. would there be significant differences between indoors, outdoors scenes)?

spiraloid commented 6 months ago

Not sure what more I can tell you. Exposure should be middle gray to encourage authoring/capture in the center of the color gamut. Expert opinion is what it is.

I don't think anyone is questioning whether you're right or not, we all respect expert opinions but we all have our different areas of expertise and may need more info on other's :) You can't really expect a bunch of software nerds to know what "metering off grass" means because photography is an arcane art. Also arguments of authority don't usually go down well with engineers and scientists so requests for explanations/sources are to be expected. (or maybe we're just a bit slow around here and we need to be told things with small words, idk)

no worries. Apologies for my gruffness. I code a lot with ChatGPT and it's made me a bit rude. If you want to know more about "metering off of grass" here's a good starting off point for further inquiry.

https://chat.openai.com/share/d24a4ab2-776a-4047-bf31-be298af2a707

spiraloid commented 6 months ago

ou confirm the fist point (ie. using the park hdri when rendering a model of a physical object is a way to emulate a picture taken using metering best practices irl)?

yes. but only for outdoor scene. there's no real standard for interior lighting since exposure/energy/shutter speed/film speed are so variable. I.e. a candle lit room vs a room with incandescence vs a studio with halogen bulbs etc etc etc.

it also doesn't help that our eyes are extremely adaptive and we like to imagine value shifts that aren't physically there (we see red being darker then yellow when it's not) or that we can filter out the blue light from windows almost instantly.

To pick a baseline that would work everywhere on earth, the inventors of photography chose to use the sun at noon, with average healthy green grass on an overcast day as the baseline for the mid exposure between full black, and full white.

This decision is relevant to all IBL, HDRI, BSDF and PBR rendering since we're emulating the real world. not just with exposure, but with energy coming off the HDRI.

For an artist painting a texture (usually in 8 bit SRGB, gamma 1.0) the HDRI they use by default really matters. to orange they might paint blue, too blue, they might paint orange. to dark and they paint to brightly, to dim etc etc.

and since f3D is the perfect 3D viewer, I think every 3D artists should use it to gauge their work. ;) so I want the default lighting to be perfect to avoid the problems above. but I'm biased.

snoyer commented 6 months ago

Thank you for the elaboration, @spiraloid.

and since f3D is the perfect 3D viewer, I think every 3D artists should use it to gauge their work. ;) so I want the default lighting to be perfect to avoid the problems above. but I'm biased.

F3D has its roots in scientific visualization so you're not the only one being biased here :)

Hopefully feedback such as yours can be integrated to bridge the gap

mwestphal commented 6 months ago

Thanks for the deep explanation. I also found this series of articles that may help: https://bartwronski.com/2015/10/14/white-balance-and-physically-based-rendering-pipelines-part-2-practical-problems/

So you would say the current default HDRI is too dim, right ?

mwestphal commented 5 months ago

More investigation and insight needed before we change the HDRI.