Jump to content

select what geo is spawned per iteration


Recommended Posts

Hi guys

Im fairly new to houdini

I am spawning a cube along a curve using a copy to points and a carve in a for loop, so I can spawn multiple cubes but also control their position along that curve individually.

My question is how can I use a switch and a for loop so that I can also control what geo is then assigned to each iteration of the copy to points, first I spawn a cube, then I want to select a sphere, then a cube again

or is a for loop not the way to do this?

 

Any help is super appreciated!

Thanks,

 

Link to comment
Share on other sites

Do I understand right, you want to alternate between two objects? You can create a new integer point attribute on your curve sop and then use that to drive the value of the switch by taking a point function into the switch. To alternate between two values you can first create a group by range at the curve and that way select every second point, (check Group by Range in the documentation). Then either by Attribute Wrangle or some other way, create a new point attribute, best would be integer, and then assign the value 0 to one and 1 to another group. Go in the documentation check the point expression, for-loop examples, how to copy random geometry, etc, you will figure it out. 

Good luck ! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...