How to animate Carve SOP in sequence on # of prims?

   5672   25   4
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Hi. I would like the carve sop to animate the “off-to-on” appearance of Nurbs Surfaces. I have created Polys and done some operations to convert them to a series of simple Nurbs surfs.

What is the next step? Use CHOPs? but how to get the sequence applied to each primitive in order (I know one step would be to create an ordered group of prims using Group SOP but beyond that I am lost).

Attachments:
how_to_animate_carve_prims_in_sequence_question.hip (72.4 KB)

User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Sorry. Forgot to lock the geometry. Here's an updated file…

Attachments:
how_to_animate_carve_prims_in_sequence_question2.hip (88.4 KB)

User Avatar
Member
889 posts
Joined: May 2006
Offline
this uses a foreach, might be a neater alternative way though.

Attachments:
carve_prims_sequence.hip (99.5 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
182 posts
Joined: April 2009
Offline
You can also have some fun with Chops and the Primitive SOP and control everything with groups or attributes.

Attachments:
anim.gif (552.3 KB)
prim_anim.hip (1.3 MB)

Mariusz Wesierski @ Mackevision
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
That's awesome I got two different responses and solutions! Thanks guys. The only problem is that with mestela's solution the foreach seems to start the carve before the first one is finished.

What I am aiming to do is to carve in such a fashion that a complete carve is finished before the next one starts. Sort is cool but I think using an ordered group is where I will try to aim my efforts so that I can make it look like an animation I did before but with a very tedious workflow: I made it look like the outgrowth was happening like the development of a line when you draw the line with a pen or pencil. Each segment starts incrementally when the pen reaches the farthest point, not before (otherwise it would look like you're drawing with multiple fingers).

How can I amend the carve solution (or the primitive solution) so that it happens one primitive at a time in sequence? Thanks in advance.
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Maybe I could use blackpixel's $SCALE variable to animate the carve from CHOPs in sequence. I could potentially adjust the individual animation curves to happen at the sequence speed and order I desire.

What do you think?
User Avatar
Member
889 posts
Joined: May 2006
Offline
Heh, the first version I did had no overlap, ironically I thought you didn't want that effect, and played around until I could do a staggered version.

Try changing the carve expression to this instead:

$T*20-ch(“../each1/attribval1”)


20 controls the speed, bigger number = faster. using 20 means the entire shape is gone in 78 frames, using 0.5 means it all finishes in about 3100 frames.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
889 posts
Joined: May 2006
Offline
Also take a look at this video tutorial:

https://vimeo.com/125420748 [vimeo.com]
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Thanks for the expression. I will try that as soon as I get a moment. I will also have a look at the tutorial when I get a moment. Glad you took the time to respond. Much appreciated.
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Mestela, the question now remains, how do I sort in a custom way? I posted to a different topic asking how I could sort according to group SOPS?

Let's say all of my prims are individually placed, one each, in a sequential chain of group SOPS numbered group1-group62? The order of the sops is important and the order that I would like. How can I use these groups to create an attribute that can be passed into the ForEach so that the prims disappear or reappear, whichever I choose, according to this custom group attribute?
User Avatar
Member
258 posts
Joined:
Offline
I do this in chops with a copyChop, where you can stamp the incoming curves. It's also easiest to animate with a chop, such as a pulse or a trigger, or a pulse hooked into a trigger. You can use that for your timing

You can sort with a sortSop which has many different options for how you can sort.

I use this technique all the time for animating crazy amounts of curves offset in time. I used to do it with forEach but found once you have a considerable amount of curves it tends to get real slow…
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Thanks. I understand that I can use CHOPs and a Sort SOP but the question remains for me is exactly how the connections and expressions are written to target each individual grouped $PR in the correct sort order. What expression would I write in the Sort SOP to reflect the correct order that I have defined by my ordered groups? (group1-group62 with varying prim numbers individually in each group)
User Avatar
Member
889 posts
Joined: May 2006
Offline
as always, probably a more elegant way to do this, but it works.

-I defined some groups, and then made a catch-all group of the ungrouped prims.
-foreach in group mode, contains a primvop that takes the foreach index (which will just iterate through each group), and bind that to a new prim attribute, ‘groupindex’
-random colour by this attribute to see the groups
-sort by this attribute
-foreach carve as before

Attachments:
carve_prims_sequence_by_group.hipnc (145.8 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
That's an awesome fix but I don't see the primvop in my list of SOPs. I am using H13 not H14.
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Oh, I see you attached a hipnc file. Can you attach a hip file instead? hipnc will mess up my licensing as I understand according to the EULA.
User Avatar
Member
889 posts
Joined: May 2006
Offline
No I can't repost a hip, I'm doing this from home while minding a sick family.

It's fine to open hipnc's in your commercial license to see how stuff works, its just that houdini itself will drop itself into non-commercial mode until you quit.

Just remember to restart houdini before getting back into production work (otherwise your work files will start being saved as .hipnc too)

The primvop is just a point vop/attrib vop in primitive mode.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
I get a VEX error when loading the AttribVOP within the Foreach SOP. Looks like my H13 is really outdated!
User Avatar
Member
889 posts
Joined: May 2006
Offline
I don't think there's any special sauce in that H14 setup. I'm hoping to get to work this afternoon, if I get time I'll load it up in 13 and fiddle it.

All it's doing is reading the each variable and putting it in a prim attribute, you could probably do the same with an attribute-create or prim sop.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
User Avatar
Member
235 posts
Joined: Sept. 2008
Offline
Thanks. I appreciate the length you're going on this. I'm scared to use the hipnc file any further since I might accidentally try to save it which will change my license (that's what support told me years ago). So I'll wait until you find a moment to do it from work with H13.

Really appreciate it. This solution will be a big time saver for me or anyone attempting to perform such a task. And that vimeo tut looks very complex and in-depth. I only briefly viewed the first iteration of the 6 part series.
User Avatar
Member
889 posts
Joined: May 2006
Offline
here's the same with an attribute create instead, just tested, it works in h13.
Edited by - June 23, 2015 22:20:07

Attachments:
carve_prims_sequence_by_group_no_primvop.hipnc (147.7 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://twitter.com/ThisIsRYOT [twitter.com]
  • Quick Links