Jump to content

Is there a way to use a branch based on a condition?


magneto

Recommended Posts

I thought I could do this with a switch SOP but I need the connections going the other way around.

Basically I have foreach SOP that assigns an integer index to each primitive, and then I want to use this primitive to choose which color sop to use after that based on the index I created, but not sure how to do it.

So here is how it looks inside the foreach SOP:

mrFg2.png

Can I make it so that the integer chooses which color SOP comes after?

I could use stamping but I want to change the point colors.

Thanks :)

Edited by magneto
Link to comment
Share on other sites

Thanks Eetu, exactly what I wanted. I was somehow stuck in thinking I needed to do it the other way around, now I know :)

I made these images to show nord3d what I needed so I might as well post it to make it more clear:

This is how I needed to do it before:

i44SR.png

whereas I wanted something like this which is a mockup, where the switch node decides which node comes after itself based on the index.

XP1AU.png

Of course Eetu's example does it perfectly.

Edited by magneto
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...