A Flash Developer Resource Site

Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 42

Thread: How do you manage file size with heavy animations?

  1. #21
    Member
    Join Date
    Jan 2007
    Posts
    48
    Sorry Blink? I am not sure I got what you meant right...
    Last edited by Stanley Lyndon; 03-18-2008 at 04:00 AM.

  2. #22
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    dont export to swf, export to png, and import that png in flash.

    file -> import -> .png
    lather yourself up with soap - soap arcade

  3. #23
    Member
    Join Date
    Jan 2007
    Posts
    48
    I tried that just now. There is no transparency still.

  4. #24
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    try this;
    1) start fireworks
    2) select File/Batch process
    3) select the files you want to process
    4) complete the following fields (you have to select "export" and then click on the "add" button);


    5) it will convert your graphics "in place" but it will also make a copy of them.
    6) import the resulting .png files into flash
    Last edited by BlinkOk; 03-18-2008 at 04:09 AM.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  5. #25
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    dude. i imported both your example files into flash and they worked fine.
    here's both images over a pinkish background;



    waddup?
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  6. #26
    Member
    Join Date
    Jan 2007
    Posts
    48
    I did the same.
    http://www.stan.in/screen.png

    I now see the bigger problem. I had earlier cropped the images and didn't notice the 'original' file also had developed the grey bottom half artifact.

    Anyway, here is the uncropped version and the PNG8 version of it:
    http://www.stan.in/idle_NE1.png
    http://www.stan.in/idle_NE-8.png

    The transparency for the most part is fine. However, how do I avoid the artifacts in the most places?

    Thanks a lot in advance!
    Last edited by Stanley Lyndon; 03-18-2008 at 04:50 AM.

  7. #27
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    what artifacts? please be specific. maybe an explanatory image even
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  8. #28
    Member
    Join Date
    Jan 2007
    Posts
    48
    Sorry about the wrong link. Typed a _ instead of a -. Corrected now. The second image is the one with artifacts.

  9. #29
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    I'd have to say that is a colour limitation of png-8

    just a guess though.
    lather yourself up with soap - soap arcade

  10. #30
    Member
    Join Date
    Jan 2007
    Posts
    48
    That wouldn't make sense, would it? Why would it add extra colors to transparent regions when we are limiting the number of colors possible in PNG-8?

  11. #31
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i think you problem is caused by the soft shadow's. generally you can fix this one of two ways;
    a) change your 3d render to create sharp shadows
    b) add a separate (circle) shadow in flash. this is what i generally do and it works well.
    note : a lot of the time the shadow will need to be below an object while the person needs to be above it so it works out better to have separate shadows.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  12. #32
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    That wouldn't make sense, would it? Why would it add extra colors to transparent regions when we are limiting the number of colors possible in PNG-8?
    if you manually convert a 32 bit image to 8 bit you will see how it uses a palette entry for each colour as it fades into the background. your soft shadows would take up heaps of palette entries because they gradually fade into the background. so fireworks is optimising it to 2 or 3 colours.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  13. #33
    Senior Member hatu's Avatar
    Join Date
    Jan 2007
    Posts
    480
    I don't have Fireworks but can't you turn on dithering? It would probably look better if the colors are pretty close to eachother

  14. #34
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    gradients are really bad for file size, they just contain too many color variations, better to do it like blink suggested and do it up in flash. Try to keep colours to a minimum and you could even get away with png-32 at 3k
    lather yourself up with soap - soap arcade

  15. #35
    Member
    Join Date
    Jan 2007
    Posts
    48
    hatu, dithering doesn't really help. I have tried 100% dithering already with similar results.

    Thanks a lot BlinkOk, you are spot-on. I suppose raytraced shadows would be the solution for this, though I would love to have soft shadows. Anyway, I will try it soon.

    Your other method sounds interesting. Being a complete flash newbie, I have no idea what it means, but I will pass it on. However, I don't seem to understand the logic behind it. If I have to render the shadow and model in 2 different .png files, each of them with say 64-colors and PNG-8, I suppose I would still be better off with ray-traced shadows with PNG-8 and 64 colors so I can get double the frame rate for the same size?

    Also, an off-topic question. See this site: http://www.moock.org/webdesign/flash...s-speedometer/ . I have a pretty good system and I am getting only 21 fps max. However, a lot of posts here seems to be recommending 24 fps. Do you think 24 or 30 fps (my initial plan) could actually be an overkill on most systems?

    I am also thinking of deleting every other frame as Squize had suggested and running it at 15 fps. Would that be choppy?

    mr_malee
    , 3k for PNG-32? Are you predicting that with Blink's first method or the second?

  16. #36
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    If I have to render the shadow and model in 2 different .png files
    just use a vector circle (with alpha) for the shadow. it doesn't sound like it would work but it does. just try it.
    as far as the fps. what is you .fla fps set to? maybe try a higher fps setting in your .fla
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  17. #37
    Member
    Join Date
    Jan 2007
    Posts
    48
    BlinkOk, I will talk to my coder about the vector circle and see if he is aware of that. So, when I render, I would be rendering the model and shadow as 2 different PNG files for each frame of the animation right? And, I will convert all model images to PNG8 and leave the shadow at 32-bit?

    The .fla is presently set to 30 I think. Try a higher setting than this?

  18. #38
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    attached is an .fla that describes what i'm talkin about regarding the shadow (sorry about the bad render of your dude).

    you're progrqmmer's gonna say;
    "but it'll take too long to render the shadow" (in that nasal kinna voice that they have)

    to which you'll reply;
    "just check 'save as bitmap' on the mc biatch!"


    ps: yeah bump up the frame rate
    Attached Files Attached Files
    Last edited by BlinkOk; 03-18-2008 at 06:08 PM.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  19. #39
    Member
    Join Date
    Jan 2007
    Posts
    48
    Oh alright. I get it now. Thanks a lot for the effort. Yeah, I will pass it to my programmer.

    However, with this method, it is only possible to get a circular shadow I suppose? Anyway, we will demo this out and also try the PNG-8 with raytraced shadows and see which has better quality-size ratio.

    Thanks again!

  20. #40
    Member
    Join Date
    Jan 2007
    Posts
    48
    Quote Originally Posted by tonypa
    Common way to reduce filesize and amount of work is by flipping the same thing horisontally so you only have 2 different directions. While it makes the animation look slightly wrong ("the char was holding sword in left hand and now the sword is in right hand"), most people dont care.
    Tony,

    As I have mentioned before, this is basically a board game where units can turn. We started off with squares having 45 degree angle. One of our units' idle pose is this:

    Now, when I flip it horizontally in photoshop, it looks perfectly good facing the adjacent side. However, as you mentioned, the gun shifts to the other hand.

    Now, is there a solution to get rid of this discrepancy. For example, when a unit tuns a right angle to shoot, it will suddenly have the gun in the wrong hand. Would nobody really notice this or should we do a short animation where he changes the guns and shield to the opposite hand, which again would not be natural because no real soldier would shift guns just to shoot in one direction.

    Thanks!
    Stanley.
    Last edited by Stanley Lyndon; 03-25-2008 at 05:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center