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
363 stars 37 forks source link

TiledImage node in Texture2D not behaving (update --> nodegraphs are not working) #182

Open kvrbharadwaj2 opened 2 years ago

kvrbharadwaj2 commented 2 years ago

Used files from MaterialX https://github.com/materialx/MaterialX/blob/main/resources/Materials/Examples/StandardSurface/ both brick and wood files which load .jpg files to "tiledimage" node are not behaving properly. (maybe color3 values are not generated). when replaced with "image" node "base" node is getting proper color3 values.

Also tried generating osl shaders from mtlx and used in cycles script which worked fine (but we need to give absolute paths for textures not relative)

so the problem maybe with "tiledimage" node. it is in Texture2D in MaterialX editor

Specs : Windows 8.1 Blender 3.0 Addon 1.0.65

Update

Also tried "Contrast" node with both pivot 1.0 and 0.0 same result (just white colored cube) implemented contrast node with individual subtract,multiply and add nodes (pivot should be 0.0 color blue) -> correct result so changed pivot values in MX_STD_contrast in /hdusd/mx_nodes/get_stdlib_defs.py to 0.0 still "contrast" node renders white cube only

seems like nodegraph definitions are not working properly. because both contrast and tiledimage are from libraries/stdlib/stdlib_ng.mtlx

you guys implemented nodegraphs as blender "nodes" actually they should be implemented as blender "nodegroups" because when you import materialx file, if there are custom nodegraphs, materialx has to search for that nodegraph in custom library modules and then import them as blender "nodegroup" which actually knows computation. nodedefs are implemented in shader langs and nodegraphs are implemented in mtlx which are computation graphs. so only those nodedefs which has standard implementation(in materialx std_lib.mtlx) becomes nodes everything else should become nodegroups in blender.

only then actual materialx is implemented.

DagerD commented 2 years ago

Hi. Thank you, we will think about this.

bsavery commented 2 years ago

@DagerD please make a ticket to group "Nodegraph" in Blender.

DagerD commented 2 years ago

Created ticket BLEN-170.