Graphics

 View Only
  • 1.  Creating a count-up text to match animating bar graph

    Posted 11-21-2014 20:47
    Hello, I'm trying to create a text field that starts at zero then counts up to a pre-determined final number. Basically I have a bar graph that moves from zero to any number. The animation is always 30 frames for the bar (no matter the final number). I would like to have my text field start at zero and then count-up and stop at a final number to match the bar graph; which I would have entered into the text field.

    I'm trying to accomplish this with a script (below) but am not having much luck. Please don't laugh at my script! lol I'm a Novice!

    'This will increase number from 0 to correct value

    dim numstart, numend, X as integer

    dim last as string

    self.getobjectbyname("Text1", last)

    numend = Cstr(math.Round(Csng(last)))

    numstart = 0

    X = 0

    While X


  • 2.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 20:50
    Do you have a version that includes Visual Logic? If the bar already animates, I would use the bar's value and pass it through the appropriate math blocks and then feed it into the text object.

    It all sort of depends on how you animated the bar though.. If you post your scene somewhere we could probably try it for you.

    #XPression


  • 3.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 21:29
    Thanks Brian, I animated the bar with an Animation Controller. I've uploaded to my google drive:

    https://drive.google.com/file/d/0B7fSEV5ATTTtUkg0Z3RWQkJHYjA/view?usp=sharing

    #XPression


  • 4.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 21:49
    Here is what I did.. It probably only works in recent versions of 5.9 though since it uses the FormatFloat() block to remove the decimal places. If you are using an older version, then you might need traditional scripting instead of that visual logic block.

    There was also a big problem with the BG video in your project. It looks like it was converted to the XPression Video Codec with the quality cranked up to 100% which will not work very well for realtime playback. You'll probably experience lots of stutters/glitches. I re-encoded it back at the default of 80% (you should make sure you check this for all your other scenes/videos).

    [IMG]http://i.imgur.com/ob7wK0E.png

    [/IMG]

    Here is a link to the project (with the fixed video clip):

    http://ross.brickftp.com/f/210912765

    #XPression


  • 5.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 21:52
    I use a free tool called MediaInfo to examine the video clips. You can tell by the overall bitrate that the clip was encoded at too high a quality value. It should be between 30-90 Megabits/Second, but yours was over 200.

    This is how you can check your other clips.



    #XPression


  • 6.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 23:14
    Brian, thanks so much... After your prompting about Visual Logic, I dove in and managed to figure it out. Basically created the same thing you did, but used the ROUND block to remove the decimals.

    As for my clips, yes I was encountering stuttering problems; and was having difficulty tracking down the problem. I Never even knew you could adjust the bitrates in the Xpression Video Coder (mine was set to ultra). The files are being delivered to me at that high rate, but now I know how to double check them. Thank you for checking that out!

    #XPression


  • 7.  RE: Creating a count-up text to match animating bar graph

    Posted 11-21-2014 23:30
    Brian I was curious... When you use xpression, what format do you tell graphics to deliver animations to you? Of course assuming that graphics is on macs and does not have Xpression AVI codec. I normally say animation codec but that does create large files?

    #XPression


  • 8.  RE: Creating a count-up text to match animating bar graph

    Posted 11-22-2014 13:55
    Since you need an alpha channel the best choices are fairly limited. Animation codec is good but rather large. Prores 4444 is good too, and PNG-codec in MOV file would be good too. You would need to run all of these through the video coder at 80% however to convert to XPVC.

    #XPression