The Technicals - Shape Keys etc

Wherein I Tell you of Image File Formats

1 When it comes time to render, if you’re like me, you want a file format that’s more or less just JPEG, but with better dynamic range. 8 bits per channel just isn’t quite enough.

You want something that works on Mac, Linux, Android, and iPhone. And has to work with GIMP and ImageMagick.

It looks like such a thing doesn’t exist, but the closest thing that does exist is JPEG2000. It works with everything except Android phones. Alas.

Since I need to store my “intermediate” renders in some format, I was hoping to use OpenEXR. It seems to compress better than JPEG2000 (debateable) and is quite a bit faster to generate files. The problem, though, is OpenEXR is a 16-bit linear representation of your scene, with no render transforms baked in, so when you pull it up in another program like GIMP, the exposure will be all wrong.

So in the end I settled on JPEG2000.

Then when I have a few hundred jp2 renders I want to see on an Android phone (or here, on this humble blog post), I use ImageMagick to convert all of them into regular JPEGs.

Meanwhile, if I see some problems in a particular render, I can pull it up in GIMP, tweak the colours and lights, and things will be much more smooth and buttery than a regular JPEG.

I finally settled on a 12-bit 75% compression setting for my renders. I cannot see any loss of detail or noise added at that setting, and files are about 6x-8x larger than a low-ish quality JPEG of the same dimension.

And Render Farms

1 I’m sure you’ve noticed that while you’re rendering an Eevee image, your computer is completely unusable, whether you’re on Linux or Mac (or Windows?).

Since I am now generating actual renders, and not screnshotting my 3D window, I was noticing this rather painfully.

I needed a solution. Here’s my technical workflow.

I have Syncthing set up on my Mac and Linux machines, pointed at a directory that includes all my .blend files.

I create an animation, put her in a pose I like, with the camera where I want it, and then set the pose and camera orientation as a keyframe (and the lights, or whatever else needed).

I do this for a bunch of various poses that I like. Then I save the file as, eg:

2020-01-05--3-ShruggingPoseAnim.blend

Then I wait for Syncthing to do its magic (not long). I go to my Linux laptop, which is way less powerful than my Mac workstation, but whatever. I open that file. I have the animation output directory as another directory that Syncthing will sync back to other devices.

I hit Render Animation and let it slowly chug through all the poses and lighting setups in the “animation” and then Syncthing dutifully copies the resultant JPEG2000’s back to the Mac workstation.

Then I take a look and make sure it looks right. It usually does. Once Linux crashed halfway through a walk cycle. No clue why. I even got a corrupted frame (only a few passes on the soft shadow iterations). Whatever.

Run a script to generate regular JPEGs into another directory that Syncthing syncs out to all my various Android phones.

Run another script to generate the web-suitable images like what’s in this blog post.

BOOM.

Low-tech render farm.

And the Tale of a Walk Cycle

1 I did a whole 20-frame “walk cycle” - it isn’t an actual animation, which I’m not going for anyway. I just want a bunch of various poses that happen to line up into walking.

The image here is not part of the walk cycle. Unsure really if I want to bother trying to represent it in this blog post. I put it into some M4V’s and uploaded them to BlenderArtists.

I wonder if this blog software can handle M4V’s…

Walking Verachantesse Vertex-Colour Workspace

I guess not. Well, trust me. It’s kinda cool, but not that cool.

1 1

Reminder, Rigify is pretty nice. The above face is 100% bone-driven Rigify. No shape keys at all. A tiny bit of weight painting on the eyelashes, but other than that, also no weight painting.

Actually… ah… lies? I think I did do some weight painting on the transition between her cheeks and upper lips. I think that was bad out-of-the-box. But it wasn’t much.

And I hate weight painting, so you should know you don’t need to do much.

On the other hand, elbows, knees, hips, shoulders? Yeah. Shape keys. And a lot of time invested into them. See previous blog post on that.

I am pondering trying to find someone who will modify the Rigify metarig to include shoulder, knee, and elbow armature generation. I feel like this is mostly solveable using some more sophisticated rig setups.

I want to do that because her shoulders are still insanely bad in some poses, like if she puts her hand on top of or behind her head (think: playing with hair).

Since this is a pose I’ll need to hit all the time… I need to solve it, and shape keys is a really annoying way to solve it, although it’s the only tool I have at the moment.

Anyone want some $$$ to fix up Rigify to include shoulder, knee, elbow bones that deform properly? Hit me up. Philo Vivero at Gmail.

A Tiny Diversion into Lens Settings

1 1 I played with some really large apertures, like f1.8 (or even larger) and bokeh distortion settings. It was a little bit fun.

Even though in real life, when doing portrait photography, I prefer wide open aperture and zoomed in for that nice soft-focus background, for some reason in 3D I don’t really care for the effect.

So other than a few renders here and there, the aperture is more like f2.8 or f3.4. I still leave the aperture a bit open, so there is a tiny bit of blurring in fore- and back-ground, but nothing as dramatic as eg the above render.

1 1 Do you see it? No? Good.

What next, then?

Hair? Animation? More clothing and props?

Unsure, honestly. I’ll let you know when I get there.

Every now and then a POV that gives that very blurry look far away. I am always focusing on her eyes, so she gets blurrier and blurrier toward her feet.

Hold the Applause ‘til the End

1 1 Okay. You can go wild now.

~~~

Shape Keys!

1 If you don’t know what they are, look into them. Shape keys driven by bone rotations.

I am somewhat sad. I had to UV unwrap her a few times after this render, and that skin spot pattern is no more. I was a fan of it.

Constellations of Verachantesse; evaporated into the pillars of birth.

What are you gonna do?

1 At the moment of this render, there are still no shape keys involved. It’s just armature-driven deformations.

Elbows…

1 1 Take a look at those elbows. They are looking a bit more natural. Knees, shoulders? Still kinda wack. I can work around it with some odd armature positions…


1 …but now… take a look at these two standing/walking renders. Amazing, yes?

And perfect elbows. No odd armature positions. No tricksy angles.

Just perfect little elbows.


1 But that’s not all.

Knees! Oh yes. Knees.

1 Oh, now that looks nice.

Shoulders still raised up, because that’s the only shoulder pose she knows how to make. We still love her.

Verachantesse Learns New Poses

1 1 Now she can relax her shoulders. And bend her elbows. And knees. And hips. And she looks pretty good doing it.


1 I’m not sure why I grabbed two renders that looked about the same. But now that I’ve got them, I can’t decide which to delete. So I guess you get both.


1 I’ll flip this one around so you feel like you’re getting some variety.


1 Here she looks particularly mischeivous.

She Found that Chair Again

1 When she found out what a ‘clavicle’ was, she got super-excited and now she flexes all her muscles just right to show off her clavicles.


1 1 This is the sort of thing she gets excited about.

Climbing Up on the Chair…

1 First, she put one leg up on it…


1 Then she started acting silly to distract our attention…


1 No, we do not yet notice that both legs are up on the chair…


1 Still acting silly…

This effect is achieved 100% with Rigify armature. There are no shape keys for her face.

Have I mentioned yet how amazing Rigify is?


1 Back to her normal self. Hey, Verachantesse, get off the chair. It’s not the most stable thing.

~~~

Where do I start? Skin Textures?

1 I’ve re-unwrapped her UVs about 8 times now. Every time to fix some area where I discovered contiguous faces with dramatically differing scales. It’s getting better.

Her skindots are all in new places again. But hopefully I’ve pinned enough vertexes that largely they will be constant from now on, and we can start to get to know her from her skindots.

But also, I added a little bumpiness here and there.

Not everywhere, because the more textures I add to her, the more realistic she gets, and the point is an obviously non-human character. So I add bumpiness more for aesthetics than for realism.

Or Corrective Shape Keys?

1 I managed to get the keys pretty good for her shoulders and legs on one axis.

There’s a lot you can do with that.

But now I’m trying to figure out how to add an axis in, and that’s got me flummoxed.

For example, on her legs, I had already modeled a corrective shape key on the leg going forward. So then I put her into a full splits to the side, but with her toes pointed directly forward, and modeled a corrective shape key there.

But then when I tried it, it looked terrible. Why?

If you take the upper leg (thigh?) bone, and rotate it on its Y axis, so her toes aren’t pointed forward anymore, but pointed up, then you start going from a shape key for a “leg to the side” instead applying a shape key for a “leg to the front” even though the leg is still to the side. Basically, you go from “X axis 90 degrees” to “Z axis 90 degrees” as you rotate on the Y axis.

Unsure if my explanation is good, but that’s the general idea. Doing shape keys for a joint on one axis is doable, but when I add a second axis, I can’t figure out how to apply two totally different drivers to a single shape key. Like for example, “Xrot+Yrot” becomes the driver value to drive one shape key, and “Zrot+Yrot” the driver for another shape key.

Eyelashes Problems?

1 Here’s something. Look at my attempt to make her wink. Yuck. Eye still partly open, and eyelashes turned into a mess.

On the right, it looks alright, but as every render for the past couple months, her eyelashes are clumpy, and not in the good way.

So that was another detour into the wilds. I tried to follow the Nazar Noschenko method for eyebrows, but for eyelashes. What does that look like?

1

  1. Model eyelashes as boring straight rectangular setup.
  2. Put them inside a mesh deform modifier, and parent, too.
  3. Add a surface deform modifier to that mesh deform cage to a flat geometry.
  4. Add a shrink-wrap modifier to the flat geometry to the mesh of the girl.
  5. After all that, it will look horrible.
  6. So then try binding the flat geometry to the armature. Yeah, no.
  7. So delete the flat geometry thinger entirely, and just bind the mesh deform cage straight to the armature and do some manual weight painting. Yeah, that looks alright, until she closes her eyes.
  8. So start adding corrective shape keys to the mesh deform cage. Except you only modeled it for one set of eyelashes, and you realise you’re going to have to do everything twice.
  9. Delete the whole thing and start over with two cubes in one object for the mesh deform cage, and two sets of eyelashes inside those cubes, so you don’t have to do everything twice.
  10. Trust me, you don’t want to have to do everything twice.

I learned something. Suppose you build up a mesh deform cage around your geometry, then you bind the modifier. Then the cage does nothing. You can move it all you want, and nothing happens. If so, unbind, click the mesh deform cage, apply all transformations, then re-bind again. That worked for me.

Eyelashes Fixed - Looks like What?

1 1 Left: eyes closed. Eyelashes don’t go through the skin in weird ways. Hooray.

Right: Eyes open, in natural position.

Wink

1 One eye open, and the other eye closed. The reason it gets its own render is that I had to scrunch up her face and her open eye isn’t fully open, etc.

You know, like real winks are.

And it’s cute, so we put it here.

Face Rigging Tweaks

1 A lot of her facial expressions were alright, but needed a bit of attention.

Now that her eyelashes are looking good, I went through a bunch of them and turned on secondary face controls and started tweaking them proper-like.

Now they stand up to closer scrutiny.

Here’s a re-worked face pose I call “angery” because that spelling makes me laugh.

What may be less obvious: I also tweaked her torso belly bone so that her stomach is a little flatter in this pose.

I’m working on things like breathing or other natural movements. In this case, she’s standing straight enough I figured she’d be using her core muscles.

Body Rigging Tweaks

1 But also, I occasionally decide her breasts are an odd shape, so I tweak her rig there, too. Each breast gets exactly one bone, and sometimes I think it might need another bone each, but it seems like the one bone is enough?

Here are another couple tests. One where I made her breasts as small as I could make them…

Honestly, they look fine. No terrible distortion, no weird shapes. Can’t complain. I modeled her with some fairly large breasts (probably C cups?), so this is a pretty dramatic armature deform.

I can’t find the renders now, but I did some others where she’s got significantly larger breasts than modeled. Probably D cups. They also looked fine.

Large breasts are too much work for now, given their proclivity to deform dramatically with motion and gravity. I’ll save that for a few years from now when I have more skill.

Animation

Let’s see if an MP4 can be put into the page.

Balancing Verachantesse Animation

Nope! Too bad. You gotta click it. It’s her balancing on one foot, getting off-balance, and recovering.

For me, right-clicking the weird box and doing “view image” played the animation.

Hopefully you can figure it out.

What Next?

1 1 1 1 1 1 I keep avoiding it… hair.

Her hair here is alright for a placeholder, but needs work. I want long hair. And braids. And flowing curls.

Everyone else wants that, too.

But I’m one dude, and I’m not a fulltime artist. So the going will be slow.

After hair, clothing? But only because I’m avoiding my other major problems: shoulders and hips. Also known as the two-axis corrective shape key problem.

Maybe a graphic novel format story or two? Or a couple animated shorts? Probably the latter, since I want to add music. Just because of technical limitations, my format will probably be an animated short that is in the style of a graphic novel (that is, stills with minor animations, like blinking, breathing, etc).

The renders in this section are just a random selection.

Don’t try to figure out a theme.

The standing renders; these were the “small breast” armature deform test, and the sitting renders are her default breast size, which are still smaller than I’ve modeled them.

~~~