nav2

Showing posts with label export. Show all posts
Showing posts with label export. Show all posts

Saturday, March 16, 2013

Shape keys vs Blendshapes

This semester my optional module is facial modelling and animation. This is yet another animation module in Bradford University that makes the student create an entire pipeline before animating anything. So there you see why there is so much modelling and rigging stuff on this blog and so little actual animation. None of the modules really allow me to focus only on animation and it usually happens in the last weeks of the assignments :)
With that grudge aside, I decided that such a module would be a good opportunity to refresh my facial rigging skills before getting on with that part of Soda Trip's production. Gotta make some lemonade.


So why pick blender to make the blendshapes and go through the hassle of exporting to maya again?
The character was modelled in blender, so it made sense to continue using the nice modelling tools.


Well, they are called shape keys in blender. Instead of duplicating a mesh, deforming it and applying that as a blendshape, blender stores the keyable deformations you make on a single mesh inside a shape key data block of that mesh - it stores the new coordinates of vertices you moved while being in the specified shape key mode.

Shape keys in Blender vs Blendshapes in Maya:
Blender allows me to change the topology after I have already made   multiple shape keys on the mesh . It's like changing topology in maya after having made multiple blendshapes.
Whats nice about it is that I can use this new topology to shape my character on some of the already created shape keys.

Maya does not allow you to alter the topology of a blend shape object- if you add an edgeloop, it will not affect the target object or might break the blendshape (you cannot reaply it any more).
You can change topology of the target (base) object, but that new topology is not being transfered to all the blendshapes you have - again, you can't use it to deform.
So you are in a strange sort of a situation when you have to somehow relink blendshapes or redo them. Thats gonna suck pretty bad if you have about 20 of them already :D 


In this case the upper eyelid becomes a classic example. After the character closes it, the mesh needs an extra edgeloop in order to curve it along the eyeball slightly.
In maya, you have to add that edgeloop in advance. You have to guess how many edgeloops- some people add much more than one - you can add a few too many.
Here I can completely close the eyelid with a new shape key and then add as much geometry as I need to keep it from clipping with the eyeball.
It also lets me alter the shape key geometry when its not at its full value- in this case when the lid is half closed(.67), I can move the bottom edges forward.
To do that in maya you need to constantly look at the two meshes, set up an elaborate workspace with two cameras- one looking at your base mesh, one looking at the blendshape-work on one while looking at the other -  it's just a pain.

Sculpting the blendshapes:
To get a good view over how the geometry deforms on my shape keys, I toggled on the excellent new matcap view mode and toggled on my wireframe from time to time:


Ton Roosendaal (Blender's founder) asked the community for matcaps for the very first version in trunk to support that feature as a preset in the viewport.
I made him two grey matcaps that might not look like much, but are actually pretty good at showing clearly how the geometry deforms and showing subtleties in a sort of a neutral way.
Ton included them in the official 2.66 release(mc8 and mc9). So now I can proudly say that I made a little contribution to Blender and to it's very big artist community! :D

Transfering blendshapes from blender to maya:
Just as with the recent posts , in this case I am transferring geometry from blender to maya and referencing it in maya. Only this time, I also need to export all the shape keys that I have created for my character's face and hook them up in maya.

When you export an fbx from blender that contains shape keys, maya gets all of those shape keys as sepparate meshes that have no material on them.They are also already applied as blendshapes to the main one and hidden.


Blender's fbx exporter impressed me this time. That is pretty neat! Only feature thats missing for me now is the option to zero out transformation values on export. I dont like having a dirty channelbox.

So It might look like I am pimping blender out a lot lately. That is hopefully not making me look too biased. The truth is that I need these features to do my work faster and blender is giving them to me. It's effectively competing with Maya, undermining aspects of it's pipeline. But Blender is not perfect. And in future posts I might write about it's weaknesses.

Wednesday, December 26, 2012

Reusing 3d animation and rigs for games - research report for university

One of the university modules in this semester had for an (optional) assignment the research of reusing character rigs and animation to be imported to a game's engine.

I was given a deadline to write a greenlight pitch, a research paper (almost 30 pages!) and then create a technical demo video.

 It's pretty much do it yourself sort of a thing set by university(just as many other things).
In this case before even delving into reusing animation clips, I decided that it's more important to find out what exactly are the best practices in character rigging and animation for game engines - where the data has to be created in a specific way that will make it friendly to use by the programmers and the engine.

In the research paper I used for sources the excellent presentations on animation in Uncharted 2 by naughty dog, among  other things.It was a bit rushed so It got me 64.4% .

For the video, I used kdenlive to put together a quick overview of the findings of experimenting with some of the tools in Maya:

http://youtu.be/YOuWO8My84c

That got me 85 % .

The paper and the video focus on the work that is done in the animation package rather than the game engine. I have in the past done character modelling, rigging and animation for Unity 3d. That first experience was a bit of a trial and error - the animation data needed to fit with how the character actor is scripted.It's something that I will keep fo a future post, until there is time to put together a demo of that game.


Wednesday, February 24, 2010

Exporting the animation to video file, compression settings and colors

The last part of the job was of course getting a video file out of flash.



FPS---
The first problem I had was with the fps in the video file. Since the animation of Toast!/malfunction had movie clips with applied effects on them (some of the backgrounds) that really slowed it down. To get over that problem, I exported the background as jpg and imported it back to my libraries and replaced the movie clips with jpg files. Don't use too many effects on your movie clip symbols, that will slow it down. The ending result still had some slight slow downs on some of the shots. The slow downs didn't occur in the swf file, which leads me to believe that it had something to do with the way flash renders the animation to video files. I could still play with the settings there.

Encoding--
The second problem was getting a small file size with a relatively good quality. The defaut settings of exporting a mov file will give you a huge file,that is not internet-friendly. I had to set up three things (quicktime settings):

>settings: compression type:mpeg4 video,quality:best
>filter: you can play with the color settings ,but this will slow down the rendering time,so I didnt use any filters.
>size: 720x576 PAL , 4x3 , keep aspect ration with letterbox

>sound> I didnt touch the sound settings

Colour--
I had to go and upload the file at Bradford university's horton labs. One thing those computers are useful for is downloading and uploading. After seeing the animation again, I found out that the colours look awful there. The boy's shirt was over saturated red, the robot's head is too purple. The lesson to be learned here was monitor calibration. While drawing my character's , I should have thought more about how they are going to look like on other people's screens. I have to find out- is the monitor at the labs set up badly or is it my own monitor. I tend to set mine in a way that doesnt strain my eyes. Changing the default settings to lower saturation, I also lower my brightness and contrast slightly. The weird thing was that it also had a slightly different hue (the robot's purple head). All and all, after I fix all the annoyances of the animation, I will export it properly as a big file and edit and encode it with Adobe after effects.