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

MaterialXLoader: Implement separate(2|3|4) nodes #29437

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

aardgoose
Copy link
Contributor

@aardgoose aardgoose commented Sep 18, 2024

Fixed #29426

Implement separate(2|3|4) nodes, this is the first multi output node as far as I know so possibly incorrect.
Appears to work with provided test sample.

@beersandrew can you test?

examples/webgpu_loader_materialx.html Fixed Show resolved Hide resolved
examples/webgpu_loader_materialx.html Fixed Show resolved Hide resolved
@beersandrew
Copy link
Contributor

Related issue: #29426

Implement separate(2|3|4) nodes, this is the first multi output node as far as I know so possibly incorrect. Appears to work with provided test sample.

@beersandrew can you test?

Hey, thanks for the quick response on this one, really appreciated!

I'm seeing some issues, I've added separate3.mtlx & separate4.mtlx samples in my MaterialX fork and I expect to see the following.

2,3,4 from left to right.

image

but I currently see this on the current branch:

image

not sure if this is helpful but it seems that when I step down into the nodes produced underneath the colorNode each SplitNode instance has components of x.

Let me know if you're able to reproduce this with

const SAMPLE_PATH = 'https://raw.githubusercontent.com/beersandrew/MaterialX/separateNodeExample/resources/Materials/Examples/StandardSurface/';

const samples = [
  'separate2.mtlx',
  'separate3.mtlx',
  'separate4.mtlx'
];

@aardgoose
Copy link
Contributor Author

@beersandrew
I think I have fixed those cases, the initial input was being cached so that the outx was used repeatedly, and output elements weren't handled. Both those fixed now.

@beersandrew
Copy link
Contributor

@aardgoose looks good to me as well, thank you so much!

@Mugen87 Mugen87 added this to the r169 milestone Sep 18, 2024
@mrdoob mrdoob requested a review from sunag September 19, 2024 05:55
@sunag sunag merged commit 0f6e055 into mrdoob:dev Sep 19, 2024
11 checks passed
LD2Studio pushed a commit to LD2Studio/LD2Studio-Editor that referenced this pull request Sep 20, 2024
* implememt MaterialX seperate(2|3|4) nodes

* remove testing mods

* avoid cached nodes and handle output elements

---------

Co-authored-by: aardgoose <angus.sawyer@email.com>
@aardgoose aardgoose deleted the matx branch October 10, 2024 10:28
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.

MaterialX: Add support for Separate2, Separate3, Separate4 nodes in MaterialXLoader
4 participants