Monday, November 5, 2007

Getting to final countdown

The end of thesis feels so far away, and yet, IT ISN'T! With just about a month to go, I feel like I have gotten about 50% of the way through my project. Time to step it up! Big changes over the past few weeks:

-starting the underwater bottle animation
-getting a nice looking ripple effect
-setting up organized rendering folders
-getting a nice looking plant-adding animation
-working on the manual
-working on a lighting rig
-working on paint effect trees

The underwater bottle is a nightmare of an effect, even Gavin said so. He showed me a similar effect that he did by texturing swirling liquid footage onto a deformed plane that moved along with his object. This seems more like an additional pass rather than the full on effect, but no matter what I do there will be several passes.

My first attempt was with a 3D fluid emitted from inside the bottle, but that didn't work because I needed impossibly high voxel resolution to get the fluid to realistically flow out of the bottle.

My second attempt was with a 2D fluid, with collision planes animated to follow the sides of the bottle. This turned out to be awful, and was even worse because I spent a lot of time on it, thinking with each passing hour that it would only take a little while longer to get it to work. As it turns out, matching collision planes to the 2D fluid is extremely difficult. Maya doesn't look at where a surface collids with the fluid plane, Maya checks to see if the object collides and then uses the whole object as a collision surface. Thus my first attempt at this method, which used a cylinder instead of two planes, failed miserably.

The breakthrough came when I decided to use the 2D fluid as it's own pass, and take care of the fluid in the actual bottle using a moving ramp shader. That part of the effect now looks good, and I'm working on shaping the 2D fluid, and getting in some particle bubbles. The bubbles are blobbies so I don't have to worry about reflections and refractions output from a hardware render.



The ripple effect was kind of fun to do. I started by working with the standard ripple effect from Maya's visor, which utilizes the pond wake. The only problem with this effect is the fact that it's not very portable at all. I can't really add anything on top of it because it's a fluid, and not a mesh.



My second attempt involved a keyed ramp on bump. With the ocean shader, this didn't work at all because for some reason the ocean shader has trouble reading in bump. Not sure why. It did work, however, when I mapped this bump to the wave height offset instead. Now it looks pretty good, if I do say so myself. The next component I need to add to this effect is the drop of fluid actually spreadin out in the pond, then sort of fizzing away to nothing.



Another little irritation that happened for both these effects. Apparently, mental ray does not like heavy particle or keyframed shader animation. It refused to render some of my particles and my shader animation for the bump map. After many headaches, I finally came across a script to batch render multiple frames in mental ray from the image viewer, something I had been trying to write myself but without success.

global proc mrBatchAnim ( int $start, int $end, int $by) {
int $frameNum;
$last = ($end + 1);
print ("\n\nRendering Frames " + $start + " to " + $end + "\n\n");
for ($frameNum = $start; $frameNum < $last;) {
print ("\nRendering Frame: " + $frameNum + "... \n");
currentTime $frameNum;
string $filename = ("C:\Documents and Settings\patsiarisd\Desktop\jking\wellTest2."+$frameNum+"tif");
renderWindowRender redoPreviousRender renderWindowPanel1;
//renderWindowSaveImageCallback renderWindowPanel1 $filename "image";
$frameNum = $frameNum + $by;
}
print ("\n\nRendering Complete.\n\n");
};

Of course, this is not how I got the script. The script I downloaded apparently only works for Maya 5 or so. Maya 8.5 has done away with the renderView object, or at least that was the line that failed: renderWindowRender redoPreviousRender renderView. So I changed it to the render panel and it worked, but unfortunately the panel refuses to accept the $filename input (the renderWindowSaveImageCallback line only saved the same image into the same folder, instead of the $filename folder). Thus, I can only save to the image directory specified by the current project. A minor annoyance, compared to the more aggravating problem of not rendering particles at all.

I've organized my render folders on a single computer in the lab, since gramercy, our networked storage space, is getting pretty full. Each shot has its own folder, which in turn contains folders for each pass. Older passes are transfered to other folders
within the same shot folders. I also changed the after effects file to locate the image sequences within these subfolders. I think I will stick to after effects for the basic composite, maybe even the edit, just for simplicity's sake.

The plant dropping animation was actually pretty fast for an effect. I basically tweaked Duncan Brinsmead's (yet again) tutorial for confetti. My knowledge of nCloth has since grown exponentially, methinks. This effect went quite fast, after a few tweaks with dynamic forces. I'm debating whether or not I should try to get some of the pieces to float on the water. I think I will add ripples for sure, but the floating on the surface dynamically is a little more difficult.



The manual requires a lot of nCloth tweaking, but the good news is I got it to model a pretty nice opened book. The page turning is turning out to be very problematic, however, and I'm considering doing the turning animation with blendshapes as I did for the animatic. Which is sad, since I set up the whole system in nCloth. But hey, whatever works.

Gavin discussed my lighting rig this week, and it's basically four lights: one coming from the street lamp (which has changed positions to better light Billy's face as he stands over the well, an opposing moonlight to serve as a colder fill, a bounce light only on Billy to simulate reflected light from the well, and finally a point light point constrained to the camera to fill in any other dark areas. I will then add more lights as needed on a per-shot basis.

The paint effects trees were also difficult to work with. The hardest part to deal with is their conversion into polgons, and I'm debating whether I should do this or not. The benefit is that if they are converted they can be rendered in mental ray, and so they can use the raytraced shadows created by the spherical area light. Otherwise I have to create depth map shadows for the trees, and probably render them out as a separate software pass. Here's one of my latest incarnations, the branches are a little too thick and the trees overall are too bright, I think. Gavin said they look too much like broccoli stalks.



Some more stills showing the latest look, sans paint effects trees because they don't render in mental ray as of yet:






Well, that's the update, for now. I'm starting to integrate some of the effects into my animated shots, which is a big step. Now my biggest worry is the dragon, which Adrian says will be finished by this week. I then have to rig and do blendshapes for the dragon's face, and animate it as well. That's the biggest hold up, causing me to basically ignore the second half of my animation. If the dragon is finished within this week, hopefully by next week I will have near finalized animation in all shots, and at least a first attempt at a beauty pass for every shot in the piece. Besides the dragon, I'm feeling pretty confident about the rest of the animation. But ask me again in a couple weeks, we'll see ...

No comments: