importing the daz smoothing modifier

Issue #226 resolved
Alessandro Padovani created an issue

tested with daz studio 4.11, blender 2.90.1, diffeo add90c9

There are some cases where daz figures use the smoothing modifier to fit outfits. This happens mostly when using morphs not supported by the outfit. Or when fitting outfits from other figures. Below an example where I fitted the G1F magus outfit to a G8F figure with some breast shape. As we can see the autofit templates don't do a great job and we get poke through in some areas. Test scene included.

Now we apply the daz smoothing modifier to the jacket and shorts so it gets better.

Now if we import the figure in blender we get the figure without the smoothing modifier. Because the G1F outfit is at base resolution so it is imported as base mesh. Please note that we can bake the daz deformations if we use the HD exporter. But this will only work for HD and subdivided meshes, while base meshes will be imported as is to preserve the original daz base mesh.

Then what if we want the smoothing modifier in blender ? Luckily there's something in blender that's quite similar the daz smoothing modifier. It's the shrinkwrap modifier. Below the magus example where I applied the shrinkwrap modifier. Please note that the collar is not affected and the outfit preserves its shape. This is obtained by using "target normal project" together with the "outside" snap mode and an offset that I set to 0.5 centimeters that seems to work fine for most outfits.

Here is another example where I peek "above surface" instead of "outside". This is not to be done. I did a number of tests and the parameters I found seem the best to fit outfits to figures. Also please note that shrinkwrap is to be applied after the armature so it will take into account the pose deformations.

As a side benefit if we use shrinkwrap we may not need to transfer jcms to the outfits in most cases. So this may be useful also with an outfit that fits perfectly, just to avoid transfering the jcms.

Please note that there are limits in what the shrinkwrap can do. Especially for the parts of the outfit that are not close to the figure, such as the jacket collar in our example. If we move the figure head the collar will somewhat break.

But not surprisingly this is the same in daz studio and it is due mainly to the bad autofit weightmap rather than the shrinkwrap itself. In this case we need to adjust the weightmap by hand.

I believe shrinkwrap is great and it would be nice to have this to import daz figures with the smoothing modifier or to add it to an outfit to avoid transfering jcms. Though may be it is better to leave this as a experimental option not checked by default.

Comments (7)

  1. engetudouiti

    I may need to test, but that is because when you export, to keep smoothing modifier you need to use interective up-date “ON”.

    When you work in daz, you may keep it “OFF”, but if you keep the modifier effect for exported mesh, you need to set it as “ON”. so you should see the modifier applied mesh.

    The same logic need when you export as OBJ or Collada etc. so I almost confirm when interecitve up-date ON, then export with duf and json, plug in can get the modifier moved verts postion.

  2. Alessandro Padovani reporter

    Thank you @engetudouiti for this great tip. I can confirm that interactive update exports the smoothing deformation for base meshes. I believe this note should be added to the user docs.

    Using shrinkwrap is another thing though, since it also adapts the outfit to the figure jcms deformations, that importing a static shape doesn’t. Also shrinkwrap seems to work better than the daz smoothing modifier. For example in the magus shorts the daz smoothing loses the side lace, even at high iterations, while shrinkwrap doesn’t.

    So when using shrinkwrap it is better to keep interactive update off so to don’t export the smoothing shape and let shrinkwrap do its better job.

  3. Thomas Larsson repo owner

    I don’t know. It doesn’t seem very hard to add the shrinkwrap modifier by hand for the clothes that cause problems, so I don’t know if you need to add such modifiers on import. Especially since I can easily imagine situations where you want to add modifiers to some clothes and not to others. Perhaps a separate tool that adds them later to selected meshes.

    Personally I prefer to use the Advanced Setup > Visibility > Create Masks tool and add vertices that may poke through to the mask vertex groups. This is useful to hide skin under clothes even if you don’t add visibility drivers for file linking. Although you need to be careful not to select too many vertices, since all neighboring faces are hidden.

  4. engetudouiti

    I may not need add on auto apply modifer without it work as same as daz studio.

    About smooth modifier and shwrink wrap is not do same thing as true meaning. They do not offer same parameter how work for related meshes.. So to use modifier which offered by different app, you need to use different parameters for the case in each aprications.

    Actually I had used many modifier for my purpose, but do not think add on need to add them as auto. Though if there is user who do not know about bender modifier, (I think blender user should learn shwrink wrap modifier, even though they do not use it.)

    I may recommend try to use one of them for each case. but not hope it is offered by add on. without it reduce many work -flow, about this case, it not.

    About mask same verts are arelady hidden in blender, so I hope to see it is hidden with vertex group.

    And even though you use shwrink wrap modifier, there is no need you set OFF for “smooth modifier auto- up-date” when export. if user use smooth modifer in daz studio, Always I recommend “ auto up-date ON” then export.

    Because, with set it as on, you can see same vertex postion in blender ,with exported pose. if you still see poke through with posing, you can add any modifier on current status. then it work better.

  5. Alessandro Padovani reporter

    @Thomas @engetudouiti

    Yes that’s why I was proposing to add them as an experimental option. Not applied by default. Also I agree for a separate tool to apply shrinkwrap later.

    The reason why I played with shrinkwrap is because there’s a number of people that may not know how to use it, since shrinkwrap gets many different parameters. Also a number of outfits in daz studio use the smoothing modifier by default, so in this case it may make sense to use shrinkwrap. Importing the static shape by interactive update is not the same since this way it doesn’t follow jcms.

    Then I also agree that hiding unwanted polygons is probably the best choice. But this is not always possible for example for transparent outfits or a small outfit such as a bikini. So shrinkwrap could be a nice option to have. Or a note on the user manual teaching how to use it for daz outfits may also be enough.

  6. Thomas Larsson repo owner

    There is now an Add Shrinkwrap button in the Visibility section. Note that you need to select the character, i.e. the shrinkwrap target. The clothes are selected in the popup dialog.

  7. Log in to comment