IRTC Topic for January 2007: Dance

General discussion about JPatch

Postby pndragon » Tue Jan 16, 2007 11:12 am

That was terrific, David...

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby dcuny » Tue Jan 16, 2007 12:10 pm

pndragon wrote:That was terrific, David...
Thanks! :) As Sascha noted, there were a good number of submissions this round - I counted nine. The initial intent of the animation was just to get something done, and I think I've succeeded in that. Of course, it turned out to be far more work than I had hoped.

Again, I'm in awe for what Sascha was able to pull of with "Travel" and "The Imposter". :shock:

I suspect that the lack of limbs and such will again doom the animation, but we'll see. I'm hoping (probably in vain) that it doesn't get torpedoed for "low technical difficulty", but I don't hold out much hope for that.

I'd seen John VanSickle's comment about late submissions when he posted it back in October about being able to submit his animation over 6 days past the due date, which is why I wasn't in total dispair after having troubles with the submission. I've made yet another attempt to fix the IRTC submission:
  • I corrected the subtitle problem and recompiled the frames using the compositor program.
  • I burned a CD of all the data and programs, and copied them to my kid's Windows XP machine. I rebuilt the .avi and .mpg files under Windows XP. I didn't even bother trying to fix the aspect ratio; as Sascha noted, it's not a big deal. It didn't play under Windows XP, but I think that's because it lacks an MPEG driver.
  • I copied the MPEG file onto a USB key and back onto my Linux box. It plays in Linux just fine. Whew!
  • I resubmitted it to the IRTC ftp site. The site accepted the submission, so I'm assuming it's still up.
  • I replaced the link on my site with the new video: moai_dance.mpg
Here's hoping all went well...

I'm going to make backups of the files, and start pulling the "previs" versions of the animation off my website. But that can wait until tomorrow... I really need some sleep! :D

(Let me know when the next topic is announced!)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Tue Jan 16, 2007 1:30 pm

dcuny accidentally edited sascha's comment instead of choosing reply. :oops:

dcuny regrets this unfortunate action. :roll:
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Tue Jan 16, 2007 10:17 pm

I disagree. Bringing live to a character without arms and feet is much more difficult, and you did a great job.
Arms and legs can be a real distraction. I read a thread on A:M, where someone had gone through some classic movie to see how often some typical action (I forget get which, I think it was "finger pointing" or something) happened. It turned out to be almost never; the acting in general was much more subdued than you would have guessed.

The point was that animators tend to overdo actions, to the point where arms are waving and heads are turning (heh... like my stuff) to the point where it becomes visual clutter. There's a podcast of some Pixar animators at a roundtable; I haven't heard it yet (hey, I've been busy ;)), but someone summarized it as "make it simple.....as much as possible."

I guess you can safely get some sleep before the new topic is announced :wink:
Hehehe. :)

Let me know when your final version is ready, I'll upload it to the JPatch homepage then - but there's no hurry.
The last version I posted (with the corrected subtitles) will do, until I (or someone else) figures out how to create an MPEG with the correct size (240x400).
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby dcuny » Wed Jan 17, 2007 12:04 am

Argh. :(

The MPEG file doesn't run under WinXP, either. So there's an issue with the codec that it's using. I'll have to monkey with it some more...

Any known alternatives would be helpful. :(
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby dcuny » Wed Jan 17, 2007 4:22 am

OK, I think I've got it this time. It runs under WinXP and Linux, with no issues. It's also smaller, and displays the correct aspect ratio. Getting to that point was convoluted, and I had to do it under WinXP. It might work under Linux using Wine, but I didn't feel like taking any chances:
  • Use RADTools to convert the frames to an .avi file.
  • Use bbmpeg to convert the .avi file to an .mv1 file.
  • Use TMPGEnc to convert the .wav audio track to .mpg audio.
  • Use TMPGEnc "simple multiplex" to create the final file. This is found under the File | Tools ... menu.
The video is a bit more lossy, but the file size is now only 5.9 Meg. Hopefully, this will be the last time I have to jump through those hoops. :roll:

I've again replaced moai_dance.mpg (5.9 Meg) on my website, so you can see the final results if you want to. Nothing new with the video, just slightly wider (and less sharp).
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Wed Jan 17, 2007 9:26 am

I've never had such problems with TMPEGenc - neither on Windows nor on Linux (using Wine). The only issue I remember is that it can't read png - so I had to batch convert my images to bmp before encoding (Imagemagicks convert tool can do this). It did all the video encoding and audio multiplexing in a single step, and it encoded it exactly to the target filesize (two pass VBR for optimum quality).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Thu Jan 18, 2007 1:09 am

I'd always used the TMPEGenc wizard when encoding. The problem I ran into was when I chose various settings, I suddenly found it was trying to use the MPEG-2 format, which is what has the 30 day limitation. It's also the file format that won't run on Windows.

I'll just need to spend more time with the application, so I don't run into this in the future. Except for the problems I encountered trying to compress the file, it's a really nice program to use.

Before messing with the various settings, I hadn't even realized that TMPEGenc could encode frames directly. I've just written support routines so that I can read and write 24bit uncompressed .bmp files. If nothing else, it'll remove a step from my workflow - I won't have to create an .avi file.

It's a shame that the MPEG format is so darned complex - it would be great if JPatch could generate that MPEG format directly. AVI files are simply too huge. I've yet to find any free library that will do it. The fact that no one's written one seems to be a bit of a warning that they're very, very hard to do. Otherwise, I might be tempted to have a shot at it... :?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Thu Jan 18, 2007 9:40 am

I'm not an MPEG export, but I could imagine that the most complex part is finding the motion vectors. But in the case of rendered images, this data could come directly from the renderer. Just a thought.

But I still would not try to write an MPEG encoder. Where does it stop? MPEG-2 is the current standard for DVDs and digital broadcasting, but it's slowly being replaced by the even more complex MPEG-4 (which is used, for example, in divX). MPEG-4 is certainly a good choice for HD content.

It's a pity that mencoder (which is part of mplayer) doesn't produce standards compliant mpeg fiels. But I'm almost sure that there are some free codec libraries out there - so perhaps using JNI to hook into some native codec library would be an option.

Here is a DirectShow to Java mapper (of course for Windows only).

Wikipedia lists the following JMF extensions or alternatives:
Some of them seem to offer MPEG encoding and decoding.

But I think that uncompressed AVI output is enough (with interleaved sound) - some third party tool can then be used to convert it to whatever format needed.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Thu Jan 18, 2007 10:14 am

I supposed I should dust off my AviWriter class. It used to work for silent output, and I think it currently works for Windows but not Linux. It was a real nightmare trying to get code which would work on Windows, Linux and the Macinosh. :roll: But it was nice in that it was "pure" Java.

One thing that helped was a nice tool which was able to find errors in .avi files, but I don't think I've got that any more.

But since MPEG encoders can often compile "raw" frames, perhaps something like the FrameFlipper would be enough - it can playback frames with sound, without having to compile a .avi file, and those files can get pretty huge! (It can also playback .png files).
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Thu Jan 18, 2007 11:15 am

My idea is the following:

Eventually JPatch should be able to create short-movies at HD resolutions (say, at least 1280x720). The uncompressed data is needed anyway (perhaps even multiple layers and channels per frame), but that's simply a matter of storage. The first 1TB 3.5" Harddisks have already been announced, so Moores law will solve this problem.

But editing HD in realtime (with all kind of transition and video effects) is quite impossible, so the idea is to store a "thumbnail" version of each image (e.g. 320x180) and use this as a preview during editing. It should be possible to play it back in realtime with your framefilpper, and all transition and video effects can be rendered in near-realtime (like in iMovie). All edits are recorded, so once the movie is finished they can be applied on the actual HD data (like AVID does).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Thu Jan 18, 2007 9:58 pm

That would be great! My experience was the faster the feedback, the better. PreViz was really helpful - if you could get an OpenGL version of PreViz working with shadow support, that would be even better.

The current compositor code that I've got isn't anything close to realtime, but I think it's a start. There are some effects (like blur and glow) that are simply expensive. You've mentioned using OpenGL - have you got any references on how to do 2D effects? I've seen a number of books (i.e. GPU Gems), but they're pretty pricy. :?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Fri Jan 19, 2007 3:07 pm

You've mentioned using OpenGL - have you got any references on how to do 2D effects?

There are a number of examples in the OpenGL Shading Language Guide, which is pretty pricy as well.

But I think the approach iMovie takes is sufficient: Whenever you add a video or transition effect, it is pre-rendered in the background, so after a few seconds you can watch it in the preview window. It internally uses DV format (at least I think so), but JPatch could do it with jpg frames - Every clip consists of a sequence of jpg images (e.g. the 320x180 thumbnails) - adding a 1 second transition would simply render 24 new jpg frames, for example. The frame-fipper would know which frames to skip and would "insert" the newly rendered transition when previewing the animation.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Jan 19, 2007 7:29 pm

That makes sense. It could simply mark frames as "dirty" as modifications are made. The background process could restart whenever changes are made.

I've been playing around with various ideas for a user interface for effects. Some effects create new video streams, while others write into existing streams, so they potentially need different interfaces. I'd also like to have animateable effects (such as color change or position change) without having a full-fledged timeline. For example, being able to add lens flare effects that are tracked with the lightsource.

I'll try to throw together a mockup to play with.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby dcuny » Thu Jan 25, 2007 10:13 pm

There's still not progress with IRTC voting, as the main administrator seems to have dropped off the face of the earth.

In the mean time, at least one participant has made their video available online. I found a reference to JPatch in their notes (oddly though, not under "Tools Used"):
Then I created all models (skeletons, graveyard etc.) in Povray with CSG; the only notable exception is the skull head, for which I used jpatch (http://www.patch.com) and exported it as a povray mesh. The models were then made "posable" by sprinkling statements such as "transform {L_WRIST}" through the model at strategic places.
The animation is quite good, but it's got that "early 80's" look to it - lots of noise, plus an odd sort of diffuse color to everything - that I've seen in a lot of POV animations. I know the POV is capable of producing some stunning images, so I suspect it's primarily due to the use of a single point light. It's too bad, because with properly lighting it could look stunning. A preview of actual lighting from within modeler is a big plus.

They also ended up writing their own animator in Python to pose the models (screenshot here).

Interestingly, John VanSickle has also announced that he's going to be adding animation capabilities to his subdivision surface-based LionSnake modeler. I've used his modeler before, but the interface sort of baffled me. It had this odd sort of "knobs" bit on bones that I couldn't quite figure out. Ooops... I see he's changed that now:
After sketching out ideas for a scene building capability (it will be part of version 2.0), I concluded that the parts and knobs skeleton system was not going to work and had to be redesigned. The new system uses one object type—they're called Bones—and this new system works differently (and has more features). The new system is reflected in the saved files, hence a new version number. Version 1.6 will load older files (v1.5 and earlier), and will replace the old-style skeleton with a new-style skeleton (which you will probably want to delete and rebuild).
Moral: stick with standard tools (where possible), and have good documentation.

So it looks like there'll be a bit more competition for JPatch. ;)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron