Animation Compression

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Animation Compression // Archive: Tech Forum

1  |  

Post by jayr // Jun 18, 2007, 1:36am

jayr
Total Posts: 1074
pic
I know a few people here favor rendering animations as still image files then collating in an editing program but what about the other Codec types, which is the best to use?


i know thats a bit of a subjective question so what kind of trade offs can you expect with them for quality & rendering speed?


For instance, do you get better quality if you render full uncompressed frames then compress in something like Premier than rendering with the cinepak codec?


Has anyone had a lot of experience with this?

Post by Bobbins // Jun 18, 2007, 2:47am

Bobbins
Total Posts: 506
I don't find I get any better quality rendering direct to a given codec directly from tS compared to rendering to a sequence of still images then compressing in another package afterwards. As you might expect, given the same codec settings the output looks the same.


The benefits of rendering to stills and compressing afterwards are:

1) If tS crashes during a render of an animation sequence, you don't have to start again from frame 0, just carry on from the frame that tS crashed on (It's been years since tS crashed during an animation render for me, though so I disregard this 'benefit').

2) If you want to change the codec or try different codec settings, you are only recompressing the pre-rendered still images, not having to re-render every frame again from within tS. Likewise if you want to have different versions of the same animation in different codecs - Quicktime and WMV comes to mind. It's a massive time-saver if your animation takes a long time to render.


The downside of rendering to stills then compressing afterwards is:

1) Takes extra time, extra disk space and you need an additional program that can perform the task. I often render quick and dirty animations for posting on the web or just as a quick test so I go direct to AVI from within tS: if tS only had the ability to render to stills then I'd give up if I had to mess around every time I wanted an avi file to watch.


As for choice of codec - it's highly subjective and depends on the target audience. No good rendering to WMV if you want mainly MAC users to watch it. DivX is highly favoured and gives great results if you know how to tweak the settings, but if you compress to the very latest version of DivX then 90% of the audience will complain that they don't have the current version despite updating it only last month! Better to compress to a slightly older version of DivX. I can still get great results for web use most of the time compressing to MPG (Mpeg 1) and pretty much everybody can watch that.

Post by frootee // Jun 18, 2007, 3:28am

frootee
Total Posts: 2667
pic
The benefits of rendering to stills and compressing afterwards are:

1) If tS crashes during a render of an animation sequence, you don't have to start again from frame 0, just carry on from the frame that tS crashed on (It's been years since tS crashed during an animation render for me, though so I disregard this 'benefit').



I have not had truespace crash or hang during an animation, but power failures come to mind.


As Bobbins said, when rendering stills, it's best to render uncompressed images, since you will be compressing the files during conversion to a single video file. If the stills are compressed when generated, they may get compressed further, resulting in loss of detail and creation of undesirable artifacts: blocky areas that jump around, etc.


That being said, I agree with Bobbins in that it makes sense render small video files for testing and previewing, but for a final render, I would suggest rendering to uncompressed stills.


Frootee

Post by jayr // Jun 18, 2007, 3:52am

jayr
Total Posts: 1074
pic
Thanks for the replies guys:


Bobbins: when you say rendering to stills takes extra time, do you mean rendering time or time spent in another program sequencing them?


Is it better to render to Jpg, Png or Bmp? The last time i rendered an animation i put it all to 'uncompressed avi' file type, i've never rendered an animation to an image sequence before.


Do you know what resolution you have to render to get tv quality? HD seems to be around 1920x 1080 but waht about normal tv/ video. not sure i could wait to render an animation at 1920x 1080!

Post by frootee // Jun 18, 2007, 4:10am

frootee
Total Posts: 2667
pic
Hi jayr. For NTSC, normal resolution is either 640 x 480 or 648 x 486. For DVD (mpeg-2), it is 720 x 480. I think you are referring to HDTV resolution.


You're in the UK right? If so, you need to look at PAL settings: 704 x 576 (TV PAL)

720 x 576 (DVD PAL ? )


I am pretty sure these values are correct, but to make sure, do this:


In the render to file settings, you can specify a video file format: select one of the PAL settings. This will tell you the correct resolution for PAL video. Then you can use those resolution values for rendering to individual frames.


Any of the formats you mentioned should be fine, as long as you render uncompressed. There is also the TGA option available.


HTH


Frootee

Post by 2much4U // Jun 18, 2007, 4:14am

2much4U
Total Posts: 430
pic
Has anyone had a lot of experience with this?

I would say that I qualify...;)


My first bit of advice to you is that you should never export animations from tS in avi format. Video codecs cause the animation to lose it's quality, and, more importantly, deletes the alpha channel. Now your probably thinking


"I'll just export it as an uncompressed .avi file..."


This is not a good idea either! Uncompressed avi's that get exported from tS always come out with choppy motion, and it will slow down your machine to no end.


