Realtime morphing

Project diary for a realtime morphing demonstration. We are two skilled students at gsCept university creating an advanced real time morphing simulation. This is our diary about it.

Thursday, March 10, 2005

It's all coming together

One day left on the project and one week until the final presentation :)
Overall It feels pretty good, I feel like I have reached my goals with this project.
There is always more stuff to do but a "final" version of the code that will be used for the presentation is done. Later i might pack the textures and HLSL files into the .exe for easer distribution
(if someone on this planet wanna download it for some reason:).

Short summary on what's seen in the demo.

Alot of the lightning/shading data is sampled from textures to give the artist as much control of the shading as possible.

Textures
- Diffuse color
- Specular color
- Shininess
- Normal
- Reflectivity
- Height
- Light
- Attenuation

The Ground
- Normalmapped per pixel diffuse and specular lightning (Phong model)
- Parallax mapping for greater 3D feel.
- Receives soft shadows.

The Angel(s)
- Normalmapped per pixel diffuse and specular lightning (Phong model)
- Environment reflections
- Renormalised tangent space basis each pixel for accurate lightning
- Morphs between all textures (diffuse, specular, normal, shininess, reflectivity)
- Receives and generates soft shadows
- Smooth skinning
- Kochanek Bartels Hermite spline interpolation for translation track
- Spherical Linear Interpolation using Quaternions for rotation track

The spotligh
- Projected texture instead of the original spotlight model
- Attenuation map to control the fallof.

Ambient lightning
- Ambient lightning ala "half life 2" so detail from the normalmap is visible even when shadowed,
traditional ambient lightning just makes everything completely flat.
- Works by specifying an ambient cube representing the color of the light flowing from that direction in space
- Eaxh pixel rendered samples and blends between 3 of the ambient cube sided depending on It's worldspace normal

The sky
- Ordinary skybox

Shadows
- 1024x1024 shadow map
- 2x2 PCF sampled 5 times to give "soft" shadow edges.

Volumetric light/fog
- Lit depending on the lights projected texture
- Shadows from blocking objects
- Fog is generated using 3 octaves of perlin noise from a 16x16x16 texture
- Rendered at a small resolution and via "smart" filtering rescaled to fit the screen while minimizing aliasing artefacts

Morphing
- Transitionless slider based morph affecting the whole model
- Plane morph dividing the model in 2
- Lightbased morph where the morphvalue is sampled from the projected lights alpha channel.

The demo engine is coded using C++ and D3D9 in VC.2003.
All shaders is written is HLSL and some makes use of vs/ps 3.0 because of their length and branching requirements.

Maya exporter plugin
- Exports one mesh with the bound skeleton if any
- Triangulates polygons
- Splits vertices depending on hard/soft edges and texture seams
- Calculates tangents and binormals taking into account artist modified vertex normals
- Complete skeleton hierarchy with rotation and translation track exported including bindpose
- Unlimited amount of skinweights per vertex

The exporter is coded in C++ in VC.2003 using the Maya C++ API.

Wednesday, March 09, 2005

Getting wrapped up

Well, animation is almost done. I have successfully completed the animation, but it needs some minor fixing until it feels more professional. This workflow - sketching up the whole animation first, and then finalize and perfect it - is the best. Only drawback is that people in the classroom looks over my shoulder and thinks "uh, that's not good", and when some people does this, it's kind of irritation.

Anyway. Right now the follow things needs some attention - then we're ready to go gold.

- animation
The animation needs more attention. This is actually a never-ending task, so I will most likely finish up the other things first, then work the animation until no time is left.

- model
Needs to be tesselated in some areas for better deformations. This must be done in consideration of the normalmaps, which are already generated. Perhaps I could generate new normal-maps, as my workflow allows for it... .Hmm... I placed all manual changes in layers in a .psd file, so I could change the original by just changing the background layers.... (Must be thought over.)

- skin weights
If I add more polygons, I must also paint how they are weighted.

- gui
Fix the gui so it's more personalized

- icon
I'm not happy with the icon I made. I have very fuzzy ideas about new ones, so until I can think of something more concrete, the old one will have to do.