Component Builder Variant troubles
3209 7 6- ivanmalek
- 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
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
- flord
- 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.
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
- flord
- Member
- 53 posts
- Joined: March 2014
- Offline
- AhmedHindy
- 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.
- AhmedHindy
- Member
- 129 posts
- Joined: Oct. 2020
- Offline
- NMVHS
- Member
- 21 posts
- Joined: May 2015
- Offline
AhmedHindyI'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.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.
Thanks!
- Heileif
- Member
- 123 posts
- Joined: Jan. 2015
- Offline
NMVHSAhmedHindyI'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.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.
Thanks!
I have the same problem :/
- NMVHS
- Member
- 21 posts
- Joined: May 2015
- Offline
HeileifNMVHSAhmedHindyI'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.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.
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