Unable to setup for each loop to create varients in LOPS

   2773   7   2
User Avatar
Member
88 posts
Joined: Feb. 2021
Offline
Hello I`m trying to replicate this setup but everything i try fails.

(im just trying using it to set a single pass value on a for each loop.)
with a for loop and variants.

https://youtu.be/EgTqz6y_oAs?t=1912 [youtu.be]

Could someone be amazing and provide me a working setup as an example ?
Edited by TangheStudent - July 27, 2022 15:21:41

Attachments:
gethelp.zip (2.8 MB)

User Avatar
Staff
4525 posts
Joined: July 2005
Offline
The variant creation in that hip file seems to work fine. It's the instancer where things are going wrong... So what is it that you want a working setup of? I'm not really clea ron what the instancer is even attempting to do...
User Avatar
Member
88 posts
Joined: Feb. 2021
Offline
Oh, OK! I thought the scene graph would show all the variant's geo at the same time, as well as visually list all the variants in the Variants field.

i c now that if u right click it you can select the varient.

I haven’t really tried researching what to do for the next part of the setup, but the plan is to create a collection with all the geo variants in them. (also add 2 different material variants)

And then have them randomly assigned to the points in the instancer.
Edited by TangheStudent - July 28, 2022 08:13:03
User Avatar
Member
5 posts
Joined: Feb. 2017
Offline
姆塔克
The variant creation in that hip file seems to work fine. It's the instancer where things are going wrong... So what is it that you want a working setup of? I'm not really clea ron what the instancer is even attempting to do...

In the question of Houdini19.5, why did the material lose, and what did I miss?

Attachments:
houdiniwenti.png (935.0 KB)

User Avatar
Member
88 posts
Joined: Feb. 2021
Offline
I have it somewhat working now with the variant setup,
The geometry however does not seem to load geometry




@MASee did you set the material Path in the componentMataterialnode ?
https://media.sidefx.com/djangobb_forum/attachments/26_houdini-indie-and-apprentice/85646_unable-to-setup-for-each-loop-to-create-varients-in-lops/houdini_Hk6AAxI2c8_20220802204204115678.png [media.sidefx.com]

Edit i have it somewhat working in some cases by unticking copy only specified prototype primitives.

it copies a plank space on some points now, though.
Can`t seem to figure out why.
Edited by TangheStudent - Aug. 3, 2022 11:32:22

Attachments:
test_2.hipnc (4.1 MB)
houdini_Hk6AAxI2c8.png (84.4 KB)
houdini_3JMUbBTdgS.png (358.3 KB)

User Avatar
Member
88 posts
Joined: Feb. 2021
Offline
In Unreal ASSET_model_varient_0 type none also appears in the tree below prototypes, so seems like that might be causing the empty instances.

EDIT:

%variant(variantSet = model) %type:Mesh fixed the problem
Edited by TangheStudent - Sept. 1, 2022 18:16:52
User Avatar
Member
2 posts
Joined: Sept. 2018
Offline
If I can send you my setup, use to automate the USD creation of the Megascans and Textures.com libs:
Everything is based on the particularity of the “component geometry variant” (named node_variant later).


Inside node_variant, if we dissect it, we can see a "foreach_end" without "foreach_begin", which has the consequence of "propagating" the local variables beyond the node_variant (@ITERATION, @NUMITERATIONS, @GEOVARIANTINDEX which are the 3 variables created by the "foreach").

Therefore, in the "componentgeometry" node, on the "file" node it is possible to use the @GEOVARIANTINDEX to have the iteration of the variant:


In my "file" node I created an "iter" parm which allows me to have better control.
From file node, the "file" parm :
.../3D_Objects/stone_pebble_xs_scatter/Single_Material_Version/stone_pebble_xs_`fpadzero(3,0,ch("iter"))`_LOD4.obj
`fpadzero(3,0,ch("iter"))` > convert "1" to"001" (not paying attention)

And in the end, we see that we have the different variants, without having to do several "foreach", only thanks to the node_variant :


Hope this helps someone
User Avatar
Member
212 posts
Joined: Dec. 2016
Offline
THX this seems like realy useful info.

I don't really understand the use of the dual for each loops (green and yellow)
If you could add the hip file that would be really usefull.
  • Quick Links