Monday, December 26, 2011

Take 48, cut

Next post will contain a movie release. Unless I get heartfailure while stuffing myself with Christmas food.

For those who expect another gameplay / spooky horror trailer, I'll have to disappoint you a bit. It's a "Tech-Demo". Which means it shows graphical stuff mainly. The goal is not to please gamers. Screw you, the whole purpose is to attract more 2D / 3D talent :p Ok, ok, we added a little present that might please you as well ;) Nah, the movie could represent a Tower22 part (although T22 does not take place in military looking Radar Stations). It's a little taste of how things *could* look (and even better)... IF we get a team strong, talented and motivated enough to help me through that is.

One problem to tackle with this next movie is the recording quality. Main issues last time were the hellish sounds and overdone blur. Both caused by the combi of Tower22 and FRAPS taking the same CPU resources. Two mangy dogs fighting for a stinky shoe. Two old ladies arguing about the TV channel. Two hoes pulling each other’s (pink)hair for a pimp. Two . Anyway, a year passed by, plenty of time to evaluate and prepare better for a next time. So what did we do? ...Ehr...

Doing homework was never my strongest skill. In contrast to Postponing. So I started sweating again for the recording session. The desktop computer used for recording has a newer video-card, so the good news is that it should have some more firepower this time. Then again, this new demo is quite a lot more advanced than Demo1. More lights, more shading tricks, more textures and objects, et cetera. On top, I didn't try the engine for half a year on that computer. Oh boy.



As expected, the framerate crippled again, but not as bad as previous time. After some optimizations, FRAPS and T22 eventually got in Sweet Harmony. Sort of, at 20 frames per second. That's still not smooth as silk, but already better than the previous time, plus the resolution has doubled as well. Maybe we can squeeze out a few more frames.

A far better approach would be recording the video-card (HDMI?) output with an external device. Like you could record your Super Mario Paint(snes) movies on VHS. Hmmm, maybe I should buy a digital camcorder or something. Let it store the video-card output on a disk, then read the digital file back on the computer. Never tried it, but it sounds like a valid plan. And otherwise you'll have to do with a more jerky movie :p

Still have to pimp a few rooms. Julio takes a snapshot of an existing room, adds some photosoup magic, then passes it back so I can try to achieve the same thing with the engine.


One thing I could solve software-o-matic, was the camera path. Like in real movies, it sometimes takes several cuts to record a scene. Or did you think Commando was recorded in one single shot; Carry tree, smile horrible while daughter puts ice on nose, smell enemies, get down, kill enemies, daughter gone, get captured, kill guy and say he's dead tired, jump out of plane, go to shopping mall, throw telephone cell, drive, chase, crash, throw little guy from a cliff, fuck-you-asshole, infiltrate hangar, window shopper, get busted, get freed, fly to a tropical island, undress, boat, dress & makeup, kill a few with tactical stealth tricks, kill 10 dozens more being absolutely not stealthy, kill with an Uzi, kill with a shotgun, shed fight, get in the villa, shoot gringo warlord, go to the basement, get shot in the shoulder, knife-fight with a fat moustache man in a chain mail (hu?), blow some steam Bennett, found daughter, happy, -fin-. Bang, 90 minutes.

Arnold Schwarzenegger has awesome acting skills, but not so awesome to shoot this movie in a single 90 minute-breath. Hey, not even fucking Commando himself can do that, cause the timeline was spread over 12 hours in the movie. Enough kidding. Of course movies take multiple shots, with multiple camera's. And afterwards, the best parts are pasted together.

With games that use a first-person-camera, this isn't so easy. If the camera suddenly shifts 30 centimeters to the left, or if the lighting suddenly goes a bit darker, the viewer will notice this "discontinuity". Do it too often, and you'll get an epileptic attack. Movies tend to switch the camera viewpoint every 5 seconds or so. This "switching" helps hiding discontinuities. Maybe the actor moved 10 cm to the left, maybe the sun stopped shining, maybe he lost his boner a bit(other type of movie). Or maybe a plane just happened to fly over the Coliseum, roughly 2000 years ago. Neither did I know a camera crew was taking part of the battle in Ramelle. The point is, the viewer doesn't notice because (s)he's focused on the actors, and the camera switching hides faults too. Hence, did you know T22 Demo1 was made out of 2 parts as well? When the player runs the stairs up, a second movie was used at some point. Yep, when the camera switched from third to first person view.


This time I won't be switching camera views, so everything has to be recorded perfectly in one time. And that's difficult! You have to make sure the camera captures all the wanted "hotspots". Not too long, but not too short either. We amateur camera-men tend to record things boringly-long, or in turbo-pace. If you know what you are seeing, focusing on it for 2 seconds seems like an eternity.
But for another viewer that is not familiar with the scene, it takes at least a second to re-focus. I always get dizzy and sick of those MTV shows where the camera crew seems to be on speed. Yo biatch, my kitchen, home cinema for real, here’s where it all happens in the master bedroom, 50 inch rims, now get off my property. 10 billion shots, they sure show a whole lot. I just have no idea what I just saw the last 10 seconds. Too fast. Anyway, finding the right pace for a movie shot is very important. And last but not least, the camera has to follow its path in a somewhat natural, curvy way.

In my case, I have to navigate the camera for ~6 minutes (that's how long the movie takes) without making faults. With a jerky mouse. With FRAPS and T22 arguing for (CPU) resources. With a little kid making noise in the background. With a girl that starts talking about, ...-hell I don't know- while you are sweating and recording the whole thing. You can't do it in 2 or more parts, cause it's just impossible to redo the exact same camera path. So at the stitching points, you suddenly see the camera hopping to another point, the lighting changes, et cetera.

Moving the camera down a stair, with a curve, is difficult enough already. Doing it twice exactly the same is impossible.

Do the loco-motion logger
Hey... But I got a little idea! Nothing new really, yet very useful. What if you lock your family outside, don't run FRAPS, and run a "motion logger"? Yeah, just store the camera view every (few) cycle(s). In my case, I made a little class that stored the camera matrix 15 times per second. Just directly writing it in an opened file-stream. If you are really cool, you make a background thread that fills 2 buffers and store those in a filestream, but that wasn't necessary for the little amount of data in my case. To give you an idea about file-sizes,
---- 5 minutes = 5x60 x 15(fps) x matrix(64 bytes) = 282 kilobyte
That isn't too bad. Otherwise you may store quaternion’s instead of matrices to save more space.

Now that we have the camera path stored, we can redo the navigation with a click on the button. Store all matrices in a gigantic array or better, make a (background) streamreader that fills a buffer with matrices each X seconds. Then calculate the actual camera matrix by interpolating between the current and next frame matrix. The path is 99% identical to the one you recorded earlier. Eventually you can relax and edit parts now, or let the computer calculate a spline to get a more smooth route.

In case your girl started talking about spaghetti or your little brother kicked your legs while recording, causing your mouse-hand to do make a jerky movement, it's relative easy to polish. Let the camera follow the path till the point where things went wrong. Stop it, hit the capture button again, and now do a second attempt. The newer part should fit seamlessly with the previous one.


When you're finally happy with the camera route, you can finally record the movie for real. Just let the camera roll over the railtrack again, sit back, and relax. Even when the video capture program causes a jerky framerate, the camera will keep stable cause no human input is needed anymore. What a relief.

No comments:

Post a Comment