Puff's Blender adventures
Posted: 04 Mar 2016, 15:14
by Puff
I'm watching Blender how it's rendering this image (at the time of writing this text, of course), and I thought - wow, there's a lot that went into that. So why shouldn't I share ideas with the world?
Here, I'll occasionally post a little article about all the wiles and vexations of my Blender adventures. Hopefully at least someone will find these interesting!
Also, if you have any questions regarding anything that is written below, feel free to ask.
Here, I'll occasionally post a little article about all the wiles and vexations of my Blender adventures. Hopefully at least someone will find these interesting!
Also, if you have any questions regarding anything that is written below, feel free to ask.
Spoiler: click to toggle
It was somewhere in the middle of January this year when I connected to the Grapevine's chat, looking for a distraction from all the exam fails and stuff. Anyway that part is not important. Important is that IcelandicEel stuffed me with the models that now appear in my images (thanks, buddy!), so I could do something nice with them.
Okay, that shouldn't be a problem; I thought. I converted the models from a weird format to a less weird format of OBJ, imported to Blender - and what can I see? UV maps all messed up! Fortunately all I had to do was to flip those maps, and all was fine again.
The second thing I did was that I removed all double vertices, converted all triangular faced to quads, and generally cleaned up the model(s). This part is important for working in Blender.
Now, I noticed their rigs apparently didn't survive the conversion process. Though it was just a few days before that I read about this cool addon for Blender called "BlenRig 5". It's a high quality universal rig you can apply to any bipedal characted you can imagine! It has nearly 2 300 bones. Yes, you read that right. Two thousand and three hundred! Combined with loads of bone constraints, drivers and scripts, the result is a feature-film quality rig... provided you have feature-film quality models... and the ones IcelandicEel gave me are certainly not.
Here you can see only the main bones of the armature. This is what the reposition mode looks like.
BlenRig 5 is an amazing addon for all riggers and animators out there. At start, you get an armature, a lowpoly mesh deform cage, and a bunch of lattices you can (but don't have to) use. The armature has two parts: the body rig and the facial rig. The body rig manipulates the lowpoly mesh deform cage, which is used to deform the character you're rigging, through an object modifier called "Mesh Deform". I'll talk about the facial rig a bit later.
Rigging with BlenRig 5 is quite easy, though a bit tedious process. Unfortunately, the plugin's documentation is available only for Blender Cloud subscribers. I'm not one of those, therefore I had to learn with the traditional trial-and-error process. After a few hours of staring at all the mess on my screen I somehow figured out that I first have to rescale the protorig with this special "Reposition mode", then "bake" both mesh deform cage and then the armature. Then what I had to do was to encapsulate my character into the mesh deform cage, and bind it with the Mesh Deform modifier. This gave a stunningly amazing result... and I wonder why this technique isn't used regularly.
Now that the body is moving in a fairly realistic way, it was time to do the facial rig. Again: reposition mode, make sure the bones are placed symmetrically, and bake, but only the armature this time. Once all facial bones were properly placed, it was time to parent the head to the armature with Blender's Automatic Weighting.
It failed.
It took me two days to discover where the problem was. I rescaled Hiccup's model, thus the object's scale property read something like "0.200" on all axes, instead of "1.000". I'm not sure why this is a problem, but once I applied the new scale to the model, and had Blender to recalculate all vertex, edge and face normals, the Automatic Weighting suddenly started to do wonders. I got a working facial rig! Apart from the eyebrows... I had to fix those by manually painting bone weights. Not a big deal really.
But yet, I wasn't able to get a nice smile on Hiccup's face. His mouth always deformed in a particularly funny way when I exaggerated it. But there's this fairly unknown object modifier called "Corrective Smooth" I read about while trying to figure out what was wrong with the Automatic Weighting. So I applied this modifier to Hiccup's face. I remember my jaw dropping the moment I saw the difference. It litterally improved Hiccspressions with a multiplier of at least 3.
Without Corrective Smooth
With Corrective Smooth
This modifier smooths the model while trying to retain the original shape of the model. So even if the Automatic Weighting process messes things up, Corrective Smooth fixes them up. Automatically!
As you can now probably imagine, Corrective Smooth can be your best friend, but it also can be your worst enemy. And that's when you want to complement your rig with corrective shape keys, for effects like wrinkles, dimples etc. Corrective Smooth effectively eradicates any and all changes made by these shape keys. All is not lost though, Corrective Smooth can be limited to any vertex group of your choice. In other words, you can apply it to only a portion of your model, a portion you can define howsoever you want.
Now that the rigging was done, I started adding hair to the characters. That's a simple process in general, it's just long and boring. Blender has all the tools needed to create most hairstyles you can think of. But when things come to attaching objects to hair particles... I'm not sure if that's even possible with Blender yet.
At this point, the characters were mostly done, and I started creating the actual fanarts you can see in my other thread.
Okay, 50 minutes later, and Blender's almost done rendering the single image. Time to find out I have to do a re-render. I bet four sheep it will happen!
Okay, that shouldn't be a problem; I thought. I converted the models from a weird format to a less weird format of OBJ, imported to Blender - and what can I see? UV maps all messed up! Fortunately all I had to do was to flip those maps, and all was fine again.
The second thing I did was that I removed all double vertices, converted all triangular faced to quads, and generally cleaned up the model(s). This part is important for working in Blender.
Now, I noticed their rigs apparently didn't survive the conversion process. Though it was just a few days before that I read about this cool addon for Blender called "BlenRig 5". It's a high quality universal rig you can apply to any bipedal characted you can imagine! It has nearly 2 300 bones. Yes, you read that right. Two thousand and three hundred! Combined with loads of bone constraints, drivers and scripts, the result is a feature-film quality rig... provided you have feature-film quality models... and the ones IcelandicEel gave me are certainly not.
Here you can see only the main bones of the armature. This is what the reposition mode looks like.
BlenRig 5 is an amazing addon for all riggers and animators out there. At start, you get an armature, a lowpoly mesh deform cage, and a bunch of lattices you can (but don't have to) use. The armature has two parts: the body rig and the facial rig. The body rig manipulates the lowpoly mesh deform cage, which is used to deform the character you're rigging, through an object modifier called "Mesh Deform". I'll talk about the facial rig a bit later.
Rigging with BlenRig 5 is quite easy, though a bit tedious process. Unfortunately, the plugin's documentation is available only for Blender Cloud subscribers. I'm not one of those, therefore I had to learn with the traditional trial-and-error process. After a few hours of staring at all the mess on my screen I somehow figured out that I first have to rescale the protorig with this special "Reposition mode", then "bake" both mesh deform cage and then the armature. Then what I had to do was to encapsulate my character into the mesh deform cage, and bind it with the Mesh Deform modifier. This gave a stunningly amazing result... and I wonder why this technique isn't used regularly.
Now that the body is moving in a fairly realistic way, it was time to do the facial rig. Again: reposition mode, make sure the bones are placed symmetrically, and bake, but only the armature this time. Once all facial bones were properly placed, it was time to parent the head to the armature with Blender's Automatic Weighting.
It failed.
It took me two days to discover where the problem was. I rescaled Hiccup's model, thus the object's scale property read something like "0.200" on all axes, instead of "1.000". I'm not sure why this is a problem, but once I applied the new scale to the model, and had Blender to recalculate all vertex, edge and face normals, the Automatic Weighting suddenly started to do wonders. I got a working facial rig! Apart from the eyebrows... I had to fix those by manually painting bone weights. Not a big deal really.
But yet, I wasn't able to get a nice smile on Hiccup's face. His mouth always deformed in a particularly funny way when I exaggerated it. But there's this fairly unknown object modifier called "Corrective Smooth" I read about while trying to figure out what was wrong with the Automatic Weighting. So I applied this modifier to Hiccup's face. I remember my jaw dropping the moment I saw the difference. It litterally improved Hiccspressions with a multiplier of at least 3.
Without Corrective Smooth
With Corrective Smooth
This modifier smooths the model while trying to retain the original shape of the model. So even if the Automatic Weighting process messes things up, Corrective Smooth fixes them up. Automatically!
As you can now probably imagine, Corrective Smooth can be your best friend, but it also can be your worst enemy. And that's when you want to complement your rig with corrective shape keys, for effects like wrinkles, dimples etc. Corrective Smooth effectively eradicates any and all changes made by these shape keys. All is not lost though, Corrective Smooth can be limited to any vertex group of your choice. In other words, you can apply it to only a portion of your model, a portion you can define howsoever you want.
Now that the rigging was done, I started adding hair to the characters. That's a simple process in general, it's just long and boring. Blender has all the tools needed to create most hairstyles you can think of. But when things come to attaching objects to hair particles... I'm not sure if that's even possible with Blender yet.
At this point, the characters were mostly done, and I started creating the actual fanarts you can see in my other thread.
Okay, 50 minutes later, and Blender's almost done rendering the single image. Time to find out I have to do a re-render. I bet four sheep it will happen!