Overgrowth is an awesome indie game! We're four guys working more than full time on this until it's done. We hope you will follow our development on ModDB and on our blog! We update our blog every day: click here to subscribe.

Image RSS Feed Latest Screens
Translucent Plant Shader Initial Screenshots Initial Screenshots
Blog RSS Feed Report abuse Latest News: Volumetric heat diffusion skinning

15 comments by jeffr on Nov 25th, 2009 digg this super bookmark


After seeing our rigging tutorial, a number of you asked me how we calculate our vertex weights. However, many of you reading the blog are probably asking yourselves a more basic question:

What are vertex weights?

When we first load the rabbit, it's a static model: just a collection of triangles with an image wrapped around it. Next, we create the skeleton, which is a set of line segments (bones). Finally, we get to the tricky part. How do we attach the model to the skeleton so that they both move in the same way?
For every vertex (triangle point) in the model, we have to figure out which bones it should be attached to, and how strong each attachment should be. This information is stored in the vertex weighting. Below you can see the static model, the model with a skeleton, and the area of influence for each bone.


Using the vertex weights, we can match the model's pose to the skeleton's. Whenever a bone moves, we can apply the bone's movement to all vertices that are attached to it, modulated by the attachment strength. The attachment strength is important for smooth deformation at joints, where vertices are attached to multiple bones. Here is an example of pose matching using vertex weights:


Usually these weights are painstakingly applied by hand, using a virtual 'paintbrush' or some kind of 'envelope' system. However, this is a long, tedious process, and I didn't want to force Aubrey (and modders) to go through it if it could be automated.

How do we calculate them automatically?

The most obvious way to calculate vertex weights is to attach each vertex to the closest bones, weighted by distance. At first glance the results look ok, but if you move the bones around, you start to see problems. For example, the bones in one foot can affect vertices in the other because they're in close proximity, even though they're not connected.


Clearly we're can't just use simple Cartesian distance -- we need the distance of the shortest path within the volume of the model. For example, the distance from the right foot to the left foot should be about equal to the distance from the right foot to the right shoulder, because the path must go up one leg and down the other. When working with volumetric calculations, it's often helpful to voxellize the model. Voxellization turns the model into a 3D cube structure that approximates the model's shape.


I found that the easiest way to think about this was in terms of heat. We can treat each bone as a heating filament, and then diffuse the heat through the voxel model. Diffusion is pretty easy using a voxel model -- we can just set each voxel's heat to a weighted average of its neighbors' heat, and repeat as necessary until it diffuses completely.
The final heat distribution is proportional to the shortest path from the bone to any point in the model, so we can get the final vertex weights by just comparing the heat from each bone at each vertex. Here is a picture of the foot bone's 'filament', the foot's heat distribution, and its final vertex weights:


I found this algorithm to be intuitive and easy to use, and it eliminates the most tedious part of character modeling. I am very happy with this technique! Confusingly, there's an existing skinning algorithm called 'bone heat', but it has a very confusing implementation, and incorrectly uses surface diffusion instead of volumetric. If I had to name my techique I would call it "volumetric heat diffusion". Here is the rabbit posed in various ways using automatic vertex weights:


There are a couple of ways I can think of to improve this technique, but haven't implemented them yet because they're not urgent. First, the heat diffusion is a massively parallel task, so it could be sped up by orders of magnitude using the GPU. Second, it would be useful to have some interface to make the joint blending harder or softer in specific areas by using different power functions on the heat values.
Do you have any more questions about the vertex weights, or ideas to improve it?


Track us on ModDB (visit our page)

Please join us here too:
Facebook icon ModDB icon Steam icon Twitter icon YouTube icon

Media RSS Feed Latest Video
Downloads RSS Feed Latest Downloads
Overgrowth Spray For Source Games

Overgrowth Spray For Source Games

Jul 29, 2009 Sprays 7 comments

If you feel like promoting your favourite indie game while playing your favourite Source game. To use it: unzip the file, start your Source game, press...

Overgrowth Main Theme

Overgrowth Main Theme

Jan 14, 2009 Full Version 1 comment

Music for the upcoming sequel to Lugaru: The Rabbit's Foot.

Comments  (20 - 30 of 290)
Dalton0419
Dalton0419 Oct 26 2009, 6:27pm says:

Really looking forward to the map editor. (Im a mapper :P) Are there any cool features of the map editor that haven't been shown yet? (A terrain editor would be neat) Also will there any other editors that will be included? Lastly, will there be epic cutscenes? Whats an epic game without epic cutscenes, am I right? Cant wait to play this game, keep up the great work!

+1 vote     reply to comment
Scripts18
Scripts18 Oct 26 2009, 5:14pm says:

Will it cost money to play this game???

+1 vote     reply to comment
jeffr
jeffr Oct 26 2009, 5:29pm replied:

Yeah, you can preorder it for $29.95 and access our weekly alphas.

+1 vote     reply to comment
Ekonk
Ekonk Oct 24 2009, 1:50pm says:

I got a feeling (that tonight's gonna be a good night) that this game is going to be truckloads of fun.

+2 votes     reply to comment
notdeadno
notdeadno Oct 24 2009, 5:33pm replied:

lol.
This game just seems to get better & better with the days. I might just Pre-order it when i get the cash, but im dead broke as of now :( love the new tech vid, would like to get my hands on that.

+1 vote     reply to comment
Darthlex
Darthlex Oct 24 2009, 4:23am says:

OH .. MY .. GOD! I just laughed so hard at those news .. Be scared, be very scared, because I will animate the whaleman! And the Fishman! And the trees .. Gotta .. Animate!

Goddamn amazing job on these news guys, you make them priceless!

+2 votes     reply to comment
alioli
alioli Oct 21 2009, 1:33am says:

Tracking this one

By the way: thanks for sharing the trick with the normals ;)

GL

+2 votes     reply to comment
iron_war_lord
iron_war_lord Oct 12 2009, 6:43am says:

I loved lugaru, it was so addictive, I think this game is going to get a lot of attention...Love it

+2 votes     reply to comment
IceIYIaN
IceIYIaN Oct 16 2009, 10:23pm replied:

And are you using config.cfg? What does it look like? Do you use the same command names as Quake/Half-Life?

-1 votes     reply to comment
jeffr
jeffr Oct 21 2009, 12:10am replied:

No, our scripts are based on JavaScript

+1 vote     reply to comment
Post a Comment

Only registered members can share their thoughts. So come on! Join the community today (totally free) and do things you never thought possible.

Icon
Overgrowth
Platforms
PC, Linux, Mac
Developer & Publisher
Wolfire Games
Engine
Custom Built
Contact
Send Message
Official Page
Wolfire.com
Release Date
TBD
Game Watch
Track this game
Bookmark
Digg Super bookmark
Style
Genre
Adventure
Theme
Fighter
Players
Single & Multiplayer
Project
Indie
Boxshot
Boxshot
Statistics
Rank
48 of 1,310
Last Update
4 days ago
Watchers
942 members
Addons
1
Files
1
News
89
Features
8