xoctan657 Posted April 22, 2010 Share Posted April 22, 2010 hi evryone i want to know if there are some function in houdini like the getattr in maya and i need this function to make the wheel rotating when it move so i need to get the position in the previose fram thanks for all......................................... Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted April 22, 2010 Share Posted April 22, 2010 hi evryone i want to know if there are some function in houdini like the getattr in maya and i need this function to make the wheel rotating when it move so i need to get the position in the previose fram thanks for all......................................... You can get attrib from previous frame with help of timeshiftSOP. Then use expresion like point(), prim(), detail() to extract it. In attached file last node shows actual position and position in previous frame. previousFrame.hipnc Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted April 23, 2010 Author Share Posted April 23, 2010 hi swann i want to animate in the object level so i want to get the previous position in the object level so if you have any idea ,thank you Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted April 23, 2010 Share Posted April 23, 2010 I supose something like this should work. Just extracted global position with origin() expression and drives with it some object on SOP level. There you can measure like in previous example position now and before with timeShift. origin.hipnc Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted April 23, 2010 Author Share Posted April 23, 2010 swann, it is nice idea ,thank you very much, but i still looking for some way easy ................... Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 you can use chf() and cht() to access channel at different frame/time or bring it to CHOPs where you have curve for the whole animation range it however depends on how you want to use it, because i don't thing that recursive usage is allowed e.g. if you want to use previous frame of the same channel to calculate next, but you can use DOPs for that Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 oh, i've now noticed your intention you can use CHOPs especially Slope CHOP to calculate velocity of moving object, then use that to calculate rotation amount, it should be fairly easy but chf() should work great as well Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted April 23, 2010 Author Share Posted April 23, 2010 i try to do it with chop but it is not work !!!!!!!!!!!!!!!!!!!!!!! chopf not work.hip Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 you do not heed to use chopf() if you are using it with $F, just use chop() if you are using chop() or chopf(), do not export from chops, those are two different things, you can either export channel, or import with chop() expression here is example file with two possible solutions to your problem one using chops to calculate driven distance and using that to calculate rotation second is using position parameter of your path constraint and total length of the curve to calculate distance for traveling along path the second method is better since backward motion will work as well and you need less nodes however if you don't have path but animating position other way, the first method is better (but needs to be ehanced a little to work for any situation) radius in both examples is hardcoded 1.5, but you can easily reference radius parameter in expression once you create one rotating_wheel_along_path.hip Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted April 23, 2010 Author Share Posted April 23, 2010 hi anim,nice way but the chop method dos't work also with your file so if you have any idea , the valua from the chop expression dosn't updated.............. Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 i had some problem with updating the expression also, so try to rewrite the expression to anything and then back to this and maybe it'll update itself Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 ok, so the updating problem was probably because i was reading object's translation through object CHOP and then reading it in rotation of the same object, which was causing sort of evaluating cycle. Not causing error however, even working if you just set the expression, but it was wery likely to stop working so i updated the file so that null object is following the path and chops are reading it's position and torus is null's child and it's rotation is driven by chops result it worked for me even with reloading the scene, try Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 forgot to attach file, sorry rotating_wheel_along_path.hip Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted April 23, 2010 Author Share Posted April 23, 2010 anim in your file i couldn't understand the chop method i think there is some thing wrong. there is no channal named length in the chop node if you can see your attached file .you wrote this expression chop("../chopnet1/OUT/length") that i can't understand . Quote Link to comment Share on other sites More sharing options...
anim Posted April 23, 2010 Share Posted April 23, 2010 yes, there is right after Vector CHOP, there is only one channel named "length" but if you are using version less than 10.0.473, then you can have a problem because there was no Vector CHOP before that version so you've probably got warning and it was replaced by incomplete definition or merge CHOP or something and therefore it does not function Quote Link to comment Share on other sites More sharing options...
old school Posted April 26, 2010 Share Posted April 26, 2010 One thing you can't do easily with the expression method is burn-outs and have proper accumulation of the rotates. We all have to support burn-outs right? Why even bother if you can't. Oh I completely forgot about the new vector CHOP snuck in there with the ForEach CHOP last November. I updated my file to use this as it greatly simplifies the network. See the attached file. Note: There is a bug in Houdini where some CHOP networks don't properly initialize. Please see the red note in the file to get CHOPs to work properly. I re-submitted the bug again. rolling_wheel_v04.hip Quote Link to comment Share on other sites More sharing options...
xoctan657 Posted October 11, 2011 Author Share Posted October 11, 2011 hi evry one and it is necessary to rise this post again , i have a problem in wheel rigging in the chop method and this problem is : the chop give me the total distance travelled in world and this is alawys positive and in this case when the wheel start to go in back way on the path or in the opessit direction the rotation direction still the same and no way to change it to fit all the possible case,see the attached file . rotation_CHOP_METHOD.hip 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.