Monday, February 28, 2005

Three Times is a Charm

Well, my little video project is borked again. This is good experience... I guess.

Evidentally the source was somehow corrupted on the way to the raw video feed, which was just exacerrated when it was encoded & multiplexed into a composite file. Thppppttt.

Of course, I didn't find this out until I had ripped everything. Again. Oh well. Now I have to re-rip everything... and this time it wouldn't have helped at all to keep the raw files, since evidentally they're the ones at fault.

So now the plan is to try a few different ways of doing things: clean the tape head and make sure that's not the problem (I doubt it is), update libdv to see if that helps (it might), rip the video stream as AVI instead of raw DV (who knows), try using the command-line ffmpeg instead of Kino's invocation. One would hope at least one version would be verifiable by mpgtx.

Delete everything! Start again! w00t!

Wednesday, February 23, 2005

A Cross Platform

Cross-compiling (or CrossCompiling or x-compiling if you're trying to Google the freakin' thing) is neato. I've been trying to find a way to easily build apps for Windows from Linux, namely RMI dll's for Java. I finally tried buildling MinGW's binutils, GCC and Windows API's into a cross-compile toolchain for Linux. After fighting off lovely GCC_NO_EXECUTE configure errors and finding this fantastic build script I finally have a working build environment. I absolutely dig it - now I can build both X Windows and Win32 native code at the same time on the same platform. w00t!

I just got to thinking about that after IBM announced Chiphopper, it's end-to-end service and product line to port Linux apps to their z Series and p Series line. Methinks IBM realizes that OS/400 is well past its prime and is overdue for retirement. Considering DB2/400 was missing a lot of things MySQL even had (including performance), I don't think it will really be missed. DB2 on Linux, however, is a whole other ballgame.

Wow. I'm really wandering off-topic now.

Saturday, February 19, 2005

Wrapping My Head Around It

I remember my teacher in fifth grade telling us how a globe is the only way to get accurate idea of the continent's proportions on Earth. She tried very hard to explain how the topography becomes warped when you're trying to represent a three-dimensional sphere on a two-dimensional map. Considering we were eleven, the euclidian geometry went straight over our heads.

Now I get it. Trying to map a three-dimensional head onto a two-dimensional texture map is next to freakin' impossible for my feeble brain to grasp... I can't get the stretching out. Ugh.

Arms, legs and torso better be damn easier. Hopefully just cylinder mapping.

I might just give up and try Wings 3D.

Level One

I remember spending hours at a time with Build, DoomEd and DOOMCad. Aaahhh... the good ol' days of convex polygons and wondering what misjoined vertex was causing my level to leak.

When reading FAQ's to build one of my many one-trick levels, I came to find one of the eternal truths of design:

"Lets face it, your first level IS going to suck. This happens to everybody. I HIGHLY reccomend you make you first level suck on purpose."

Map Editing FAQ v0.1 by Brett Gmoser

Tuesday, February 15, 2005

Brain Fried; Motherboard Isn't

Just installed my new Abit AN7 to replace the SY-KT333 DRAGON Ultra that I fried. It's neato. Even prints out the BIOS POST codes on an LED next to the PCI slots.

I had to reinstall WinXP - too much crud had built up. Drivers and been installed and uninstalled, hardware had changed over and over, activation was about to go down. SuSE handled it fine once I installed the nForce drivers. Chalk one up for SuSE.

Friday, February 11, 2005

Too Much in My Head

Someone submitted a bug report for ConsultComm recently, so I stopped to do their quick change. Then I wanted to add a few minor features. Then I wanted to build in the latest version of the JDesktop Integration Components. That's what always happens with my ol' ConsultComm... I go three months without thinking about it then all of a sudden I'm hacking away at everything. I am pretty pleased with the plugin system, tho.

Motherboard also died recently... so I just got a new one in to replace it. I think my Audigy and USB ports were fried from static during the winter. Ick. At least since it's an older Socket A board it was fairly reasonable to get a replacement.

Still trying to get texture mapping right. I need to fuse my model's mouth together (and some would say fuse my own while I'm at it). Texture is still stretching too much... and I need to figure out how to map the rest of the body while still not missing any mesh faces. Ugh.

Tuesday, February 08, 2005

Emotional Gaming

Remember how I posted a while back that a breakthrough game would need to "redefine" the genre? Consider Romeo and Juliet, something developed by Full Sail grads for their final project. Rendering is done using a paint & canvas technique. Language is expressed by ballet. Colors on a palate represent emotion.

Looks like they're thinking of making a public release as well.

On a similar note, if Darwinia doesn't release a Linux demo soon I'm gonna spit.

Friday, February 04, 2005

Head Texture

Texture mapping is hard. It doesn't help that my mesh isn't perfectly symmetrical, either... makes face selection for uv mapping awkward.

I used the mesh decimator in Blender to take a high-detail model down a few hundred notches and get a poly level that was more-or-less acceptable. Now I'm trying to unroll the mesh so I can create a texture to map onto the surface of the head. In this guy's tutorial it seems like cake, but not so much for me.

The biggest thing for me is getting an acceptable set of skeletal animations so at least I have a template to work with. Once those get done I'll work on actual code and see what I can do about collision detection. My big thing that will cause me to celebrate will be collision detection between sprites (i.e. a boxer hitting a heavybag).

I'm thinking about writing another tutuorial about UV texturing... that'd be helpful methinks. What I'm really psyched about is using shaders for textures... but that's way, way down the line.

Wednesday, February 02, 2005

BadGate

I've tried out cell phone gaming with Sorrent's Baldur's Gate recently. I wanted an RPG somewhat akin to the ol' GameBoy days... something that made it easy to pass the time in some loosely held story with a lot of arcane items.

Boy was Baldur's not it. I mean c'mon, game designers should at least be able to match some of the old GameBoy carts. But this game is so freakin' awful I can't even describe it.

First, the storyline. Usually not a big part of a game - except if it's an RPG! Here I have to go around and get a few scrolls to give to some cleric to look at. Whoop-de-freakin'-do. I bet the sequel is going to be a character returning movie rentals before they *gasp* become overdue.

The game uses the AD&D ruleset and has a variety of character classes to use - but the combat is so monotonous who would even care. Swing. Miss. Swing. Hit. Swing. Die. Wheee!!! Ranged combat is the same as close combat... the only difference is with ranged combat you attack - then stand still while something implike walks up and thrashes you.

Collision detection and map layout was done better in 8-bit NES land. The overhead view you have means that maps are defined by terrain tiles - which means the 8x8 sprite might be dry land, it might be a river, it might be a ton of pointy spikes. Hell if you know - you're just trying to run away from something implike and for the life of you there's no way to cross this corner of seemingly open plain.

But at least the bad collision detection makes killing things easier - enemy pathfinding has just as much trouble trying to walk through apparently open tiles and just gets stuck on the corner of a riverbed. So if you have ranged combat just sit back, pop open a cold one, and just auto-attack until aforesaid implike creature is gibbed.

I also tried the free demo of Fox Football. Evidentally you are a football player. And you need to press numbers. That somehow corresponds to the goings-on during a "football game." I'm not sure what happened... nor do I care... I could have sat on the phone and done just as well.

If this is representative of the market right now, maybe I should be getting a copy of J2ME and trying my hand at some mobile game development instead. If I could make something half as decent as my 16-bit greyscale handheld from fifteen years ago I'd be a raging success.

Hopefully all that time wasn't wasted...

Sinus infection going away now. That last round of antibiotics was pure 3vi1.

Finishing up my "I can't freakin' think or breathe so I'll just rip video all day" project so I can get back to Blender modeling. I had originally used mjpegtools to encode all my DV video into MPEG-2. It looked fine on any computer I used, even when burned onto a DVD, but looked like absolute crap on a consumer DVD player. Motion trails, decoder noise... ick.

At first I thought that the player was having problems reading the media - which is weird because I have a Pioneer progressive-scan player that has thus far displayed every form of media, encoding, codec or book type known to man. But I switched from DVD-R to DVD+R to see if anything worked. Same results. Then I thought it might be the multiplexor separating out audio and video from the file stream. I tried both DVDStyler in Linux and Nero in WinXP to build the DVD filesystem, and both had the same garbled output.

I found out it was the mjpeg encoder... so all the work I'd done to encode every single DV tape I had was all for naught. I replaced mjpegtools with ffmpeg and all was beautiful. About twice the size than the mjpeg files, but looked even better than Nero's MPEG-2 encoder. Plus it uses AC3 instead of MPEG-2 audio. You can see a comparison at Transcoding's site - for some reason they still recommend mpeg2enc at higher bitrates, but I just don't see it. I hate the boxy sample noise generated by mpeg2enc.

The one problem is that Kino doesn't split scenes for ffmpeg (it's just a DV pipe). So I either have to

  1. Figure out what options are being (not) passed to mjpeg and try to force 'em
  2. Manually set the beginning frame and end frame for each export using ffmpeg
  3. Write a script to invoke ffmpeg over each individual DV file
  4. Or just archive "movies" instead of "scenes"


So now I'm mullin' thru man pages and examining the command-line options Kino is passing along. w00t. One day I hope that mpeg2enc -v 0 -f 8 -I 1 -n n -a 3 and ffmpeg -v 0 -f rawvideo -pix_fmt yuv420p -s ntsc -r ntsc -i pipe: -an -target dvd -f mpeg1video -maxrate 8000 -ildct -ilme -aspect 16:9 -pass 2 -y make as much sense to me as ps -eLf.

Damn I'm hilarious.

I forced 9000kbps and sent a bunch of arcane commands to mjpeg, which eventually removed the "blockyness," but it still looked worse than ffmpeg. I tried it on different hardware and even custom-compiled the latest CVS version, but still not as nice as ffmpeg. True, mjpeg file sizes are nearly half of ffmpeg's, but the difference in apperance is noticeable.

So I think my final toolchain (I'm big into defining toolchains) will be:


I tried using Nero on the Windows XP side but I didn't find it as easy to use. File sizes and image quality was just about the same as ffmpeg. It encoded on-the-fly which was very nice, but I'd rather rip it all as DV Raw files, then do post-processing, then MPEG-2 encode. Plus I got weird lock-ups at times. The DVD authoring tool was very nice and I might end up using it instead of DVDStyler at times, but you can't save an ISO for burnination later (for some reason it thinks that only CD-R's get ISO's).