-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Improved MaterialX import support to align with Blender's MaterialX exporter. #31439
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
Conversation
…rminant, invert matrix, creatematrix, length, crossproduct, floor, place2d, reflect, refract, ifgreater, ifgreatereq, ifequal, rotate2d, rotate3d, heighttonormal
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
@sunag, do you know why the mx_ nodes are defined in two places and what makes one choose one location over the other:
I put all my new nodes in the MaterialXLoader, but I just tried to minimize changes to the code of ThreeJS. But I think it may be best to have a separate MaterialXNodes that is not in the core ThreeJS package and can be referenced by the MaterialXLoader as well as other files, like the upcoming GlTF support for MaterialX node graphs. |
These Nodes were created specifically for Awesome work 🚀 |
|
@sunag it turns out a bunch of examples use the mx_ functions, particularly the noise functions, from the TSL nodes:
Hmm... not sure how to handle this. |
c2b4c03 to
6f718eb
Compare
Sorry @bhouston , I didn't pay attention to that. Wouldn't it be better to just move the new nodes to |
758627b to
74b25c7
Compare
|
@sunag I've made the requested change and centralized all mx_* nodes into MaterialXNodes within the src/nodes/MaterialX directory. |
b329b01 to
3ee58ab
Compare
3ee58ab to
de36b38
Compare
|
@sunag - I got a nasty merge conflict and then I messed up git and somehow lost your branch and got a nasty conflict - so I undid all that. Can you re-push your changes with a new name as I've lost them? I've kept working on this branch without your changes. I just added proper "time" support and a time example. :) |
|
@bhouston How are you getting your nodes out of Blender? I |
|
@bhouston mentioned this addon he's been working on bhouston/materialx_addon in the glTF-Blender-IO discussion here KhronosGroup/glTF-Blender-IO#2582 (comment) |
Description
Adds support for the following MaterialX core nodes:
Add support for standard_surface material inputs:
Improved handling of material rendering modes:
These were motivated by the fact that Blender exports these MaterialX nodes, but ThreeJS doesn't support them.
I've included a bunch of new mtlx example files that demonstrate the new features!
This contribution is funded by DriveCore, Inc.
The new materialx loader example results:
What it looks like before this PR (notice that even the original materials now look better):