View Full Version : MaxScript Displayable Stopwatch
06-06-2003, 05:55 PM
Would there be a simple way to make a "stopwatch" that will update a text object as a counter? To put timecode or MIN:SEC type stuff onscreen.
06-06-2003, 06:10 PM
maybe something like this ?
look for Cuneyt Ozdas' Counter Text
06-06-2003, 06:21 PM
Counter Text has some formatting issues. It only lets you show max time. I'd like to be able to set an arbitrary start time and have it count in either direction.
06-06-2003, 06:34 PM
yeah i figured as much. I had problems with it myself.
there IS an example for a counter, but that's way to complex for my liking [uses expressions]
i know magicm has a script involving 'animated' text, i'll ask him to have a look here, don't sit on it tho, this week has been a nightmare for the both of us at work [WAY tight deadlines], so give the fellah some time ;)
06-06-2003, 09:45 PM
Check out this link from cgcharacter.com
I think the use of the Ambient Controller may apply to your problem. I've quoted the passage you may find most useful below.
"The third one is real hard as Max does not provide this event message!!! However I worked out a little trick a few years ago to get around this… It turns out that the Ambient Light controller is evaluated during rendering each frame before geometry set-up. So what I do is make the Ambient Light controller a list controller (so you can still set the Ambient Light normally) with the second controller a float_script() controller called "System_Script_trigger". In this script you will add a call to any scripts you want rendered once per frame before geometry set-up… it is effectively generating the system event you need that the Max API does not provide. Here is the single line you have to add to trigger our Neck_control script:"
Script a function to edit text object and put in the ambient controller....
06-08-2003, 12:11 AM
07-13-2003, 09:55 AM
Counter Text has some formatting issues. It only lets you show max time. I'd like to be able to set an arbitrary start time and have it count in either direction
:eek: That's wrong!!!
Actually the max time support was not present in th first version, added afterwards. The clock samples in the zip uses max time, but that's not the only alternative.
Here is a sample file which uses "again max time in seconds" but modifies it. also there are 2 more counter texts bint to sliders. you can simply animate the slider parameter. Keeping the speed at zero the big time will show the animated offset value only. http://www.cuneytozdas.com/temp/counter_sample_max4.zip
Lots of things are possible: Just use simple parameter wirings, expression or script controllers on User Count.
11-19-2003, 10:20 AM
Hi everyone, I'm reviving this topic becuase I need to use the trick solution Kramsurfer told us about.
The link to the workaround isn't available anymore. Can anyone help me by explaining how this trick works? and also... some sample code would be very helpful to me.
I am very new to MAXscript, so I'd really appreciate any help.
11-19-2003, 10:29 AM
In detail. I'm a newbie and therefore need to know exactly how to:
make the Ambient Light controller a list controller with the second controller a float_script() controller called "System_Script_trigger".
In this script you will add a call to any scripts you want rendered once per frame before geometry set-up
11-19-2003, 11:18 AM
WOW! it works!
I have no idea how a newb like me managed it, but I actually figured it all out from that paragraph above. Sure took some time though.
I figured out I could:
View dopesheet > assign list controller to ambient lights > assign float script to weight1.
in the float script I put:
I hope that helps anyone else who is interested. I now know much more about MAX than I ever intended to! arrrg!
11-19-2003, 02:29 PM
Maybe I'm missing the point, but if this thing is going to get rendered then the stopwatch doesn't want to relate to "system time" it needs to relate to the output frame rate?
01-15-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.