Friday, April 23, 2010
Beta Pipeline
Sunday, April 18, 2010
"Hacky" Collider Tracking
Goal: Use control laws to extrapolate the linear and angular velocity (or force) necessary to move the head rigid body so that its position/orientation matches that of the control node
The (hairless) head collider can now move and twist to match the control node! Unfortunately, my means of accomplishing this are a bit "hacky": at each frame of the simulation, I set the collider's position/orientation equal to that of the control node. The "proper" method sets linear/angular velocities or forces, but I'm running low on time, so I'll use the "hacky" approach for now.
We're in the home stretch now! Final demos are in 2 weeks. In the remaining time, I hope to accomplish the following:
The (hairless) head collider can now move and twist to match the control node! Unfortunately, my means of accomplishing this are a bit "hacky": at each frame of the simulation, I set the collider's position/orientation equal to that of the control node. The "proper" method sets linear/angular velocities or forces, but I'm running low on time, so I'll use the "hacky" approach for now.
We're in the home stretch now! Final demos are in 2 weeks. In the remaining time, I hope to accomplish the following:
- A memory management overhaul (ironically, in an attempt to make my code more compact and legible, I somehow introduced even more deallocation problems than before)
- [CIS660] Finish the hair shader (using the work of Zinke and Marschner as a guide)
- Translate the hair shader code into a GPU vertex shader language (GLSL most likely)
- Make the head collider oblivious to the forces introduced by the key hairs (alas, I cannot simply set the position/orientation of the hairy head collider; it wiggles around and drifts due to the extra inertia/weight produced by the attached hairs - I'm waiting to see what the Bullet forums has to say about this one)
- UI cleanup (plug in UI features that haven't been implemented yet, such as automatic scene rescaling and a means for specifying simulation/rendering parameters)
- Get better test data (including a deforming head mesh as well as corresponding KF data)
Wednesday, April 14, 2010
Projected Key Hairs
Goal: Fix Bullet hair oscillations by projecting hair roots onto the head collider.
Projection onto the collider seems to be working now. I ran into some usage issues with the convex hull decomposition library (but an e-mail to its developer cleared things up). Since my collider is composed of multiple hulls, I have to iterate through all of them, checking to see if a scalp vertex projection onto the current hull yields a better result than for the previous hull. My "best choice" heuristic for this decision is based on distance (i.e. the intersection point farthest along the ray that points from the collider's center --> the scalp vertex). The results look good, meaning that the key hairs are now growing out from the collider instead of from the scalp mesh. As I predicted, Bullet is much happier with this hair anchor position, and only a few of the key hairs oscillate slightly. How to resolve the remaining oscillations is going to be tough. I could turn to the forums, but I fear this is an issue with the robustness of the engine (since I've already tried maxing/zeroing out all the parameters associated with a Bullet soft body). Oh well, can't hurt to try again.
Each convex hull in the collider has its own pastel-y color now! As you can see, there's still a need for a pass in the pipeline that takes the original (very dense) input mesh, decimates it, scales it up slightly, and then sends the result to the convex hull decomposer. One issue that crops up now that the key hairs are grown from the collider and not from the scalp is floating key hairs. Since the collider and the original head mesh have slightly different boundaries, some of the key hairs will not be connected to the original head. To fix this (for now), I drew in an extra segment connecting the key hair roots to the center of the scalp, like so:
Projection onto the collider seems to be working now. I ran into some usage issues with the convex hull decomposition library (but an e-mail to its developer cleared things up). Since my collider is composed of multiple hulls, I have to iterate through all of them, checking to see if a scalp vertex projection onto the current hull yields a better result than for the previous hull. My "best choice" heuristic for this decision is based on distance (i.e. the intersection point farthest along the ray that points from the collider's center --> the scalp vertex). The results look good, meaning that the key hairs are now growing out from the collider instead of from the scalp mesh. As I predicted, Bullet is much happier with this hair anchor position, and only a few of the key hairs oscillate slightly. How to resolve the remaining oscillations is going to be tough. I could turn to the forums, but I fear this is an issue with the robustness of the engine (since I've already tried maxing/zeroing out all the parameters associated with a Bullet soft body). Oh well, can't hurt to try again.
Each convex hull in the collider has its own pastel-y color now! As you can see, there's still a need for a pass in the pipeline that takes the original (very dense) input mesh, decimates it, scales it up slightly, and then sends the result to the convex hull decomposer. One issue that crops up now that the key hairs are grown from the collider and not from the scalp is floating key hairs. Since the collider and the original head mesh have slightly different boundaries, some of the key hairs will not be connected to the original head. To fix this (for now), I drew in an extra segment connecting the key hair roots to the center of the scalp, like so:
Wednesday, April 7, 2010
Marschner Progress (III)
This sucker displays the following components of the Marschner scattering model:- Ambient
- Diffuse
- R lobe (color and distribution), although more parameter tweaking is required
- TT lobe (distribution only)
- TRT lobe (distribution only)
Monday, April 5, 2010
Friday, April 2, 2010
Saturday, March 27, 2010
Marschner Scheme
My attempt to sort out what the heck is going on in this paper. Click to enlarge.I tried to write it all up in C++ first, but I got so mixed up and didn't know where the variables for each section were coming from. Maybe this will help me. Or...maybe someone who's really good at decoding math lingo can help me...? I'd much rather be working with more Bullet instead of this. You may be wondering, "what's this paper...what happened to Zinke?" Zinke's local component of the dual scattering calculation uses Marschner's BRDF, which is "explained" in this paper.
Goals Running in the Background:
Goals Running in the Background:
- Fix Bullet hair oscillations by projecting hair roots onto the head collider
- Try OpenMesh decimation (and scaling?) as a pre-step to convex hull decomposition
- Global multiple scattering (even though my love for opacity shadow maps has faded...)
Subscribe to:
Posts (Atom)


