POV-Ray : Newsgroups : povray.animations : Most ambitious ever! Server Time
3 Jul 2024 03:20:19 EDT (-0400)
  Most ambitious ever! (Message 1 to 10 of 41)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Andrew Coppin
Subject: Most ambitious ever!
Date: 21 Sep 2003 15:42:33
Message: <3f6dff29@news.povray.org>
Hi folks.

Unless I'm very much mistaken, this is the first time I have *ever* posted
in this particular list... Anyway, getting to the point - I have been
creating animations with POV-Ray for a while now. However, I have just
started on my most ambitious POV-Ray project *EVER*. (Prepair to be
unimpressed.)

I have decided to make a video to go with one of my favourite tunes from The
Prodigy. After much deliberation, I selected "No Good (Start the Dance)"
from their 1994 album "Music for the Jilted Generation". (It's track 9 if
anyone has the CD.)

This big undertaking has brought me up against certain technological
limitations. (Oh, and artistic ones - specifically, I'm crap. But there's
not much anyone here can do about that part!)

I didn't think this project would get off the ground, because I thought I
would never ever ever get the sound and video to synch. But - amazingly - it
was easy! (Err... well, it was easy once I got my maths right! I couldn't
figure out why increasing the BPM figure made the video run slower... I had
of course got the numerator and denominator THE WRONG WAY ROUND! Ooops...)

I wasn't sure if I actually had the software to join video and sound
together, but it appears I have. My process is this: First, get POV-Ray to
produce some frames. (Obviously.) The frames are output as 640x480 TARGA (or
320x240 for tests). Next, I use VirtualDub to join all the frames into an
uncompressed AVI. If this is 320x240, it's directly playable. But Micro$oft
Media Player won't play 640x480 uncompressed, so the final stage is to use
TMPGEnc to compress the video (and add the soundtrack from an uncompressed
.WAV file ripped directly from the CD). This will then play.

Does that make sense?

POV-Ray -> still frames (TARGA, 640x480, 24 bits/pixel, 25 frames/second)
still frames -> VirtualDub -> AVI (uncompressed, no sound yet)
AVI + WAV -> TMPGEnc -> MPEG-1, audio is layer-II at 192 kbits/second

OK, so hopefully I'm not the only person in this list to use these
programs... (cos if I am... oh dear.)

I have currently created about 48 seconds of moving video (28 seconds is
"finished", the rest needs tinkering with). But I did a test run at 640x480
to see if my computer can cope with it. It can't.

First, the complete track is about 6 minutes long. TMPGEnc helpfully informs
me that I need to generate 9,447 frames. Well, it turns out that (depending
on detail) 9,447 frames of RLE TARGA takes up roughtly 6GB. So I have to put
the frames on another partition.

