Component Builder Variant troubles

   3211   7   6
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi,

I ran into some problems with Component Builder and Geometry variants.
Attached is a screenshot of my scene.

There's 6 geo variants of the tree with identical material tags that get applied in the Componentmaterial node.
Now if I change the "working variant" in the Componentgeometryvariants node, the output from the Componentmaterial node looks good for any variant (set in the compomnentgeometryvariants node), but once a Setvariant node is appended, things break, regardless of whether a working variant is chosen or not. For some reason, I get Variant6 with those funny layer type icons next to it in the Scene graph tree and also the chosen variant, but without material applied, even though I use "**/tag" syntax in the Componentmaterial node and the tags are correctly shown in the scene graph tree for the chosen variant.
The same incorrect behavior then happens in the Component Output node and is then saved to the .usd file.
All the nodes are just "out of box", no parameters have been tampered with.

Any idea where to start looking for a problem?

Cheers,
Ivan

Attachments:
Screenshot 2022-05-03 190232.jpg (761.1 KB)

User Avatar
Member
53 posts
Joined: March 2014
Offline
If I understand your problem correctly, it's because the hierarchy is different between your variants and the ComponentMaterial node assigns the material to only one variant at a time. If you use a SetVariant after it, you reveal the other variants that the ComponentMaterial did not consider.
The solution to this problem is to use one ComponentMaterial node per geometry variant. You need to plug them between the ComponentGeometry nodes and the ComponentGeometryVariants node. You can hook them all to the same materialLibrary node.

Then, the important thing is to rename the material variantSet and variants to match the geo variantSet and variants.
Edited by flord - May 4, 2022 21:30:50

Attachments:
20220504-212823.png (116.6 KB)

User Avatar
Member
53 posts
Joined: March 2014
Offline
The other soluton is to have the same hierarchy in all variants.
User Avatar
Member
129 posts
Joined: Oct. 2020
Offline
The solution to this problem is to use one ComponentMaterial node per geometry variant. You need to plug them between the ComponentGeometry nodes and the ComponentGeometryVariants node. You can hook them all to the same materialLibrary node.

this maybe works for this simple setup, but what about a for loop for the component geometry lop that feeds into the componentGeometryVariants lop?

I cant get the materials to apply to each variant except the last variant.

Attachments:
Screenshot_8.png (150.8 KB)
Screenshot_9.png (67.2 KB)
Screenshot_10.png (51.4 KB)
Screenshot_11.png (63.5 KB)

https://www.youtube.com/channel/UC4NQi8wpYUbR9wLolfHrZVA [www.youtube.com]
User Avatar
Member
129 posts
Joined: Oct. 2020
Offline
UPDATE FIXED:

the problem was seen in 19.5.303 and apparently it got fixed last week in a daily build.

nested for-loops now work correctly (mostly with no huge errors) with component builder.
https://www.youtube.com/channel/UC4NQi8wpYUbR9wLolfHrZVA [www.youtube.com]
User Avatar
Member
21 posts
Joined: May 2015
Offline
AhmedHindy
The solution to this problem is to use one ComponentMaterial node per geometry variant. You need to plug them between the ComponentGeometry nodes and the ComponentGeometryVariants node. You can hook them all to the same materialLibrary node.

this maybe works for this simple setup, but what about a for loop for the component geometry lop that feeds into the componentGeometryVariants lop?

I cant get the materials to apply to each variant except the last variant.
I'm exploring a similar setup with for each loop. I wonder how you set up the component output node in the end? I lost all the variants somehow after adding component output node.
Thanks!
User Avatar
Member
123 posts
Joined: Jan. 2015
Offline
NMVHS
AhmedHindy
The solution to this problem is to use one ComponentMaterial node per geometry variant. You need to plug them between the ComponentGeometry nodes and the ComponentGeometryVariants node. You can hook them all to the same materialLibrary node.

this maybe works for this simple setup, but what about a for loop for the component geometry lop that feeds into the componentGeometryVariants lop?

I cant get the materials to apply to each variant except the last variant.
I'm exploring a similar setup with for each loop. I wonder how you set up the component output node in the end? I lost all the variants somehow after adding component output node.
Thanks!

I have the same problem :/
User Avatar
Member
21 posts
Joined: May 2015
Offline
Heileif
NMVHS
AhmedHindy
The solution to this problem is to use one ComponentMaterial node per geometry variant. You need to plug them between the ComponentGeometry nodes and the ComponentGeometryVariants node. You can hook them all to the same materialLibrary node.

this maybe works for this simple setup, but what about a for loop for the component geometry lop that feeds into the componentGeometryVariants lop?

I cant get the materials to apply to each variant except the last variant.
I'm exploring a similar setup with for each loop. I wonder how you set up the component output node in the end? I lost all the variants somehow after adding component output node.
Thanks!

I have the same problem :/

I had a look inside Component Output node, it has its own way to determine where to read geo and materials. It’s quite complex, so I changed the node mode to “input geo” instead of “upstream input” (I might get the name wrong, but it’s the first setting in Component Output node).

It works but you don’t have geo / mat as separate usd after output, only payload, but that’s ok. It’s designed that way to export custom asset setups.
  • Quick Links