PDA

View Full Version : Complicated Text Animation


bio2000
11-14-2003, 10:11 AM
hi all, i have some kind of a problem. the thing is i need to animate text in max (thats no problem) as the text just has to turn around itself. but i want the letters to change in random order (thats a problem) till one specific frame! i don't have any knowlege about maxscript, but i'll bet it would be possible to do it in scripting! can anyone point me to a solution or maybe help me out with this!

oh yes, to give you an idea of what i need:
The animation should look like the information panels you have in Airports, where the letters turn around very fast and then stop on one specific letter!

bio2000
11-14-2003, 12:52 PM
Pleeeease HELP! :cry:

EricChadwick
11-14-2003, 01:14 PM
If you could get away with a series of bitmaps instead of 3d text, then I'd suggest using IFLs... you could farily easily create several IFLs that have random orders to them, containing each letter of the alphabet as a separate bitmap, and each end with the proper letter.

One way...

bio2000
11-14-2003, 01:26 PM
good idea, but not exactly what i need!

Ian Jones
11-14-2003, 01:38 PM
Take a look in the MAXscript help files that come with the program. I was intriuged by your question and went to investigate MAXscript for the first time ever. I found the tutes are really quite useful. Within 5 minutes I had learnt that if you type the following into the Maxscript listener:


mytext = $Text01
mytext.text = "whatever"


It changes the text in the object Text01 to "whatever". Obviously from here onwards you'll need to look for looping and time controls which will allow you to change the text randomly over time. Don't ask me how to do that yet, :) but if you have a little prior experience with some sort of programming I'm sure you would be able to learn it.

Good luck!

bio2000
11-14-2003, 01:46 PM
i'll try to find out! but i have no f*****g idea about scripting, so thats my major problem!!! otherwise i think i would have figured out a solution!
but i'll try to mess around with this!
thanks Ian ;)

EricChadwick
11-14-2003, 02:05 PM
One thing I thought of is that these letter displays are not random... they're like the old alarm clock Bill Murray wakes up to in "Groundhog Day" with the numbers that flip over. The letters are in order(alphabetical?) and each slot flips through a bunch of them to get to the correct letter. So it isn't really random.

Not sure of that helps though.

Ian Jones
11-18-2003, 11:10 AM
Do you still need help with this?

I've been investigating MAXscript a bit more and I think I can probably make this for you. Besides, I guess it could help me study for my upcoming java exam *shudder* :)

bio2000
11-18-2003, 11:35 AM
Oooooooooh yes!!! :D I would love it! As i said before i have no idea about scripting, i'm more a grafx guy and not a programmer! So if you could send me something that might be useful to me ;)
Maybe try to contact me on my work e-mail: sgerges@in-visible.lu that we can discuss the thing!

Anyway, thanks in advance!

Ian Jones
11-18-2003, 12:59 PM
Message sent. :thumbsup:

Ian Jones
11-18-2003, 01:38 PM
Quick update for anyone who is interested:

I had a go at making some text cycle through the alphabet. To take a look at this in action yourself, goto MAXscript > new script

then paste this code into the blank window that appears:


global myText = text text:"a"
global i=1
global counter=0

fn typeAlphabet =
(
counter+=1
if counter>=100 do
(
alphabet = "abcdefghijklmnopqrstuvwxyz"
i+=1
myText.text="" + alphabet[i] as string
if i>=26 then i=0
counter=0
)
)
registerTimeCallback typeAlphabet


In the MAXscript window goto file > evaluate all

A text object appears in the scene, simply press play and watch it cycle through the alphabet.

bio2000
11-18-2003, 03:44 PM
Hey i tried your script and it worked out fine! I'm really waiting of what comes next ;)

kahuna031
11-18-2003, 06:41 PM
I don't know if you still need help with this but looking at you're script so far you need something to make the letters to stop at different frames. You need to ad something like this:
In the script, add two strings (text lines) one should be the final text and the other should just be the same number of letters as the first one, this will be the rolling string.
Rewrite the loop you allready have not to just apply for one letter but for the letters wich index number is'nt in a list (as an array)(the first letter has index 0 and so on).
Add a new loop in the end of you're old one. This loop should search the rolling string (text line), if one of the letters in the rolling string is 'a' and youre rolling is on 'a', then you would like that leter to stop spin. Add this letters index to the list.
End of both loops.

You should also make something to move to another frame between two loops iterations. Search for 'time' in the help section to find how to do that.
I don't have MAX on this cpu so I can't try this right now. But if you want I could write a draft of the code you need.

Ian Jones
11-18-2003, 10:46 PM
kahuna031: Any help is appreciated, I am completely new to MAXscript.

So far this script function 'typeAlphabet' gets run by a 'registerTimeCallback' which executes whenever the timeline moves. This happens whether the play button is pressed, or if the slider is moved forward or backward. What I really need is for a better time control, so I'll take a closer look in the reference. Any suggestions would be welcome of course...

Ian Jones
11-18-2003, 11:23 PM
Seems as if you can't use registerTimeCallback in our case. It won't apply at render time, and thus no animation happens. I'll work on a solution later today.

Ian Jones
11-19-2003, 11:34 AM
A solution was found for rendering, for those of you following the progress here is the technical solution:

http://www.cgtalk.com/showthread.php?s=&postid=967387#post967387

Kind of a hack, but it worked. Now, I just gotta figure out how to make it a lil' bit easier to setup.

CGTalk Moderation
01-16-2006, 04:00 PM
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.