Hi:
I am trying to implement my animations using hard code, NOT using the GUI channel editor
At any time t, I would need to invoke some expression I have written to calculate the position as well as the pose of my character depends on which feet he has on the ground or some other factors.
This is a school project, even though I am allowed to use houdini. I am supposed to use as little as houdini feature as possible…
Where would I go about learning to hard code the animations?
the resourses on web seems to focus on GUI more, but I need to learn the more advanced feature
Any suggestions???
Hard code?? Help @@
6850 9 1-
- xusword
- Member
- 11 posts
- Joined: 7月 2005
- オフライン
-
- IsStuff
- Member
- 238 posts
- Joined: 7月 2005
- オフライン
-
- JColdrick
- Member
- 4140 posts
- Joined: 7月 2005
- オフライン
I strongly suspect the challenge is to exercise the ability to translate motion curves in “real life” into formulae and relationships between channels. Anything else would appear to be a rather useless exercise IMHO.
You're asking a fairly broad question, xus - really even though you aren't allowed to use the channel editor, you still need to learn the interface. You can put formulae pretty well anywhere you want in houdini - if it has a field, just start typing and if it's a non-numeric, Houdini will assume you're typiing a formula. Typing “exhelp” in the textport will give you a list of expression commands, but you really need to learn the whole expression paradigm to get any serious use out of it. I wouldn't download the v7 beta right now - IMHO the help isn't there yet. You'll get a lot more help from looking at the pdf files that come with 6.1.
As Mesh says, without a little more detail it's hard to offer much concrete help. Sort of like asking “I need to program something in C++ - how do I do that?”
Cheers,
J.C.
You're asking a fairly broad question, xus - really even though you aren't allowed to use the channel editor, you still need to learn the interface. You can put formulae pretty well anywhere you want in houdini - if it has a field, just start typing and if it's a non-numeric, Houdini will assume you're typiing a formula. Typing “exhelp” in the textport will give you a list of expression commands, but you really need to learn the whole expression paradigm to get any serious use out of it. I wouldn't download the v7 beta right now - IMHO the help isn't there yet. You'll get a lot more help from looking at the pdf files that come with 6.1.
As Mesh says, without a little more detail it's hard to offer much concrete help. Sort of like asking “I need to program something in C++ - how do I do that?”
Cheers,
J.C.
John Coldrick
-
- xusword
- Member
- 11 posts
- Joined: 7月 2005
- オフライン
The only way I know to animate in houdini is to pose the keyframe and let houdini interpolate
However I do not want to be able to do that!
I need to know how coders can implement a animation by code in houdini
for example, if I were to do it in openGL. I would have a function that draw frames. After drawing one flame it sleeps for 0.03 seconds, then draw the next frame.
How it draws the frame could be controled by a static variable call “time”
I do not know if I can do that in houdini.
How does “time” work in houdini?
Will I be able to write codes to animate stuff in houdini without using channel editor?
I would want to do the following: “at time t1 to t2, call some function passing parameter (current time-t1) and the function would take care of the pose and positions”
What can I use.
Have anyone have such code that I can take a peek at?
However I do not want to be able to do that!
I need to know how coders can implement a animation by code in houdini
for example, if I were to do it in openGL. I would have a function that draw frames. After drawing one flame it sleeps for 0.03 seconds, then draw the next frame.
How it draws the frame could be controled by a static variable call “time”
I do not know if I can do that in houdini.
How does “time” work in houdini?
Will I be able to write codes to animate stuff in houdini without using channel editor?
I would want to do the following: “at time t1 to t2, call some function passing parameter (current time-t1) and the function would take care of the pose and positions”
What can I use.
Have anyone have such code that I can take a peek at?
-
- EigenAlex
- Member
- 639 posts
- Joined: 7月 2005
- オフライン
Not too sure I truly understand either…. But, do you mean something like a conditional statement to use certain value if the statement is true and false value if otherwise? And expression like:
if( $T > 0.5, TRUE_VALUE, FALSE_VALUE )
in your parameter, perhaps?
Or do you mean something else complete different as in doing with algorithm in C/C++ with OpenGL, math, and such?
Or alternatively, using HScript? Or even PERL/C++/Java/<whateverLanguageYouCanName> to control your HScript or session via hcommand? Or Unix SOP even?
Otherwise, CHOP could be a very good option too.
Oh, there is a global variable for time: $T.
$T == current time (in seconds)
$F == current frame (in interger)
$FF == current frame (in floating point)
$NFRAMES == total number of frames in your range
When you set couple of keyframes within your animation curve, you can select a particular keyframe and input your expressions. For the duration of that particular range (between this keyframe and the next) will utilize your expression before going onto the next set of expression. However, this approach can be restrictive and you'd probably have to deal with the transition between this expression and next. But otherwise, you can use the conditional statement in your expression.
Hope that clarify a bit.
-Alex
if( $T > 0.5, TRUE_VALUE, FALSE_VALUE )
in your parameter, perhaps?
Or do you mean something else complete different as in doing with algorithm in C/C++ with OpenGL, math, and such?
Or alternatively, using HScript? Or even PERL/C++/Java/<whateverLanguageYouCanName> to control your HScript or session via hcommand? Or Unix SOP even?
Otherwise, CHOP could be a very good option too.

