Complex setup + infinte recursion trouble

   2265   2   1
User Avatar
Member
253 posts
Joined: July 2006
Offline
Hello, glad to be here.

So my setup is like this:

4 bgeo sequences, seq01 seq02 seq03 seq04

The main seqs are seq01 and seq03, which are cycles. seq02 is a transition between seq01 and seq03, and seq04 is a transition from seq03 and seq01.


seq01 loops indefinetly, cycle starts at frame seq01_st and ends at seq01_end

Likewise seq03

seq02 is a fixed animation starting at seq02_st and ending at seq02_end

So does analogously seq04


seq01 and seq02 share a common pose at a certain frame, for seq01 this is seq01_match, which is a frame near the end of its cycle. For seq02 it's seq02_match, which is near the start of its animation.

Likewise, seq02 and seq03, share a matching pose, I'm sure you get the idea. So just I can seamlessly go from seq01 to seq02 to seq03 to seq04 and back to seq01.


So I pipe all 4 to a sequence blend SOP. Now I need to switch ( or blend ) from one to another given some trigger.

So far so good, so I have it by default running seq01.

Then I setup a spare null to hold my triggers, made a parameter called trig_seq03 and another called trig_seq01.

So when I trigger trig_seq03 I want to wait for the correct frame in the seq01 loop, which is seq01_match ( at the timeline this could be anyframe, remember this is an ongoing loop ) , then at that frame, switch to seq02 which should be at frame seq02_match, relative to seq02_st.

You can see this gets really complex very quickly, right now I got huge expressions of nested if's. It gets so confusing that I need to take another approach.

That's 1 problem.

The 2nd one is that i'm running into infinite recursion, cause I need to check on what sequence is running, in order to switch to the next sequence.

Sorry I couldn't make this shorter. I guess this is the typical problem a game engine has resolved by default with standard tools.

Please, throw suggestions as to where I should look at.

Thanks.


edit *replaced “running loop” with “ongoing loop”*
Edited by - Sept. 21, 2013 20:56:31
User Avatar
Member
122 posts
Joined: Aug. 2013
Offline
i dont understand you anything…. jejejeeee.
stop -transition- walk -transition- run. i think the transitione is in sop.
i remember some movie who the director cut with a knife the eye of a death dog but if you watch that movie u dont see how really like it was.
User Avatar
Member
253 posts
Joined: July 2006
Offline
Ok, imagine playing a game and a character walking slowly.

If you press the key that makes it run, the game loop has to cycle several times before it reaches the point where it can begin the transition from walking to running, and then has to wait for the moment when it can ( must ) switch to the run cycle.

So I need to emulate this in houdini. A game loop iteration, would be advancing a frame. Pressing a key, would be triggering a parameter on.

Does this help understanding my previous post ?
  • Quick Links