Apply metallic and roughness scaling factors.

PiperOrigin-RevId: 767518801
Change-Id: I7eff7b7a56cfbb9c6e46ac22011559eabf401c07
This commit is contained in:
Google DeepMind
2025-06-05 03:02:18 -07:00
committed by Copybara-Service
parent 047df4e871
commit dd18dd2024
2 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -1776,15 +1776,19 @@ properties are grouped together.
.. _asset-material-metallic:
:at:`metallic`: :at-val:`real, "0"`
:at:`metallic`: :at-val:`real, "-1"`
This attribute corresponds to uniform metallicity coefficient applied to the entire material. This attribute has no
effect in MuJoCo's native renderer, but it can be useful when rendering scenes with an external renderer.
effect in MuJoCo's native renderer, but it can be useful when rendering scenes with a physically-based renderer. In
this case, if a non-negative value is specified, this metallic value should be multiplied by the metallic texture
sampled value to obtain the final metallicity of the material.
.. _asset-material-roughness:
:at:`roughness`: :at-val:`real, "1"`
:at:`roughness`: :at-val:`real, "-1"`
This attribute corresponds to uniform roughness coefficient applied to the entire material. This attribute has no
effect in MuJoCo's native renderer, but it can be useful when rendering scenes with an external renderer.
effect in MuJoCo's native renderer, but it can be useful when rendering scenes with a physically-based renderer. In
this case, if a non-negative value is specified, this roughness value should be multiplied by the roughness texture
sampled value to obtain the final roughness of the material.
.. _asset-material-rgba:
+2 -2
View File
@@ -291,8 +291,8 @@ void mjs_defaultMaterial(mjsMaterial* material) {
material->texrepeat[0] = material->texrepeat[1] = 1;
material->specular = 0.5;
material->shininess = 0.5;
material->metallic = 0.0;
material->roughness = 1.0;
material->metallic = -1.0;
material->roughness = -1.0;
material->rgba[0] = material->rgba[1] = material->rgba[2] = material->rgba[3] = 1;
}