- attached g81m-hair.duf
dforce hair doesn't work fine
daz studio 4.15.0.30, blender 3.1.0, diffeomorphic 1.6.1.0920
This is pointed out by Surody at the daz forum. It seems that dforce hair is not handled correctly.
We take as example the G81M body hair SKU 80355. In daz studio we see the dforce hair in the viewport, but that's just the basic strands that's a sort of dforce "parent" strands. We need to activate the preview and tessellation features to get the full dforce hair in the viewport, that's a sort of dforce "children" strands, so we can export it to blender.
I'm not sure if tessellation is needed in this case. It seems not but I turn it on just to be sure I get some geometry in the viewport to export to blender.
Now we export the dbz that should include the tessellated hair. But when we import that in blender we only get the basic strands, not the full dforce hair that we tessellated in the daz studio viewport.
Comments (24)
-
reporter -
reporter - edited description
-
repo owner The dbz file only contains the coordinates of the basic strands, so the importer cannot build anything else. The HD export script should arguably export the tesselated hair, since it can be viewed as the HD mesh corresponding to the hair. However, the lod value of the hair mesh is zero, so no HD hair mesh is exported. Perhaps the cached hair geometry contains the coordinates of the tesselated hair anyway. Will check tonight.
-
reporter Thank you Thomas for looking at this. Exporting to HD doesn’t seem to work either ..
-
reporter Here is a scene with combed sbh hair that exports fine to blender if it can be useful for any comparison. As I understand it dforce hair should be the same as sbh but with dforce applied. Apart that dforce uses polylines but that’s a matter of tessellation I guess.
-
reporter - attached shb.duf
test scene for combed sbh hair
-
reporter Thomas, if you enter the hair editor in the sbh scene (edit > object > strand based hair) you can clearly see the difference between the hair curves and the hair strands. The curves are blue and are a sort of magnets used to comb the strands. Please note that the curves do not generate the strands, that is, they are independent.
It looks like for some reason the plugin reads the curves for dforce hair and the strands for sbh hair.
-
repo owner Now I managed to import the hair correctly.
- Export from DS with the updated HD exporter in the last commit.
- Make sure that the global setting Add Armature To HD Meshes is enabled.
- Import the scene.
- Advanced Setup > Mesh > Transfer Vertex Groups from the body to the hair meshes.
-
reporter Thomas you got it commit f6b0750 works great here. Just a few notes please let us know what you think.
- The imported hair material makes no sense, both for the base and HD hair. It seems copied from the body in some way. If we don't know what material to assign then it would be better to use a default hair material instead. For example a black hair.
- If we use tessellation = 1 for polylines then nothing is exported for the dforce HD hair. This also happens for SBH hair. Don't know if this is a bug or a limitation for some reason.
- If we use tessellation = 2 then we also need to export the HD uvs to use the "sheet" hair type in blender. Nevertheless using the "tube" type works fine and is much faster, I mean a lot, and also doesn't require the HD uvs to be exported. So this could be the recommended workflow to export dforce strands.
- Of course if we use make hair it is not necessary to transfer vertex groups.
As a minor note it would help to add better tooltips to the make hair tool for the hair types. Since daz users are more familiar with the daz terminology. What's imported as base hair it's the dforce guides. What's imported as HD hair it's the dforce strands.
- sheet tooltip: "Convert transmapped hair."
- line tooltip: "Convert dForce guides."
- tube tooltip: "Convert dForce and SBH strands."
note. As a side note the “line” type to convert dforce guides makes little sense. Unless we want to use them as parent particles and then add children particles but this way the hair will not be the same as daz. This note could be added to the docs. Unless tesselation = 1 could be exported as in point 2 above.
note. It is a little confusing that SBH strands are exported as base resolution while dforce strands are exported as HD. But this is minor if it can’t be avoided for technical reasons.
-
repo owner The HD exporter exports two types of geometry: the base shape with all morphs applied, and the cached geometry which DS uses to display the mesh in the viewport. Dforce strands are exported as HD because the tesselation affects the cached geometry and not the base shape.
If tesselation = 1, the strands are polylines, but if tesselation >= 2 they are meshes with faces. Support for polylines is now implemented, both on the export and import side, and the hair with tesselation = 1 is now imported, as a mesh with edges only. The material should be right, too.
-
reporter Commit 18d13cd is excellent thank you Thomas for the nice improvement. I mean exporting polylines is much faster and memory safe overall.
There’s a caveat that tessellation = 1 doesn’t seem to work for SBH hair sbh.duf. Tried both base and HD export. Is it possible to get polylines for SBH too ?
-
repo owner SBH with tesselation = 1 should work now, both with base and HD export.
-
reporter Commit 5dc2715 works fine I believe that’s a big step forward for daz hair thank you Thomas for this.
There are no bugs but I noticed something that I don’t know if can be useful. For tessellation = 1, if we look at the g8m scene in edit mode we can see that for the base and HD export both the dforce guides and the dforce strands are there. The difference is, the base export connects the dforce guides while the strands are unconnected points. The HD export connects the dforce strands while the guides are unconnected points. Please note that unconnected points are then eliminated by the make hair tool so they don’t cause any issue.
Please Thomas let me know if this information can be useful for some improvement. For example to get the dforce strands in the base export. Otherwise I’ll mark as resolved since there are no bugs and everything works fine.
-
repo owner The stray vertices of the HD mesh are the original hair guides. They are eliminated in the last commit. Nothing has been done about the base case.
-
reporter Then for coherence we could eliminate the stray vertices for the base case too. There’s no reason to keep them though they do no harm. To eliminate the stray vertices we can use “select > by trait > loose geometry” in vertex select.
Please let me know so I’ll mark as resolved anyway.
-
FYI, hair is getting completely overhauled as geonode-based curve objects for 3.2.
2022.03.10 - Hair Project Planning - Geometry Nodes - Blender Developer Talk
-
repo owner The remaining stray vertices are gone now.
-
reporter - changed status to resolved
Commit 87fba2f works fine, thank you Thomas for this nice update to the hair features.
And thank you Midnight for the news.
-
repo owner - changed status to open
-
repo owner Now the ordinary export script also exports the strands, so you don’t need to do HD export. The HD script exports both the guides and the strands as before.
-
repo owner On second thought, I made it optional to import the strands. How the hair is imported is controlled by the global option Hair Strands.
-
reporter Commit d36a3cd works fine. I have a suggestion let me know or I'll mark as resolved anyway since everything works fine.
Actually SBH only imports the strands because the guides are not available in the buffers (but they do exist in the SBH editor so should be stored somewhere). While dforce can import both the guides that are in the base buffer, and the strands that are in the HD buffer. Please note that in daz studio the guides are intended for combing the strands, or possibly for dforce simulation. None of this is supported in blender but the user could find some use for the guides anyway.
- So the global "Meshes" setting could be "dForce Hair Guides" to be more precise, with default off. That is, the strands are always imported, if "dForce Hair Guides" is checked then the guides are imported too with the strands. This could affect both the base and HD import.
- The hair names could be the same in the base and HD import, to avoid confusion. That is, "<hair name>" for the SBH and dforce strands and "<hair name>_GUIDES" for the dforce guides. So the "_HD" suffix is not used in this case and the hair names are independent of the base and HD buffers, as the import is.
-
repo owner Very good suggestions. Now implemented.
-
reporter - changed status to resolved
Commit dbc2f14 works great marking as resolved.
- Log in to comment
sample scene for dforce hair