Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak the fallback 3D material's appearance #62756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 5, 2022

  • Decrease roughness from 0.8 to 0.5 to match Blender's default.
  • Decrease metallic from 0.2 to 0.0.
    • In real life, materials are either fully dielectric or fully metallic.
  • Darken albedo from Color(0.6, 0.6, 0.6) to Color(0.5, 0.5, 0.5).
    • This compensates for the roughness/metallic change, but also makes the fallback material a tad darker overall. It now better corresponds to materials that are typically used in scenes, leading to a more accurate lighting preview (especially when the Debug Lighting draw mode is used).

Testing project: test_fallback_material.zip

Preview

No GI

Before After
2022-07-06_01 05 17 2022-07-20_22 43 12

VoxelGI

Before After
2022-07-06_01 05 04 2022-07-20_22 43 18

SDFGI

Before After
2022-07-06_01 06 04 2022-07-20_22 43 26

The fallback material's default appearance was already changed from 3.x, so this isn't a compatibility-breaking change (not any more than it previously was, at least).

@Setadokalo
Copy link
Contributor

Sorry, could you elaborate on "in real life materials are either fully smooth or fully rough"? I can't see any way to make that true. Just looking around on my desk I can see materials of varying visual roughness. Am I misunderstanding?

@clayjohn
Copy link
Member

Sorry, could you elaborate on "in real life materials are either fully smooth or fully rough"? I can't see any way to make that true. Just looking around on my desk I can see materials of varying visual roughness. Am I misunderstanding?

I think Calinou is mixing up Metallic and Roughness. Metallic should always be 0 or 1, the values in between should be thought of as a blend factor. Roughness can be any value between 0 and 1. In fact in real life it is rare to see materials that correspond to a Roughness of exactly 0 or 1 and you are more likely to find stuff between those two.

@Calinou
Copy link
Member Author

Calinou commented Jul 18, 2022

I think Calinou is mixing up Metallic and Roughness. Metallic should always be 0 or 1, the values in between should be thought of as a blend factor. Roughness can be any value between 0 and 1. In fact in real life it is rare to see materials that correspond to a Roughness of exactly 0 or 1 and you are more likely to find stuff between those two.

Indeed, I thought both metallic and roughness had to be either 0 or 1.

What would be a good roughness value to use? I'm learning towards 0.8 or 0.9.

@clayjohn
Copy link
Member

0.8 seems fine. But I don't really understand the goal here. Is there a specific look you are aiming for, or are you trying to match defaults somewhere else?

@Calinou
Copy link
Member Author

Calinou commented Jul 18, 2022

0.8 seems fine. But I don't really understand the goal here. Is there a specific look you are aiming for, or are you trying to match defaults somewhere else?

I don't have a specific goal here, but having a default metallic value of 0.2 felt strange to me. There was a discussion on the Discord server recently and people found that the fallback material sometimes behaved strangely to light. (It didn't look broken, just unusual.)

@Setadokalo
Copy link
Contributor

I think changing the metallic to 0 is a good idea, but for the roughness the default value is pretty subjective, I think. My first instinct would be to set it to 0.5, to match blender, but also because it's a reasonable approximation for what I'd expect to be the most common range of material roughness.

@Calinou Calinou force-pushed the fallback-material-tweak-default-values branch from 6f0af3a to a0a6350 Compare July 20, 2022 20:45
- Decrease roughness from 0.8 to 0.5 to match Blender's default.
- Decrease metallic from 0.2 to 0.0.
  - In real life, materials are either fully dielectric or fully metallic.
- Darken albedo from `Color(0.6, 0.6, 0.6)` to `Color(0.5, 0.5, 0.5)`.
  - This compensates for the roughness/metallic change, but also makes
    the fallback material a tad darker overall. It now better corresponds
    to materials that are typically used in scenes, leading to a more
    accurate lighting preview (especially when the Debug Lighting
    draw mode is used).
@Calinou Calinou force-pushed the fallback-material-tweak-default-values branch from a0a6350 to 73e78f2 Compare July 20, 2022 20:45
@Calinou
Copy link
Member Author

Calinou commented Jul 20, 2022

I think changing the metallic to 0 is a good idea, but for the roughness the default value is pretty subjective, I think. My first instinct would be to set it to 0.5, to match blender, but also because it's a reasonable approximation for what I'd expect to be the most common range of material roughness.

I updated the PR to decrease roughness to 0.5. Check OP for updated screenshots 🙂

I think the decreased roughness looks good. It also helps make shaded areas look a bit less flat.

@Calinou Calinou modified the milestones: 4.0, 4.x Dec 16, 2022
bors bot pushed a commit to bevyengine/bevy that referenced this pull request Feb 14, 2023
# Objective

Standard material defaults are currently strange, and the docs are wrong re: metallic.

## Solution

Change the defaults to be similar to [Godot](godotengine/godot#62756).

---

## Changelog

#### Changed

- `StandardMaterial` now defaults to a dielectric material (0.0 `metallic`) with 0.5 `perceptual_roughness`.

## Migration Guide

`StandardMaterial`'s default have now changed to be a fully dielectric material with medium roughness. If you want to use the old defaults, you can set  `perceptual_roughness = 0.089` and `metallic = 0.01` (though metallic should generally only be set to 0.0 or 1.0).
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 15, 2023
# Objective

Standard material defaults are currently strange, and the docs are wrong re: metallic.

## Solution

Change the defaults to be similar to [Godot](godotengine/godot#62756).

---

## Changelog

#### Changed

- `StandardMaterial` now defaults to a dielectric material (0.0 `metallic`) with 0.5 `perceptual_roughness`.

## Migration Guide

`StandardMaterial`'s default have now changed to be a fully dielectric material with medium roughness. If you want to use the old defaults, you can set  `perceptual_roughness = 0.089` and `metallic = 0.01` (though metallic should generally only be set to 0.0 or 1.0).
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 15, 2023
# Objective

Standard material defaults are currently strange, and the docs are wrong re: metallic.

## Solution

Change the defaults to be similar to [Godot](godotengine/godot#62756).

---

## Changelog

#### Changed

- `StandardMaterial` now defaults to a dielectric material (0.0 `metallic`) with 0.5 `perceptual_roughness`.

## Migration Guide

`StandardMaterial`'s default have now changed to be a fully dielectric material with medium roughness. If you want to use the old defaults, you can set  `perceptual_roughness = 0.089` and `metallic = 0.01` (though metallic should generally only be set to 0.0 or 1.0).
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 15, 2023
# Objective

Standard material defaults are currently strange, and the docs are wrong re: metallic.

## Solution

Change the defaults to be similar to [Godot](godotengine/godot#62756).

---

## Changelog

#### Changed

- `StandardMaterial` now defaults to a dielectric material (0.0 `metallic`) with 0.5 `perceptual_roughness`.

## Migration Guide

`StandardMaterial`'s default have now changed to be a fully dielectric material with medium roughness. If you want to use the old defaults, you can set  `perceptual_roughness = 0.089` and `metallic = 0.01` (though metallic should generally only be set to 0.0 or 1.0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants