Skip to content

[FEATURE] Add properties that typically appear from baking materials of the 4 sources #100

@bernhard-42

Description

@bernhard-42

Description

Some properties like dispersion or opacityMap are not supported in py-materials or mat-vis

Problem Statement

I baked quite some materials from GPUOpen and ambientCG and the baking code of threejs-materials creates:

  • Scalar values

    • color
    • metalness
    • roughness
    • ior
    • clearcoat
    • transmission
    • dispersion
    • thickness
    • specularColor
    • specularIntensity
    • clearcoatRoughness
    • displacementScale
  • Textures

    • color
    • metalnes
    • roughness
    • norma
    • opacity
    • displacement

material.vis.to_threejs() currently returns

  • Scalar values

    • color
    • metalness
    • roughness
    • ior
    • transmission
    • clearcoat
    • emissive
  • Textures

    • map
    • metalnessMap
    • roughnessMap
    • normalMap
    • aoMap
    • displacementMap
    • emissiveMap

Missing properties:

  • opacityMap is missing (used e.g. for sheet metal with holes, "name": "Sheet Metal 001", "source": "ambientcg")
  • dispersion is missing ("name": "Plastic (Acrylic)", "source": "physicallybased"). The user needs to add thickness in order for dispersion being visible

Info

  • displacement and displacemantMap are ignored in build123d since CAD tessellation do not have sufficient vertices

Proposed Solution

Add them to py-materials (or mat-vis) and expose them with to_threejs()

Alternatives Considered

No response

Additional Context

No response

Impact

No response

Changelog Category

Added

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions