POV-Ray : Newsgroups : povray.animations : Most ambitious ever! : Most ambitious ever! Server Time
5 Jul 2024 11:05:04 EDT (-0400)
  Most ambitious ever!  
From: Andrew Coppin
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

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