Should we change the sandbox default environment?

We had a discussion in another thread on the forum about environment lighting and it was suggested that maybe we need to look at changing the default environment IBL in the sandbox to a more color neutral environment that still offers some good range in lighting, but doesn’t bias the color of the object with the environment colors.

We use a neutral studio environment on the team when we are showing off many of our PBR upgrades, and are wondering if the community at large would rather change to a more neutral studio environment rather than an exterior environment for the default environment. This is the environment we use internally:

And on an asset:

And used on the first two assets in our last PBR video: New PBR Features

And the environment for you to try: Studio_Softbox_2Umbrellas_cube_specular.zip (1.5 MB)

This is simply a Maya render that can be changed or modified in any way, so we could make a few different options for everyone to use, but wanted to get a feel from everyone about what the default environment should be. One additional thing to think of with an environment like this. It’s made to be higher contrast to really define the surfaces of the model, but that means that using a blurred version of it as the skybox is usually too distracting behind the model. We would need to create a lower contrast version of this type of environment to serve as the default skybox.

But we’d like to get your thoughts on a few questions as approach any change to the default environment.

  • Do you think it should be an interior or exterior environment?
  • If you think it should be an exterior environment, what time of day should it be? Should it be overcast or have a bright light source? Should the environment be warm or cool?
  • How color neutral should it be?
  • What kinds of models are you using in the sandbox (product, architectural, character, etc.)?
  • Should the default light map be high contrast with strong HDR tones (well above 1.0, 1.0, 1.0) or should it be lower contrast without such strong light sources?

Let us know your thoughts on the default environment so we can make an informed decision going forward. Thanks for your input!

6 Likes

I love this!

Interior is great. Studio lighting is a good standard to make the widest variety of solo models look their best.

Neutral color is best, when trying to judge color accuracy. We do a lot of work to replicate real-world products, so matching the color is important. Can’t do that when the irradiance is colored.

It’s great to have the Select Env button in the 4.0 sandbox, so it’s easy to quickly swap to the colorful Chinese Mann Theater Courtyard. It’s also great that we can drag-and-drop our own .DDS or .ENV files right into the view.

I think the current studio env is a good setup, though I prefer to view models with a combination of env and punctual lighting.

The env is perfect for irradiance (ambient diffuse lighting) and radiance (sharp specular reflections), with the model’s roughness modulating how diffuse the env contribution is (which MIPs it receives).

The punctual light is best (in our use case) as a directional light, so we can see a sharp lighting terminus on the model curvature where the lighting doesn’t hit, great for judging model shape. It also gives us a well-defined lighting direction to evaluate bump mapping.

Directional lighting angle might be best with the sun behind your left shoulder. This mimics the common embossing direction people use for 2D graphics, which we then perceive as bumping outwards, rather than how lighting from below causes bumps to look like indents. So my thinking is this should work well for 3D models as well?

Related request: Directional light default angle? · Issue #6290 · BabylonJS/Babylon.js · GitHub

As for the skybox background, it would be nice to have a solid color as the default view. Maybe 50% gray. I like how the Khronos Sample Viewer has a handy control for their background color.

You could also include an option to switch on the skybox, and add a slider for the MIP level. Maybe also a slider to fade the skybox into the solid color?

I do have to say, I’m very excited by all the work you put into 4.0. Kudos to the team, it looks great!

3 Likes

Same way as @echadwick-artist, +1 for studio lighting with neutral colors, and high contrast.

I even wish that default studio lighting should be applied in sandbox, but also linked to the scene.createDefaultEnvironment(); function.

About sandbox usecases, I often use it just to quick-check models, and as my browser is always opened, it’s also opening quickly than Windows 3D Viewer :smile:

(this hdr texture is already available in the playground for those want to test)

2 Likes

What @Vinc3r said about as a default for createDefaultEnvironment. Especially helpful during dev. If some one is build assets one at a time, no need to screw around. If something fancy required for “production” do it as a last step after all the geo done.

Probably going to require storing as base64 string though. I think the Blender exporter is the only one doing env / skybox export. Would even add a checkbox to use default env texture & backing at load code, if this was done.

Starting to look at this some more. I noticed that the .dds version in the playground is 8 mb. The one on the link is 1.5 mb. Finally, there is a 203 kb .env version.

Comparing the small .env to the 8 mb .dds playgrounds on different tabs. There is no visual difference when toggling, but the .dds is a dog to load. For this particular setup, the .env certainly has better bang for the buck.

