Profile Picture

DAZ Hair to CC via Blender - a Workflow

Posted By 4u2ges 7 Years Ago
Rated 5 stars based on 1 vote.
Author
Message
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
I was working on a DAZ hair past weekend and figured I'd share my workflow routine. It might be the same, or different from yours. But I hope you find it useful.
You would most likely have a different hair to convert, which in turn might require slightly different approach at certain workflow steps.
So please share your experience in case you have some additional tips, or if you find a way to facilitate a certain routine in a workflow.

Sorry folks - no video - just a plain text and screenshots (I hate my voice and accent Smile )

Prerequisites


1. You need to have a DAZ studio software with Decimator. Decimator is a little bit on the expensive side, but it is a great tool for reducing poly count.
You can do decimation in Blender (or other mesh editing software). But it is rather time consuming (specifically for the hair) and it is not covered in this workflow.

2. You have to be proficient with importing/exporting models in and out of CC 2.0. Export in advance a base female avatar from CC for the workflow steps in Blender.

3. Some knowledge / experience working with Blender would require (at least be familiar with mesh editing via basic transform tools).

Workflow


1. Bring a DAZ hair to the stage (there is no need to have an avatar on a stage in DAZ for that) and convert it to a Prop.

https://forum.reallusion.com/uploads/images/9d5ac38c-0bad-48d1-9724-5dc9.jpg

2. Decimate it. Click Prepare to Decimate, then use slider to set a poly count (or percentage), and click Done.
I have selected 25000 for Cordia Hair (you may go lower if you wish). But do not go too low. The hair would look bulky and ugly.

https://forum.reallusion.com/uploads/images/882d250c-9e7d-4706-ab9e-b401.jpg

3. Export hair to FBX. From File menu select Export, choose .fbx and specify a name and location to save it to.

https://forum.reallusion.com/uploads/images/f87ad8e9-cc0b-4aed-b80b-8869.jpg

4. Open Blender fresh. Import a base CC 2.0 model and then hair you just exported from DAZ. Hair should match the model by X.
But it most likely be off by Y and Z. In my case Z was almost perfect but Y was way off.

https://forum.reallusion.com/uploads/images/5398c417-9416-410d-b0ae-8442.jpg

5. Get rid of a Hair Root (Empty) object. Before you do that, you need to reset Rotation and Scale in the correct order.
First select a Root object, hit Ctrl+A and choose Rotation and Scale. This would zero out rotation and scale data, but transfer initial values to the child node - which is a hair mesh.
Next select a hair mesh object and do the same - Ctrl+A and choose Rotation and Scale.

https://forum.reallusion.com/uploads/images/c560a18a-b011-443c-8765-4cf5.jpg

6. Now lets detach a hair from the parent.
Select a hair mesh object, make sure rotation and location values are 0 and scale is 1, and then detach from parent by clicking an X in the parent bound window.

https://forum.reallusion.com/uploads/images/5aed3c6c-e98a-4cfa-ae22-13b1.jpg

7. Finally delete orphan Empty object

https://forum.reallusion.com/uploads/images/20bb16a1-ffe3-4b34-8617-25a1.jpg

8. Now lets work with materials and textures. You might have more, or less count of materials assigned to different hair strands.
The goal is to reduce number of materials to possible minimum (unless you have an idea to shade different parts of the hair differently).
It is done by consolidating materials of the same type (those have the same texture maps). You need to visually analyze and compare materials and texture map assigned to them.
In my case I figured I can reduce number of materials from 8 to 3. By visual comparison, I noticed that materials, those names start with A and B respectively have the same texture maps assigned.
Plus a unique material for the Base/Scalp mesh.
It is also possible to have just one material, but in that case a UV map would need to be recreated, which might be time consuming.

https://forum.reallusion.com/uploads/images/1ee042ee-5e40-4471-a9ce-83b5.jpg

