Help to make a clock using $F

   6573   8   0
User Avatar
Member
10 posts
Joined: Feb. 2006
Offline
Hi all
I just started Houdini and hope there is a very simple way to do this

the idea is a digital clock (HHMMSS), i hoped i could simply put an expression into a Font SOP but none of my attempts have worked…

Can you get the text part of the font SOP to evalute an expression?
say something like
round($F/3600) round($F/60) $F2

(ps not sure about houndini an “round” but hopefully you get the idea)

Or is there a better way… i have also tried making a expression in “settings” “aliases and variables”

but again the text part of the font SOP doesn't find the function or evalute the expression

i have tried serveral ideas but i'm not getting anywhere and hope that my problem is a no brainer for others.
)

thanks
Nick
User Avatar
Member
557 posts
Joined: July 2005
Offline
backticks (the ` character, next to the 1 on most keyboards) is your friend. The attached has the wrong expressions, because I'm lazy, but you'll get the idea.

Attachments:
timecode.hip (161.9 KB)

User Avatar
Member
10 posts
Joined: Feb. 2006
Offline
Thanks heaps…. a whole new world has opened up

and ya are so not lazy…. a response in under 1hour!

you are Gold!


However i bet you saw this coming

what other functions are available like “int”…. that could help me keep the seconds between 0 and 59? (as it is linked to the frames and they just keep increasing…. can you point me to a list or some other resource… they seem so scarce

or is there way that i can use the “expressions” in “aliases and variables”
(but then i would need to call a function from the text field of the SOP

any ideas?

Thanks again!
User Avatar
Member
12 posts
Joined: March 2006
Offline
nick_bart
what other functions are available like “int”…. that could help me keep the seconds between 0 and 59? (as it is linked to the frames and they just keep increasing…. can you point me to a list or some other resource… they seem so scarce

You can use the modulo operator (%) to keep the seconds going from 0 to 59. Change $F to `$F%60`. And you might want to look up the padzero function in the online help.
User Avatar
Member
10 posts
Joined: Feb. 2006
Offline
thank heaps

can you tell me where the online help is?

are you refering to the houdini exchange?

or is there an index of functions available somewhere?

cheers
User Avatar
Member
8081 posts
Joined: July 2005
Offline
nick_bart
can you tell me where the online help is?

I think he meant clicking on the question mark icon in the top-right corner.
User Avatar
Member
10 posts
Joined: Feb. 2006
Offline
Ahhhh! thanks

I however have a problem with this… it seems to have a error

i generally run houdini on a PC running RedHat and when i try to search for anything in the help it pops this error message

Warning -jar not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError .opt.hfs8.0.474.mozilla.chrome.doctool.jar
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
at __gcj_personality_v0 (/opt/hfs8.0.474/bin/java.version=1.4.2)
at __libc_start_main (/lib/tls/libc-2.3.4.so)
at _Jv_RegisterClasses (/opt/hfs8.0.474/bin/java.version=1.4.2)

i have houdini on a winXP and the search is fine…

I'm sure this prob has occured before… hopefully an easy fix, can anyone point me to one?

also is the search for these forums tricky or what? i either get 2000 forums results or none! ?

Thanks again
User Avatar
Member
8081 posts
Joined: July 2005
Offline
I'm just guessing here but you might need to install Sun's Java Runtime.

http://www.java.com/en/download/manual.jsp [java.com]
User Avatar
Member
10 posts
Joined: Feb. 2006
Offline
I'm having problems with the install…. i will follow it up with our IT support and watch them fail for the next 2 weeks P

thanks again
Nick
  • Quick Links