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

Add material specific attributes #930

Merged
merged 3 commits into from
Feb 12, 2021

Conversation

pandaGaume
Copy link
Contributor

@pandaGaume pandaGaume commented Feb 10, 2021

Add Specific Babylon Full PBR related attributes to PhysicalMaterial. fix #923.
Add Babylon/GLTF attribute to force the use of roughness or metallic factor even when map is set. "Use Scalar Factor". Related to this topic
Layout the attribute to get a cleaner control
image

Add Babylon PBR related attribute to PhysicalMaterial, plus support for use roughness or metallic factor when map is set (Babylon or GLTF behavior)
@pandaGaume pandaGaume requested a review from Drigax February 10, 2021 11:13
isTransparencyModeFromBabylonAttributes = true;
}
gameProperty = babylonAttributesContainer.QueryProperty("babylonUseFactors");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused, why do we want this flag? if a map is being used for O/R/M, don't we want to export them instead of the factors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Max behavior is Map OR scalar, but gltf and Babylon use these factor to also multiply the values of the map. According to the GLTF 2.0 Spec "If both factors and textures are present the factor value acts as a linear multiplier for the corresponding texture values."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks for the explanation.

@Drigax Drigax merged commit 4892533 into BabylonJS:master Feb 12, 2021
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.

Set material environmentIntensity in 3DS Max
2 participants