9. Before reducing number of materials, I prefer to save a current material-vertex reference as vertex groups.
This might be helpful in the future, when you need to identify a certain group of strands on a UV map.
So switch to Edit Mode. Make sure nothing is selected (hit A couple of times). Click on first material in the list, then click Select button.
All mesh strands associated with this material would be selected. Bring cursor to the stage, hit Ctrl+G and choose Assign to New Group.

Note: Save Blender project often. As any other software Blender crashes once in a while (though it has an excellent built-in last session and auto-save recovery tools)

https://forum.reallusion.com/uploads/images/02958ed9-8f60-4c32-afda-0658.jpg






Edited
7 Years Ago by 4u2ges
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
10. Now go to Data tab - the one that has an icon like a tris. You would see a newly created vertex group named... well... a "Group". Rename it to the originated material name.

https://forum.reallusion.com/uploads/images/f288521a-9424-448f-ab01-e598.jpg

11. Do the same for the remaining materials - again, make sure nothing is selected, select next material, select corresponding vertices, assign to new group based on selection and rename the group.
At the end you should have something like pictured on a screenshot below (based on hair materials you had).

https://forum.reallusion.com/uploads/images/86dca352-7597-4050-911f-8235.jpg

12. Delete materials and leave just one for each kind (you should have identified them in step 8).
In my case I left one material those name started with A, one with B and a Scalp (use minus on the right to remove a material.)

https://forum.reallusion.com/uploads/images/6b32233c-f260-4062-91dd-577b.jpg

13. But we do not know what happened to the mesh that deleted materials were assigned to... and we do not want to know. We are going to reassign all!
Go back to Data tab. Make sure no vertices are selected. Select groups that had the same types of texture map assigned.
In my case I started with B type. Select each B type group and then click Select button. Unfortunately there is no way to select more than one group at a time.
So it has to be done one by one. At the end you should have selected all vertices assigned to all type B groups.

https://forum.reallusion.com/uploads/images/5f55c9ba-8dc9-4c6d-85cc-16d3.jpg

14. Back to Materials tab. Select corresponding B type material and click Assign button.... Done!

Now back to step 13 and do the same for the A type groups and assign A type material to selected A vertices.

Note: again this is just my case, where hair developer was smart enough to use a proper naming convention (A and B type).
You might have materials named totally different but they would have the same texture maps assigned. Just need to make notes identifying the same type.
Be careful, it is easy to mess thing up to the point where you would need to start over. Do not rely on Ctrl+Z (not related to forum user Ctrl+Z Smile ).
Going back to object mode and hitting Ctrl+Z would wipe out all the work done while being in Edit Mode!

Once finished with materials, you may rename them. I did rename A type to HAIR_INNER and B to HAIR_OUTER (relative to mesh location). I left the SCALP mesh/material alone as it is unique.

https://forum.reallusion.com/uploads/images/d3bcb73b-7502-469a-a5c0-ad36.jpg

15. Lets work with the mesh now. Firstly, we need to properly align and shape the base/scalp mesh.
It is hard to do while the main hair strands are visible. We need to hide them.
I use a Mask modifier for that. Apply it to the hair.

https://forum.reallusion.com/uploads/images/e2dbcbce-1eae-4f2b-978e-5e5b.jpg

16. Within modifier, make sure to select all 3 indicated buttons (to ensure modifier is in effect in Object and Edit Modes).
Within Vertex group drop-down select Scalp/ Base group. So that only scalp mesh is visible.

https://forum.reallusion.com/uploads/images/b278c9a7-87f6-4b90-8102-367a.jpg


17. In Object mode transform scalp (although hair mesh is hidden, it would still follow) for the best possible fit (moving and scaling is usually enough). Use display switch for a better view. I selected a Material display here.

https://forum.reallusion.com/uploads/images/8e3eaa9c-695f-4afa-8128-abb6.jpg

18. Back to Edit Mode. Make sure to enable Proportional Editing. Even if you manage to tweak the scalp mesh without Proportional Editing turned on,
the hidden hair mesh would not follow and would stuck way above the scalp mesh, or would go through the scalp mesh (depending which way you are working with the scalp mesh).
So basically you need to work a little further to bring a scalp mesh as close to the head as possible, without stretching it too much.
Thought it might not make a lot of difference since scalp mesh would be barely visible, in my case at least.

