Jump to content

Preforming operations in a loop with SOPs ?


hyperforce

Recommended Posts

Hello,

I'm trying to create to create a system that can construct a room level by level and then merge them together.

But the amount of levels needs to be variable.

I tried to create the different level shapes using a Foreach sop with a cookie sop inside

However I'm having trouble fusing the results together as a cookie SOP seems to be limited to fusing 2 objects together per SOP.

So i'm wondering, is there a way to run cookie sop in a loop somehow. Fusing the first 2 levels together first then taking that result and fusing it with the next level. repeating until all levels are fused together?

Much appreciated.

Link to comment
Share on other sites

I'll need to reverse the face direction inwards after its all merged.

But you can see it forms a room with different levels.

These are 3 (but could be more) different shapes (one for each level) that need to be combined into one.

I also tried converting them into a volume and then converting them back to a surface. but that hasn't proven successful yet.

post-6166-133217756442_thumb.jpg

Edited by hyperforce
Link to comment
Share on other sites

Hello Erwin,

I learned what I think is a great trick using foreach sop. It's just to pass one "shape" ate each iteration and cookie that with the last iteration.

I'm posting a file (h12), and a jpg with the general idea. I hope it helps.

cookie.hip

Link to comment
Share on other sites

Thanks Gui that looks like what I need.

Much appreciated.

I have Houdini 11 still but I can open it.

Symek, do you mean the SOP solver DOP?

I watched some tutorials about that today, still had to look further into it though.

Edited by hyperforce
Link to comment
Share on other sites

I can't see how the sop solver (in sops, now in h12), can help in this case, because it's computation is based in time, foreach, in the other hand, do this in just 1 frame.

I can't see how time SolverSOP can't be helpful here because of that. Not to mention, that with sub-stepping turned on you can perform exactly like foreach :)

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...