GPUOpen-LibrariesAndSDKs / BlenderUSDHydraAddon

This add-on allows you to assemble and compose USD data with Blender data and render it all using various renderers via Hydra.
Apache License 2.0
368 stars 39 forks source link

Cannot load materialx graph #253

Open fire opened 2 years ago

fire commented 2 years ago

https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/resources/Materials/Examples/GltfPbr/gltf_pbr_boombox.mtlx

fire commented 2 years ago
  1. Install usd hydra https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon/releases/tag/v1.1.1
  2. Install blender 3.2
  3. Enable
  4. Import materialx
  5. No change.
  6. Cannot put material on the mesh in blender.
VascoPi commented 2 years ago

Hi, The implementation of the glTF PBR material has been added since MaterialX 1.38.4 (Add glTF PBR #861) Currently, BlenderUSDHydraAddon supports MaterialX 1.38.0.

bsavery commented 2 years ago

@VascoPi please make a task to update to latest MaterialX

VascoPi commented 2 years ago

Sure, here's the ticket.

VascoPi commented 2 years ago

blender_hfuCmOJdc5 blender_kVvckbhEUx

Quick review. I was successful in building HdRpr using MaterialX v1.38.4. Importer and render (Full and Interactive) work well, at the moment no issue is observed.

A discussion with HdRpr devs is needed to update MaterialX version.

VascoPi commented 2 years ago

@bsavery An approach without updating MaterialX version, adding a single file gltf_pbr.mtlx and generating mx classes work as well.

fire commented 2 years ago

Can you post some instructions and sample blend project files?

I wanted to tell others this workflow works today without release, and whenever the version is updated, we can forward update.

VascoPi commented 2 years ago

Here's the blend scene. gltf_pbr_blend_scene.zip

Here are the files you need to put into BlenderUSDHydraAddon_1.1.1_Blender_3.1_Windows.zip before installing the addon. gltf_pbr_materials.zip copy gltf_pbr.mtlx -> BlenderUSDHydraAddon_1.1.1_Blender_3.1_Windows.zip\hdusd\libs-3.10\libraries\bxdf\ copy gen_gltf_pbr.py -> BlenderUSDHydraAddon_1.1.1_Blender_3.1_Windows.zip\hdusd\mx_nodes\nodes\

fire commented 2 years ago

@VascoPi When will this be in a new version of the BlenderUSDHydraAddon?