As I mentioned in Prerequisites, you would need some experience working with mesh in Edit mode.

https://forum.reallusion.com/uploads/images/e180206b-3b7b-40c0-9957-29c1.jpg

To be continued in a few...




Edited
7 Years Ago by 4u2ges
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
19. So here I am, done with the scalp mesh and can effectively remove Mask modifier.

Note: It would have been lot easier to tweak scalp mesh by using a Shrinkwrap modifier (selecting target as CC_Body ) applied after Mask modifier.
However, again the hair mesh would not follow and would need to be worked on after Mask modifier removed. So I prefer to tweak scalp mesh manually.

https://forum.reallusion.com/uploads/images/d9ab5c7c-8574-4f0e-8130-af83.jpg

20. At this point you should have a perfectly aligned hair mesh. In some cases you might wish to work the hair mesh further - refining /reshaping it. Feel free to do so - a matter of preference.

The remaining steps in Blender are well known and described in many tutorials. I'll just reiterate once more.

Attach a Hair to Armature.

In Object mode, Select Hair, Shift + Select Armature, Ctrl+P > With Empty Groups.

https://forum.reallusion.com/uploads/images/2f1941f4-37ba-4910-a504-1a69.jpg

21. Transferring Weights

Select Body, Shift + Select Hair, Select Weight Paint Mode, click Transfer Weights button, in Source Layers... choose By Name.

https://forum.reallusion.com/uploads/images/83f1bbcb-3c3a-4d86-872c-9d5e.jpg

22. Export to FBX. If you are too lazy (as I am) for an extra step selecting an FBX key, override a base model initially exported from CC.

Oh yeah.. do not forget to uncheck Add Leaf Bones in Armature tab (there should be a way to make it default).

https://forum.reallusion.com/uploads/images/cdaac706-c0a3-4a51-b6c6-cefc.jpg

23. We are almost there. Back to the "comfort" of CC.
Import exported from Blender base model. If you did not play much with base model in Blender (like accidentally duplicated it and then deleted it), you should not have any ugly CC errors.
Select a "Hair" type for the HAIR.
You would most likely not see the hair at this point. Opacity maps are not transferred, but the opacity control itself would most likely be down to 0. No worries, we'll fix it in a minute....

https://forum.reallusion.com/uploads/images/ed3da150-11d1-4784-8a3f-0cfc.jpg

24. For each mesh/material in the list make sure to check/change if necessary the following:

Select PBR.
Crank Diffuse map (sorry, it is now called Base Color map) to 100 (Blender has an awful habit to set it to 80%).
Scroll down and set opacity to 100.
Check 2-sided. No need to check that for a base/scalp mesh.

https://forum.reallusion.com/uploads/images/168de34d-01df-4e4a-88f7-2874.jpg

25. Lets finish it by bringing maps back. Default DAZ texture maps location is indicated on a screenshot below. Select correct Opacity Maps for respective materials, use Bump/Normal maps if available.
Note: I recommend to bring a contrast up a little on opacity maps. It might degrade the overall hair quality a little, but it would help to overcome some inconsistency with real-time rendering in relation to hair opacity.

https://forum.reallusion.com/uploads/images/e688bb7a-bd4d-47d7-9435-0564.jpg

26. If you forgot which map was assigned to which material (like I did), go back to Blender and check it out.

https://forum.reallusion.com/uploads/images/024a122e-1b74-4b5d-b150-c1b7.jpg

27. DAZ developers usually provide more than one shade for the hair. So it is a good time to play with those shades as well as with specular maps (if available).
If you end up with more than one material (excluding scalp), you may wish to mix shades, creating a nice dual/triple hair toning.
I recommend working with shades in iClone - under certain light conditions for a better outcome.
Though it is also possible with a single map with help of Photoshop or such. Remember those vertex groups created in steps 9/10? Now they would come handy.
By selecting them individually and then going to UV editing mode in Blender, you may effectively identify particular hair strands  location on a UV map and shade them differently.

