ben Posted January 25, 2010 Share Posted January 25, 2010 (edited) Hi , I'm studing houdini on my spare time for 3 weeks now. To test and improve my knowledge I'm trying to set up a basic crowd sim, and I could use some help... 1) Let's say I need to know what was the value of an attribute 5 frame back. How can I do that ? 2) I have particles moving snapped (ray SOP) to ground (grid + mountain). I need to know if they are moving up the surface, and if so decrease their Velocity. Any idea ? As you can see on the attached picture the purpose is to decrease velocity (walk) when climbing and increase velocity (run) when moving down. Of course animations blend are driven by velocity blue : idle green : walk yellow : jog red : run Any advice welcome thanks ben Edited January 25, 2010 by ben Quote Link to comment Share on other sites More sharing options...
majikal Posted January 25, 2010 Share Posted January 25, 2010 i would do that in CHOPs. There is shift node in CHOPs than you subtract this shifted channel from original channel. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted January 25, 2010 Share Posted January 25, 2010 1) For time-shifted attributes, a Geometry CHOP followed (as majikal suggests) by a ShiftCHOP or accessed externally using chopi()|chopf()|chopt(). 2) Slope CHOP. Quote Link to comment Share on other sites More sharing options...
ben Posted January 25, 2010 Author Share Posted January 25, 2010 Thank you ! I'll try that after work. And I guess it's time to learn a little bit more about CHOP context... Quote Link to comment Share on other sites More sharing options...
Nerox Posted January 26, 2010 Share Posted January 26, 2010 CHOP's that's quite interesting. I was thinking about a VOP's solution. If you create a series of attributes like cd-first, cd second, cd-thirth ect. And adjust these in a little network in VOP's which passes the value on each frame from the second to the thirth, the first to the second, and the current to the first. You'll end up with attributes holding the cd value of the previous 3 frames. The down side of this is that you need to add more nodes and you'll and up with a linear growth of processing when you want to sample further in history. I used this method on particles, I wasn't aware of the CHOP's method. I wonder would it work on particles, probably only when there cached? Quote Link to comment Share on other sites More sharing options...
SpencerL Posted January 26, 2010 Share Posted January 26, 2010 i think a pretty straight forward way is to use a timeshift SOP, and put in $F-5. Then use a point() expression to lookup the value from the timeshift, or feed the original pts into an attrCopy SOP and the timeshift into the second input. Quote Link to comment Share on other sites More sharing options...
ben Posted January 27, 2010 Author Share Posted January 27, 2010 Timeshift SOP feed my needs for now. But I've dive into CHOP also, watching for the slope thing, and it's quite amazing. Thanks for all your good advices Quote Link to comment Share on other sites More sharing options...
SpencerL Posted January 27, 2010 Share Posted January 27, 2010 Timeshift SOP feed my needs for now. But I've dive into CHOP also, watching for the slope thing, and it's quite amazing. Thanks for all your good advices One thing I forgot to mention is that if you are using the timeshift on something like a bgeo/geo sequence, you will probably need to clamp your values in the timeshift SOP between your written out frame range. For example, if your bgeo seq starts at frame 1, your time shift will be trying to read frame -4. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.