Skip to content

Conversation

Sanakan8472
Copy link
Contributor

Reflection probe support
image

  • Only the global fallback reflection probe is supported per world right now.
  • Reflection probe is set up via ezSkyLightComponent. Both dynamic updates and static cube maps are supported.
  • Static cube maps must have mipmaps defined, roughness filtering is done on the fly at runtime for now.
  • If no ezSkyLightComponent exists in a world, a black fallback probe is used.

Generalized lighting settings for simple asset documents
image

  • ezEngineViewLightSettings in a sync object that controls light settings of the engine side of the document.
  • Settings can be changed via the actions in the engine view toolbar.
  • Settings are persisted globally. These can be changed in the and can be changed in the ezEditorPreferencesUser or copied from an engine view via the action in the toolbar.
  • Settings will affect thumbnail generation except for skybox which is hidden in thumbnails.

Rendering changes

  • Support for texture readback of mipmaps and cube maps.
  • Added ezSimplifiedDataExtractor / ezSimplifiedDataProvider to support the reflection probe / ambient cube in the simple render pipeline.
  • If no texture is set in the render target setup, the render pipeline will suplement this via the texture pool.
  • Expose ezRenderContext::GetAllowAsyncShaderLoading to allow swapping the state conditionally. Used in the reflection filter pass to make sure it can never fail.
  • Reflection probe debug info now shows the filtered mip maps as well.
  • Updated all shader references to distinguish 'roughness' from 'perceptual roughness'. Roughness is the physical property while perceptual roughness is what is set by the user in the editor and also maps to the mip levels of the reflection probes. perceptualRoughness^2 == roughness.

Misc

  • Bug fix: Cloning materials or other prefab documents now preserves the prefab references / seeds.
  • Bug fix: Mesh asset now listens for resource changes to update the AABB to make sure thumbnail generation works correctly after size changes.
  • Bug fix: staging texture has D3D11_RESOURCE_MISC_GENERATE_MIPS removed as that prevents texture readback.

@Sanakan8472 Sanakan8472 requested a review from C-Core May 30, 2021 19:37
@jankrassnigg
Copy link
Member

"Enable Fog" makes the skybox disappear. I guess you'd need to remove the flag to apply fog to the sky.

@jankrassnigg
Copy link
Member

By default the sky light is ON but the skybox is OFF. IMO the default should be for both to be ON. However, I'm wondering whether you'd maybe want different defaults per document type?

@jankrassnigg
Copy link
Member

By default the sky light is ON but the skybox is OFF. IMO the default should be for both to be ON. However, I'm wondering whether you'd maybe want different defaults per document type?

Well, I see it is stored per document. In that case I'm definitely missing a "reset to defaults" action.

@jankrassnigg
Copy link
Member

The directional light comes from the back (along positive X). It should come from the front, from where the camera is looking at the meshes:

image

@jankrassnigg
Copy link
Member

The directional light comes from the back (along positive X). It should come from the front, from where the camera is looking at the meshes:

image

This is different in the material assets, there the default camera angle looks at the lit side. I think the material camera needs to be adjusted, the camera angle in the meshes is the correct one.

@jankrassnigg
Copy link
Member

Scenes and Prefabs have a similar feature (View > Add Ambient Light) which is ON by default for prefabs and OFF by default for scenes (and this state is reset when the document is closed). I wonder whether we should replace that with the new option. It would need to have different behavior though.

@jankrassnigg
Copy link
Member

Switching the mode on the skylight component gave me an error:

image

@jankrassnigg
Copy link
Member

The 'Include/Exclude Tags' are only needed for the dynamic mode right? What about the cubemap option, is that static only? Would be nice if the options only show up depending on the selected mode.

Also I guess the "Show Debug" option shouldn't be in the sub group, since it is always viable, no (enabling that also consistently crashes for me).

@Sanakan8472
Copy link
Contributor Author

"Enable Fog" makes the skybox disappear. I guess you'd need to remove the flag to apply fog to the sky.

I moved all the light settings out of the engine context. The fog settings come from the particle context, the skybox from the kraut context. In combination they don't make much sense but I just wanted to preserve the current functionality for now. We could extend the fog settings?

@Sanakan8472
Copy link
Contributor Author

By default the sky light is ON but the skybox is OFF. IMO the default should be for both to be ON. However, I'm wondering whether you'd maybe want different defaults per document type?

For now I kept it close to the previous state. Settings can currently be saved globally so it's easy to change the default. I would like to make the defaults per document but that requires adding a new option for it to the preferences system.

Sanakan8472 and others added 7 commits June 2, 2021 17:20
- Only the global fallback reflection probe is supported per world right now.
- Reflection probe is set up via ezSkyLightComponent. Both dynamic updates and static cube maps are supported.
- Static cube maps must have mipmaps defined, roughness filtering is done on the fly at runtime for now.
- If no ezSkyLightComponent exists in a world, a black fallback probe is used.

Generalized lighting settings for simple asset documents
- ezEngineViewLightSettings in a sync object that controls light settings of the engine side of the document.
- Settings can be changed via the actions in the engine view toolbar.
- Settings are persisted globally. These can be changed in the  and can be changed in the ezEditorPreferencesUser or copied from an engine view via the action in the toolbar.
- Settings will affect thumbnail generation except for skybox which is hidden in thumbnails.

Rendering changes
- Support for texture readback of mipmaps and cube maps.
- Added ezSimplifiedDataExtractor / ezSimplifiedDataProvider to support the reflection probe / ambient cube in the simple render pipeline.
- If no texture is set in the render target setup, the render pipeline will suplement this via the texture pool.
- Expose ezRenderContext::GetAllowAsyncShaderLoading to allow swapping the state conditionally. Used in the reflection filter pass to make sure it can never fail.
- Reflection probe debug info now shows the filtered mip maps as well.
- Updated all shader references to distinguish 'roughness' from 'perceptual roughness'. Roughness is the physical property while perceptual roughness is what is set by the user in the editor and also maps to the mip levels of the reflection probes. perceptualRoughness^2 == roughness.

Misc
- Bug fix: Cloning materials or other prefab documents now preserves the prefab references / seeds.
- Bug fix: Mesh asset now listens for resource changes to update the AABB to make sure thumbnail generation works correctly after size changes.
- Bug fix: staging texture has D3D11_RESOURCE_MISC_GENERATE_MIPS removed as that prevents texture readback.
- Fix default light direction to come from +x direction
- Made sky box enabled by default
- Made material camera setup match mesh and other assets
- Fix compile bug due to sub-system variable name collision.
- Hide CubeMap property in ezSkyLightComponent if in dynamic mode.
- Make dynamic the default ezSkyLightComponent mode for backwards compatibility.
- Increase wait time for terrain test because for some reason the glow stick is black as long as the reflection pool is not updated yet.
- Increased timeout for texconv.
- Added editor processor debug output.
- Resaved two test scenes to get rid of the wrong SkyLight default mode that made it into the asset cache.
- Replaced a test image that seems to have changed due a newer tex conv version.
- Increased image compare threshold for some images to account for GPU vendor differences.
- Fixed typo in passing in -mipmaps filter option to TexConv
@jankrassnigg
Copy link
Member

This PR also fixes #383

@jankrassnigg jankrassnigg linked an issue Jun 3, 2021 that may be closed by this pull request
@jankrassnigg jankrassnigg added this to the Next Release milestone Jun 3, 2021
@Sanakan8472 Sanakan8472 merged commit d1d1192 into dev Jun 3, 2021
@Sanakan8472 Sanakan8472 deleted the user/cm/IBL branch June 3, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Mipmap more 'Kaiser' generates a warning on import
4 participants