https://forum.reallusion.com/uploads/images/4deb760f-294a-4b05-b494-f4fe.jpg

28. So here is Kara - 27 screenshots later - wearing a new DAZ wig... ooopps sorry Kara... a new hairstyle Smile

Note: this hair does not have Physix applied. I am yet to create a weight map for it.

https://forum.reallusion.com/uploads/images/1a78f7cd-dc3b-4f5a-9d3f-2d8a.jpg


Thanks for looking... and maybe following! Wink





Edited
7 Years Ago by 4u2ges
Delerna
Delerna
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)Distinguished Member (8.4K reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 1.5K, Visits: 14.8K
Good to see.
I have Daz and several hairs but I have been too busy with other stuff to get around to converting my Daz contents for CC this is going to save me the time it wold take to learn this.
Subscribed and thanks for putting in the time, I know how time consuming showing your workflow can be.

i7-3770 3.4GHz CPU 16 GB Ram   
GeForce GTX1080 TI 11GB
Windows 10 Pro 64bit
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
Thank you Delerna. Glad to help. I know you know how it is to put this together. Smile You've done quite a few yourself. Keep up a good work as well!




Kelleytoons
Kelleytoons
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)Distinguished Member (37.0K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 9.2K, Visits: 22.0K
You've put a great deal of work in, and thanks.

However, folks should be aware that not all hair is alike.  You *seem* to be referring to what we would call in iClone polymapped hair.  This is certainly one type of hair in Daz, but IMHO it's far from the most common.  Particle hair is, but there is also dynamic and shader based (in particular the latter is impossible to export).

Particle hair is frustrating because if you try and decimate it you end up with male pattern baldness -- even on females.  If you don't decimate it, it will bring iClone to its knees.  Which is too bad, because there are some fantastic hair tools available in iClone for generating it.

But if you DO have polymapped hair this tutorial will work just fine (my own problem is that I'm always looking for men's hair, almost none of which is that).



Alienware Aurora R16, Win 11, i9-149000KF, 3.20GHz CPU, 64GB RAM, RTX 4090 (24GB), Samsung 870 Pro 8TB, Gen3 MVNe M-2 SSD, 4TBx2, 39" Alienware Widescreen Monitor
Mike "ex-genius" Kelley
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
Hey Mike, thanks. I probably should have mentioned about particle hair. But quite frankly out of number of hair I have had, none of them were particle based. Maybe I was lucky (have not worked with men hair though). Well, I am lying.. there was a case with particle hair.. but it was a different type of hair Hehe. Yes, decimator does not work on particle hair at all. Not only it leads to baldness but also creates an awfully looking mesh and since there is no opacity map - there is no control over it. I tried to work on it in Blender without much of the success.
So folks, stick with poly-mapped hair as Mike advised or skip this workflow altogether, get a render farm (and wait when iClone would support it). Smile




Edited
7 Years Ago by 4u2ges
paulg625
paulg625
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)Distinguished Member (2.4K reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 388, Visits: 1.4K
Thanks 4u2ges, this will be very helpful as I have a ton of Daz hair which I can us this on. 
4u2ges
4u2ges
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)Distinguished Member (21.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.1K, Visits: 16.1K
paulg625 (10/3/2017)
Thanks 4u2ges, this will be very helpful as I have a ton of Daz hair which I can us this on. 


Glad to help Paul! Smile




CtrlZ
CtrlZ
Posted 7 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)

Group: Forum Members
Last Active: 3 days ago
Posts: 328, Visits: 4.4K
Thank you!




Home built liquid cooled AMD Ryzen 7 1800X cpu (8 core 16 thread) 4.0GHz,  rtx 3090, ASUS Crosshair VI Hero motherboard, 64 GB RAM, 500 GB SSD (Samsung 850 EVO) 6 TB HD's 4K monitor.
                                                                                                                                  



Reading This Topic