Oh, there is a global variable for time: $T.
$T == current time (in seconds)
$F == current frame (in interger)
$FF == current frame (in floating point)
$NFRAMES == total number of frames in your range
When you set couple of keyframes within your animation curve, you can select a particular keyframe and input your expressions. For the duration of that particular range (between this keyframe and the next) will utilize your expression before going onto the next set of expression. However, this approach can be restrictive and you'd probably have to deal with the transition between this expression and next. But otherwise, you can use the conditional statement in your expression.
Hope that clarify a bit.

-Alex
Edited by - 2004年6月30日 23:56:49
-
- xusword
- Member
- 11 posts
- Joined: 7月 2005
- オフライン
this sounds really stupid but I am really new in houdini
I know where to put all code in my expressions
I have picked up quite a little readion the help file on expression languagus
but i still don't know how scripting languages works
How would I script?
Where do I learn how to script?
Thanks for Alex I know there is a variable call $T that represent the time… before that I have no idea
ops:
Can someone also tell me where I would find some example code?
I know where to put all code in my expressions
I have picked up quite a little readion the help file on expression languagus
but i still don't know how scripting languages works
How would I script?
Where do I learn how to script?
Thanks for Alex I know there is a variable call $T that represent the time… before that I have no idea
ops: Can someone also tell me where I would find some example code?
-
- EigenAlex
- Member
- 639 posts
- Joined: 7月 2005
- オフライン
Hi Xus, in H7's documentation, look to the “content” tab of your online documentation. There should be a section called “Scripting”. That's pretty helpful. If you don't have H7 installed, there should still be the “Scripting” pdf file which you can open. Otherwise, you can open up a Textport (alt+T) and type in help to find all valid HScript commands. In Houdini, there's a lot of different ways you can scripts in Houdini. Just depending on what you want to do and what you're familiar with.
-
- edward
- Member
- 8081 posts
- Joined: 7月 2005
- オンライン
-
- JColdrick
- Member
- 4140 posts
- Joined: 7月 2005
- オフライン
Yikes Alex - am I the only person that has an empty “contents” pane in H7? It's been blank since v6.5…all that's ever worked has been the search. What version are you running? When I can get a more recent drop I'll check it again(noticed the RH9's haven't been compiling lately and I'm stuck on 102).
I'm afraid it's still not clicking, Xus - there's pdf files on scripting, along with expressions. They cover it…time is measured as a variable $F(frame), $FF(floating point frame) and $T(0 to 1 where 0 is the start and 1 is the end of the animation). Pretty standard stuff. If you haven't done scripting of any kind before, then I'm afraid Houdini isn't the best place to learn it because the docs assume you understand the basic concepts… like in Perl, Python, shell, etc. Most people that have done scripting in any of these languages have little trouble picking up Houdini. If I'm correct, then I'd recommend learning a little shell scripting that has endless learning resources out there. Personally, I'd recommend shell scripting over a full language simply because it tends to be simpler and doesn't get into some of the more advanced programming concepts which you really don't need for Houdini.
Cheers,
J.C.
I'm afraid it's still not clicking, Xus - there's pdf files on scripting, along with expressions. They cover it…time is measured as a variable $F(frame), $FF(floating point frame) and $T(0 to 1 where 0 is the start and 1 is the end of the animation). Pretty standard stuff. If you haven't done scripting of any kind before, then I'm afraid Houdini isn't the best place to learn it because the docs assume you understand the basic concepts… like in Perl, Python, shell, etc. Most people that have done scripting in any of these languages have little trouble picking up Houdini. If I'm correct, then I'd recommend learning a little shell scripting that has endless learning resources out there. Personally, I'd recommend shell scripting over a full language simply because it tends to be simpler and doesn't get into some of the more advanced programming concepts which you really don't need for Houdini.
Cheers,
J.C.
John Coldrick
-
- EigenAlex
- Member
- 639 posts
- Joined: 7月 2005
- オフライン
-
- Quick Links



