Jump to content

instance an animation of bgeo's


deecue

Recommended Posts

So I'm hoping this is capable, but i want to be able to activiate an animation through some kind of expression (probably if statement) linked to either a spare channel or chop or channel of any kind really. the simple expression should be no problem to get working, i.e. if(blablabla>=10,0,1), or something on those lines..

but what i am having problems with is how to activate an actual animation (series of bgeo's) with that expression in a non-linear type way. i know how to bring in the series through a file chop, but after that it becomes more difficult.

as a test, i rendered out a 14 frame bgeo series of a sphere pulsating (just getting larger and smaller again fast). now i want to bring that animation back in (file sop) and play it from frame 1 when i say so. what i have attempted so far is basically this:

1. create a sin wave in chops and exported to the pt0y channel of an add sop (the y direction of pt 0). this is just to have an animated channel originated from chops and brought in to sop level to reference from.

2. i then have two file sops plugged into a switch sop. the first file input is pointed to impulse0.bgeo, and the second file input is impulse`($F-1)%14`.bgeo. the $F-1 is because they start at 0, so at frame 1, it needs to be at 0. and the %14 is so it will loop over and over. so if i hit play at this point and slide my switch param from 0 to 1, it switches between the first still frame and the complete impulse animation.

3. now, in the switch input, i put the following expression: if((ch("../add1/pt0y"))>=0,0,1) . when played back, the still frame is shown when pt0 from my add sop is above 0, and the animation is shown when it's below 0.

ok, now this is somewhat good. i have a sin wave generated in chops and it activates an animation whenever it's below 0. which is everything i wanted except for one thing. since the second switch file input is looping starting since frame 1, whenever my sin wave dips below 0 and the animation activates, it activates wherever the loop exists at that frame. and what i want is it to activate starting only at impulse0.bgeo. that is pretty much what i meant by it being non-linear. i want this channel to activate the animation from it's begining always. let it finish out it's animation and send it back to bgeo # 0 and sit there until activated again.

i don't know if this can be done through expressions or what, but i am dying trying to figure it out here. the only other thing i thought of was having 14 file sops (each sop would be the consecutive bgeo in the animation) plugged into the switch sop and somehow attempt it that way. no luck there either, but maybe someone else could do it. it would almost be nice if the file sop itself could take an expression. so i could just write if(blablabla, impulse0.bgeo, impulse$F.bgeo).

if anyone can help me on this one, that would be soooo great.

thanks everyone for reading the long post. :)

dave

oh, and one more thing. the actual animation doesn't have to exist within a series of bgeo's brought in from a file sop. it can actually exist in the same hip file in another obj or wherever. i just considered it that way to keep it cleaner and easier. so if it's easier to do that way, then im all ears.

Link to comment
Share on other sites

Try with the attachment below.

I animated the Box1 non linearly.

(NB: unlike in Maya for example, non-linear animation is very natural for Houdini)

I used the Count CHOP to get the number of frame elapsed from the last threshold-cross.

see all Count CHOP parameters and play with 'em.

Since the Warp CHOP does not exactly do the job ( doesn't properly evaluate the first channel input at the second channel input value ) i used expressions in /add1, and as i couldn't override ( no more CHOPs but expressions) the box channels, i referenced a copy of box1 (RMB-click -> refrence Copy ,on it).

Et voila!

Hope it helps!

Hint: I don't know if using a sequence of .geo/.bgeo files is a good idea, because i think it won't be properly motion blurred ( since the geometries are being interpreted as totally different objects,and not a single geometry deform/animated over time.)

decue.zip

Link to comment
Share on other sites

Hey FrenchOP,

Thanks a lot for all that... You approached it a totally different way than I did which was really nice to have an example of. You raise a good point about the referenced series of bgeo's and the motion blur. I haven't tested it out yet, but I am not too worried about it having MB. And the reason i was going this route was because the actual animation was going to be somewhat complex, and I did not want to have to figure out how to reference a ton of different channels from something in chops so that it animated all the different parts of my object correctly. so it seemed appropriate to go the bgeo route and just have chops simply play it back.

So with the help of the people over on the sidefx forums, I was able to get where I wanted. It got a little more complicated when audio was brought in to it to drive the animation correctly. It ended up working through a series of file sops plugged in to a switch that was controlled by a chop network (consisting of mainly an audio file with maths, envelopes, wave, and copy chops). It was mainly the copy chop that sent the bgeo animation back to frame 1 everytime the audio reached a certain amplitude (thank you talkien).

But once again, thanks a lot for taking the time to do that for me. It really showed me another route in which to do it completely within houdini without relying on the bgeo factor. And I actually may procede that way so you're example will help out a lot.

Thanks a bunch,

Dave

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