Wednesday, October 29, 2008

Muscle Shifting [muscleShiftV1.1.py]

I took my AABB-based muscle intersection finding script and tried to merge it with my muscle shifting script. They weren't integrating smoothly so I decided to rewrite the muscle moving script, setup specifically for the AABB script. I also changed some of the functionality of the script, having it work by the closest 2 control circles instead of just 1. This way the muscles shift better, even if the position matching muscle's control circles are between 2 of the shifting muscle controls. It weights the influence of the 2 control curves based on the percentage between each shifting muscle control curve the matching control curve is found. The matching is still far from perfect. I think it might help if I move the circles by the sum of the radii of the 2 circles (or the sum of the radius of the matching circle and the average of the 2 other circles) and multiply that by the normalized vector that it was currently moving, so the muscles only shift as much as they have to. Anyhow, here's some screenshots of how its currently working:




No comments: