Sidor

Saturday, October 31, 2020

Recent problems with posing and how to fix it

During the last few weeks there has been a problem with loading poses in the development version of the Daz Importer, cf this issue. Poses can be imported, but the bone rotations are slightly off.

There is nothing wrong with the posing code in itself. Rather, the problem arises when the figure is imported. To translate a pose from the duf/dsf file to the current rig, the add-on needs information about every bone's rotation order in Daz Studio. This information is stored as custom properties in the armature's pose bones. The problem was that the code that stored this information was disabled when the figure was imported with DBZ fitting. Hence for some bones, the rotation matrix was evaluated from the Euler angles in the wrong order. The rotation order was stored when the figure was imported with Mesh Fitting set to one of the Unmorphed options, so the problem only arose for DBZ-fitted figures.

This bug has been around since early October, which means that figures imported after that can not be posed correctly. This means that you must reimport the character before posing works correctly. 

If you have spent a lot of time on a character recently, you probably don't want to start all over. So I added a tool to fix old rigs: Advanced Setup > Rigging > Copy DAZ Properties. It copies properties set by this add-on (name starts with Daz) between objects, and between their bones and posebones if they are armatures. Properties that are already set in the target object are ignored, so nothing is overwritten.

Here is what to do:

  1. Import the character again.
  2. With the new rig active and the old rig selected, Copy DAZ Properties.
  3. Delete the new character.

Now you should be able to pose your character correctly. Here is a test with Base Kneeling Pose B, before and after the fix:


 

 

Monday, October 5, 2020

Strand-based Hair and Geografts

Blender's particle system is quite brittle. Once particle hair has been created, we must not change the vertex numbers of the emitter mesh, e.g. by adding or deleting vertices. Or by merging geografts with the body.

Here we have loaded Genesis 8 Female with the standard Mohawk hair and genitals. Everything looks fine until we merge the genitals to the body with Merge Geografts.

Disaster! The hair has left the skull and is all over the place.

In the development version there is now a fix for this problem. In the global settings dialog, enable Postpone Hair Creation, which prevents hair from being generated when the scene is imported.

Import the character again. This time she is bald, but information about the hair is secretly stored inside the mesh. We can now merge the body and the genitals as usual.

Finally, when all changes have been made that can change vertex number, we press Restore Strand Hair. This button is located in the Finishing section, and after Merge Geografts, since it must be done afterwards. The hair information stored inside the mesh is now converted into real hair.

The Restore Strand Hair tool is only enabled if the active mesh contains unused hair information. Once the hair has been built, that information is cleared and the tool is disabled.

Friday, October 2, 2020

Hair and Children

 A while ago I announced support for strand-based hair. Over the past month there has been some important improvements. In particular, the hairs now stick to the body mesh without the introduction of a density vertex group, at least in most cases. The topic of this blog post is how the type of children affects the hair.


There are three types of children: None, which means just the hair guides themselves, simple and interpolated. The importer always creates simple children, because interpolated children during load time seem to lead to undesired results, but sometimes it can be a good idea to change the type after the mesh has been loaded into Blender.

Here is a long hairstyle. Simple children makes the hair look like a wig from the 1600s, interpolated children look much nicer.

Here is a big cat. With simple children some of the fur don't stick to the skin when posing. With interpolated children the ghost fur is gone, and the fur looks much smoother in general.

The first two examples may suggest that interpolated children are always better, but his is not the case. Here is the standard mohawk hair. Looks good with simple children, but the interpolated children are just weird.