Do not know about memory for the .env. The memory of a .dds is basically the file size. For mobile, .env might be better.

Though, blender will not load a .env, thinking about putting this and possibly other .env files into the add-in zip file. In custom properties, have a dropdown of those which can be included in export. One problem is you cannot generate dropdown item dynamically, so any addition to an envTextures directory would also require a minor code change.

This would mean no need to embed textures into framework for inclusion to createDefaultEnvironment.

Any feedback on this?

2 Likes

our use-case is lightweight mobile…

@JCPalmer, I took some time to build out a comparison that everyone can see. There are several quality sliders we have at our disposal for environment textures and this is a simple comparison of just a few of those sliders:

Environment Texture Comparison

You can see in this comparison that the quality is seen mostly in the number of pixels we are using per face. I just did 256 and 512 comparisons, but you can see that there is a loss of detail in the chrome sphere, but it is not that noticeable in the 1.0 roughness sphere. There really is no difference in quality between the DDS files and the ENV files which is due to @sebavan’s work on the conversion tool. This is due to the 8-bit RGBD PNG files packed into the env which are much smaller than these 32-bit DDS files. You can read about what the env file is comprised of in this doc page.

We can certainly export DDS files at lower than 32-bit precision, but we do need to be greater than 8-bit to render HDR values at all. I typically export 32-bit DDS files if I know that I am going to send it through the env tool in the inspector so that the tool has full precision to convert pixels to RGBD values. You could also use 16-bit precision to halve the file size but I would test out the quality you are getting.

We will certainly use an env file for the default environment in both the playground and sandbox as the size savings are signficant:

  • 512 px, 32-bit DDS = 32MB
  • 512 px, 32-bit DDS converted to ENV = 611K
  • 256 px, 32-bit DDS = 8MB
  • 256 px, 32-bit DDS converted to ENV = 199K

If you want to grab the studio environment for your use in ENV format, you can get them in this GitHub repo.

5 Likes

Thanks, I wondered why my searches for what .env files are for got no where. BTW, I clicked that HDRLib site. when you click “DownLoad”, a bunch of re-directs, then tons of nested module save dialog boxes, or something that looked like them. Audio warning “Your computer has been locked up, because of a virus that is stealing your info. Call Microsoft at 123-123-1234 NOW!”. Oh MY!!

I pulled the power plug on my router, got it out of full screen mode, Alt-Ctrl-Delete to task manager & blew the browser task away. Loaded new version, tab is still there, but will not load, because no network connection. Deleted the tab. The Url started with spangles.icu.

I have been coding longer than these insignificant turdlings have been alive. Problaby should rip that link off the doc.

2 Likes

@JCPalmer, Thank you for reporting that bad link. We have pulled the HDRLib link from the documentation. I will put together a collection of HDR files we have the rights to distribute and create a new repo for users to pull from and replace that link. Thanks again for helping us keep our documentation clean!!

Sounds good. I have made the little bit of code which needs to go into the sub-dir with the .env files of the exporter. Once hooked up, only need to add a line for each file.

import bpy
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def getAddonEnvTexturePath():
    import os
    return os.path.dirname(os.path.realpath(__file__))

bpy.types.World.evtTexture = bpy.props.EnumProperty(
    name='Env Textures',
    description='Environment texture for PBR materials.  No meaning,\nexcept as a sybox, when exporting as STD materials.',
    items = (
             ('use_blender'   , 'Blender World Node or None', 'Use the file assigned to the Color input of Background node of world.\nNone when is not assigned'),
             ('studio_256.env', 'Studio, 256px / face', 'Soft Box & 2 Umbrellas for that photo studio look, lower detail'),
             ('studio_512.env', 'Studio, 512px / face', 'Soft Box & 2 Umbrellas for that photo studio look, higher detail')
            ),
    default = 'use_blender'
)

I did have a question about when do you load with new BABYLON.CubeTexture and when with new BABYLON.CubeTexture.CreateFromPrefilteredData? When I made changes to loader code last release, I think I allowed both in the JSON file(have to check), but the Blender exporter always did the former.

I do have to go in add the rotation amt in both places.

2 Likes

I think that is important too.

1 Like

@PatrickRyan, would you be so kind to provide the env map in .exr and/or .hdr format :slight_smile:

@samevision, sure thing. You can find the files on my github.

1 Like