Next, I hadn't noticed this, but all my partitions are FAT32. And apparently
this filesystem does not permit a single file to be larger than 4GB.
(Actually, I didn't think you could have a PARTITION larger than 4GB with
FAT... anyone care to explain?) So I need a harddrive with NTFS on it
(which, unless I'm mistaken, has no such limitation).

I have spare harddrives laying around with sufficient capacity. (They're
IDE.) But my computer is a laptop. It is possible to attach an external
harddrive to a laptop? What gear do I need to do that? Alternatively, I
could fit them to my dad's PC and use the LAN I set up - essentially just
use dad's PC as a fileserver. But while our NICs are 100mbit, the hub is
only 10mbit. Will this speed limit file throughput? (Last I checked, POV-Ray
won't start rendering one frame until the last one is saved.) Or I could
store the frames on my laptop and assembly them on dad's PC...

Next, TMPGEnc seems to do strange things if you tell it to stop part way
through. (The audio is 6 minutes, I have about 48 seconds of video so far.
I'm only doing tests, but I *need* to check that the video matches the
sound.) Sometimes the soundtrack finishes before the video - any idea why?
Also, sometimes Media Player struggles to play back the video - sound and
movement are intermittent. Any ideas? Neither of these seem to happen if I
generate a full 6 minutes of video (which I can only do at 320x240 because
of the above).

Also, TMPGEnc seems to halve the resolution of the video. OK, *some* of the
video - specifically, the frames where there's a lot happening. I presume
this is because there's too much data to fit. I have it set for "automatic
VBR" (variable bitrate?), with quality = 100 and maximum bitrate = 35,000. I
did have it higher... Presumably if I set it too high I will exceed the
transfer rate of my harddrive - anyone know what that's likely to be?
(Maxtor 20GB, if that makes a difference.) I presume it is IO rather than
MPEG decompression that is the limiting factor?

(While we're on the subject... does anyone know what the GOP struction and
Quantinize Matrix options are all about?)

On the latest part of the animation, the movements I've programmed seem to
be beyong the temporal resolution of the system - that is, it seems to
require more than 25 frames / second. I notice Virtual Dub has a "motion
blur" option. Can I render, say, 100 times more frames than I need and get
Virtual Dub to blend them together to give the correct frame rate with nice
smoothing? Or can't that be done? If it can, how? And will it be worth it?
Is 100 too much / too little?

Thanks folks!

In case anyone is interested...

The basic concept for the video is a space ship flying around through space.
OK, so actually at the moment it's a smoothed triangle. (I said I was crap!)
It's the CSG union of 1 prism, 3 cylinders, and 3 spheres. And it's
metallic. Obviously there's the obligatory star field too. The tune features
a very charicteristic, highly-flanged base sound. For this reason, I've
given the ship a "warp cloud" (basically a pretty glowy plasma thingy
suffounding it) which appears in time with that baseline.

Finally - the bit I'm currently working on - the idea is that when the
drumbeat starts up, you see the ship flying through a tunnel. The original
idea was to have a twisty-turny tunnel, with the ship weaving and ducking
round corners in time to the thundering bass. But, alas, this is too
complicated for me to program! So instead, I planned to settle for straight
tunnel, which I have now made. (It's an isosurface - a cylinder with a
little f_bozo() added. Looks a bit too boring tho...)

In keeping with the original tunnel plan, I wanted to have the ship jiggling
around, as if the drumbeat were generating some powerful invisible force and
the ship was struggling to stay in a straight line. Oh, and I wanted the
camera angle to give the impression that the camera was on the back of a
model airplane following along side, but being hampered by some nutter
smacking it with a 2 lb lump hammer in time with the music. (Or maybe the
camera dude is just drunk.)

Now... EXPLAIN THAT TO POV-RAY!!!

This is the part I'm currently struggling with. It's very hard to make
things "jiggle" in a way that matches the rythem but looks natural. Oh, and
being The Prodigy, the beat doesn't go "boom, boom, boom, boom"... actually
it goes something like "boom chi-chi-boom, boom chi-chi boom-bah, boom,
boom-ting, boom BAH!" I actually had to fire up Audacity and slow the bugger
down to 75% of normal playback speed just to figure out what the hell that
drumbeat does... and then, after I designed a nice visual, I realised it's
too complicated to see at normal playback speed. *sigh*

So anyway, at the end of all this I should have a 40MB MPEG file, if anyone
wants to see it... (Obviously I'd have to give it to ya minus the sound, so
don't even apply unless you have the CD to go with ;-) Oh, and is there a
tool that can put the sound back into an MPEG? :-|

Thanks.
Andrew.


Post a reply to this message

From: Remco de Korte
Subject: Re: Most ambitious ever!
Date: 21 Sep 2003 17:15:54
Message: <3F6E149E.EFC9AA8A@onwijs.com>
Sorry but I only read halfway through your message until it occurred to
me that your problem is diskspace because you woant to use uncompressed
AVI. I don't see why you would want that. VirtualDub can compile frames
to better usable formats (compressed) and as far as I know it can also
add sound from a WAV file. (I haven't tried that though, I wanted to add
sound from a midi file to an animation and that it can't do).
Perhaps I was missing the point, but what you're planning on doing
should be possible without having to use 6GB files.

Remco


Post a reply to this message

From: Tom Galvin
Subject: Re: Most ambitious ever!
Date: 21 Sep 2003 18:26:00
Message: <Xns93FDBB49A4F14tomatimporg@204.213.191.226>
"Andrew Coppin" <orp### [at] btinternetcom> wrote in
news:3f6dff29@news.povray.org: 

 
> 
> Next, TMPGEnc seems to do strange things if you tell it to stop part
> way through. (The audio is 6 minutes, I have about 48 seconds of video
> so far. I'm only doing tests, but I *need* to check that the video
> matches the sound.) Sometimes the soundtrack finishes before the video
> - any idea why? Also, sometimes Media Player struggles to play back
> the video - sound and movement are intermittent. Any ideas? Neither of
> these seem to happen if I generate a full 6 minutes of video (which I
> can only do at 320x240 because of the above).
> 

Also use Audacity to trim the audio length to match the video length.

http://audacity.sourceforge.net

-- 
Tom
_________________________________
The Internet Movie Project
http://www.imp.org/


Post a reply to this message

From: Warp
Subject: Re: Most ambitious ever!
Date: 21 Sep 2003 18:26:49
Message: <3f6e25a9@news.povray.org>
Andrew Coppin <orp### [at] btinternetcom> wrote:
> POV-Ray -> still frames (TARGA, 640x480, 24 bits/pixel, 25 frames/second)
> still frames -> VirtualDub -> AVI (uncompressed, no sound yet)
> AVI + WAV -> TMPGEnc -> MPEG-1, audio is layer-II at 192 kbits/second

  Why would you use such an old and inefficient format as MPEG-1?
  When you have the AVI, you can use VirtualDub to save it to another
AVI but using whatever MPEG-4 codec you may have (DivX, for example).
You will get a lot smaller file with better quality. Also, as for sound,
you can encode in mp3 format.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Andrew Coppin
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 15:19:10
Message: <3f6f4b2e$1@news.povray.org>
> Sorry but I only read halfway through your message

LOL - that's quite ok. (Can't believe I typed 8KB of text... man!)

> until it occurred to
> me that your problem is diskspace because you woant to use uncompressed
> AVI. I don't see why you would want that. VirtualDub can compile frames
> to better usable formats (compressed) and as far as I know it can also
> add sound from a WAV file. (I haven't tried that though, I wanted to add
> sound from a midi file to an animation and that it can't do).
> Perhaps I was missing the point, but what you're planning on doing
> should be possible without having to use 6GB files.

Yes, I believe VirtualDub can add the sound...

Clearly I've been trying the wrong codecs... Every one I try results in
extremly poor quality video. (Haven't tried DivX - I would imagine I don't
have the ability to encode, only decode. Haven't checked tho.) MPEG-I is a
very common, widely supported format, and it doesn't seem to mangle the
video too much. (The sound appears to be identical - kinda impressive. I'm
pretty sure it IS being compressed...)


Post a reply to this message

From: Andrew Coppin
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 15:20:22
Message: <3f6f4b76$1@news.povray.org>
> > POV-Ray -> still frames (TARGA, 640x480, 24 bits/pixel, 25
> > frames/second) still frames -> VirtualDub -> AVI (uncompressed, no
> > sound yet) AVI + WAV -> TMPGEnc -> MPEG-1, audio is layer-II at 192
> > kbits/second
> >
>
> - Use png instead and save a lot of disk space
>   with no image quality loss.

Yeah, PNG is goooooood. But last I checked, VirtualDub doesn't support it.

> - Get the png vfapi plugin from p.b.u

Erm... huh???

> - Skip the virtual dub avi step and use
>   tmpenc directly with the png files

Didn't know TMPGEnc can work on single frames... I thought it only encodes
AVIs?


Post a reply to this message

From: Andrew Coppin
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 15:21:02
Message: <3f6f4b9e$1@news.povray.org>
> > Next, TMPGEnc seems to do strange things if you tell it to stop part
> > way through. (The audio is 6 minutes, I have about 48 seconds of video
> > so far. I'm only doing tests, but I *need* to check that the video
> > matches the sound.) Sometimes the soundtrack finishes before the video
> > - any idea why? Also, sometimes Media Player struggles to play back
> > the video - sound and movement are intermittent. Any ideas? Neither of
> > these seem to happen if I generate a full 6 minutes of video (which I
> > can only do at 320x240 because of the above).
>
> Also use Audacity to trim the audio length to match the video length.

In the final version, both will be the same length, so it won't matter. I
might well use Audacity to trim it for the tests though...


Post a reply to this message

From: Andrew Coppin
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 15:23:20
Message: <3f6f4c28$1@news.povray.org>
> Andrew Coppin <orp### [at] btinternetcom> wrote:
> > POV-Ray -> still frames (TARGA, 640x480, 24 bits/pixel, 25
frames/second)
> > still frames -> VirtualDub -> AVI (uncompressed, no sound yet)
> > AVI + WAV -> TMPGEnc -> MPEG-1, audio is layer-II at 192 kbits/second
>
>   Why would you use such an old and inefficient format as MPEG-1?

What else is there?

>   When you have the AVI, you can use VirtualDub to save it to another
> AVI but using whatever MPEG-4 codec you may have (DivX, for example).
> You will get a lot smaller file with better quality.

Not last time I tried it... Well, ok, *way* smaller file... but *terrible*
image quality.

>Also, as for sound,
> you can encode in mp3 format.

Yeah, I know that, but I'm wondering if that might affect the timing (and
hence mess up the synchronisation with the video). Anyway, once it is joined
to the video, it's up to what the combined format can handle... (The sound
is only 65MB anyway; not exactly huge, is it?)


Post a reply to this message

From: Warp
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 16:07:07
Message: <3f6f566b@news.povray.org>
Andrew Coppin <orp### [at] btinternetcom> wrote:
> Not last time I tried it... Well, ok, *way* smaller file... but *terrible*
> image quality.

  You don't have to compress with the default bitrate. You can bump up
the bitrate until it looks good. You will still get a lot smaller file.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Andrew Coppin
Subject: Re: Most ambitious ever!
Date: 22 Sep 2003 16:15:32
Message: <3f6f5864$1@news.povray.org>
> > Not last time I tried it... Well, ok, *way* smaller file... but
*terrible*
> > image quality.
>
>   You don't have to compress with the default bitrate. You can bump up
> the bitrate until it looks good. You will still get a lot smaller file.

Didn't see anywhere to adjust that... I was a "quality" setting, with I set
to 100% (despite being warned that 90% would probably be as good). Still
looked aweful! I'll have another look at it...


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.