Your best move is to create a new folder, then render the animation to it as either a .tga or .png sequence. This is strongly recommended if you plan on using transparency. If not, a .jpg sequence will work fine too. I, personally prefer to use the .tga format, but this is because I'm used to it, so .png will work just as well. Next, import the sequence into a video editing application. I use Sony Vegas, but there are many others that will work too, such as Adobe Premiere and Adobe After Effects. The final step is to export it from there as an uncompressed .avi file. It needs to be uncompressed if you (A.) dont want to lose quality, and (B.) want to keep the alpha channel. Just as a warning, uncompressed avi's are very large. Expect to have files between 3 and 6 Gigs. If you would prefer to have more HDD space at the expense of your video quality/alpha channel, use a good codec. I recommend either DivX or WMV 9. A video bitrate between 2 and 8 Megs per second should give you close results to the quality of an uncompressed avi (but no alpha channel).


Hope this helps....


John

Post by jayr // Jun 18, 2007, 4:52am

jayr
Total Posts: 1074
pic
Thanks Frootee & John that clears it up a lot.


2much4U: When you say 'files between 3 and 6 gigs' how many minutes (or seconds) would that represent?

Post by Bobbins // Jun 18, 2007, 4:56am

Bobbins
Total Posts: 506
When I said rendering to stills takes extra time I meant you have to do the following:

Render to stills

Open a program to compile the stills to AVI

Load the still sequence

Choose the codec and settings

Generate the AVI

For a quick and dirty test animation that's not acceptable to me. Rendering to stills then flapping around would be a waste here so in this case I would just render to compressed avi from tS and view the result. Note that I render to stills then compile afterwards for a final quality anim (I've also been known to render to uncompressed AVI too and haven't personally seen a choppy animation yet by the time I've compressed the AVI).


Full frame DVD PAL resolution is indeed 720x576.


I'd never render a sequence of stills to JPG due to the lossy compression. Traditionally I've used TIF because I don't often use an alpha channel but more recently I use PNG since it is a lossless compressed format and most packages now import PNG.

Post by Steinie // Jun 18, 2007, 5:12am

Steinie
Total Posts: 3667
pic
No mention of bit rates used or variable bit rates etc. in this discussion?
I thought it might be helpful for us all to compare different codec used for it's intended purpose web vs. dvd for example.

Post by jayr // Jun 18, 2007, 5:13am

jayr
Total Posts: 1074
pic
thanks bobbins, i thought that was what you ment, i don't mind the time taken afterwards so much.

Post by 2much4U // Jun 18, 2007, 5:24am

2much4U
Total Posts: 430
pic
2much4U: When you say 'files between 3 and 6 gigs' how many minutes (or seconds) would that represent?


I always work with very large resolutions, so it would probably be less of a problem for you, but I ran a test render at the resolution you plan on using, and based on what I can see, a minute-long animation is about 2 Gigs.

Post by jayr // Jun 18, 2007, 5:26am

jayr
Total Posts: 1074
pic
a minute-long animation is about 2 Gigs.


i might have to get that external hard drive afterall!

Post by frootee // Jun 18, 2007, 5:52am

frootee
Total Posts: 2667
pic
Steinie,

Variable Bit Rate (VBR) is useful for situations where space and bandwidth are limited, and you have action sequences: explosions, stuff flying, basically when you have a high rate of change on a per frame basis in some scenes (jet fighter dogfight with guns blazing), whereas in others you do not (a dialog scene between two people). VBR encoding takes longer due to the algorithm having to analyze the frames more indepth.


Constant Bit Rate (CBR) is useful for situations in which you do not have a high rate of change on a per frame basis. In this case there' s not much point in using VBR; the results will be quite similar anyway.


For web distribution, I prefer DivX. For video, I just use the codec that comes with Adobe Premiere for DVD.




Frootee

Post by Steinie // Jun 18, 2007, 6:22am

Steinie
Total Posts: 3667
pic
Thanks, Frootee!

Post by frootee // Jun 18, 2007, 6:35am

frootee
Total Posts: 2667
pic
Welcome Steinie!

Frootee

Post by Lee // Jun 18, 2007, 8:10am

Lee
Total Posts: 13
I would add virtualdub to the list of programs for converting image sequences to video & no need to spend big - its free :D :-


http://www.virtualdub.org/features :banana:

Post by nowherebrain // Jun 18, 2007, 4:59pm

nowherebrain
Total Posts: 1062
pic
I would also check out Xvid(lots o' options). It's my personal favorite, though I'm not using it for the tutorials...I honestly should...soon(now even) you will be able to utilize the new H264 from apple. I'm hearing good things about that.. it also depends on what type of quality you want..mpeg standards tend to blur the image where the H263 is sharper...I might have that backwards?
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn