Combining displacement and a morph from ZBrush to DS

Richard HaseltineRichard Haseltine Posts: 47,704
edited June 2013 in Daz Studio Discussion

This thread is going to offer a very simple overview of how to get take a finely detailed sculpt from ZBrush into DAZ Studio, using the morph generated on the base mesh and displacement maps to add in the fine detail. I will assume that readers know how to get the Genesis (or other) mesh into ZBrush, via the File>Send to ZBrush command, and how to return it as a morph.

Post edited by Richard Haseltine on

Comments

  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    Grouping the mesh

    In order to create the displacement maps for something like Genesis we need to be able to split the model down into the different material groups - the materials that start with the same number all belong on one map, the materials with a different number on another map. The mesh that the GoZ plugin sends to ZBrush is ungrouped - one workaround would be to use the Polygon Group Editor in DS to combine the material zones (so all the 1s would become a single material, all the 2s a single material and so on) and export as OBJ, then import that into ZBrush with the option to import materials as groups set (in Preferences>ImportExport). For this thread I'm going to use the option in ZBrush itself, in Polygoups in the Tool pane, to make groups from UV Islands by clicking the Auto Groups with UV button. Clicking the mesh preview button beside the viewport after that shows that the model has been split as we need, though I do need to point out that in some areas (such as the teeth) it may have split over-enthusiastically - if you are going to want to work on the teeth or other over-split areas you will be better off skipping GoZ and using the modify the materials and export as OBJ route.

    02-AfterGrouping.JPG
    1388 x 862 - 69K
    01-MakeGroups.jpg
    654 x 566 - 26K
  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    Create the sculpt

    Now of course the mesh needs to be subdividided, if we were working on only the base resolution all the extra steps would be superfluous. When working with Genesis it is important to turn Smt off before dividing, as leaving it on will result in distortions to the mesh even when you go back to the base resolution and those will carry over to your morph.

    Here I just painted a stripe of scaliness around Genesis' torso and up over the head with the mouse, to give us something to see. Then in the Tool pane>Geometry I reset the SDiv to 1, leaving only the changes that would carry over to the morph.

    05-ResetResolution.JPG
    1141 x 853 - 56K
    04-AddSomeDetail.JPG
    1135 x 854 - 46K
    03-SubDividewithoutSmoothing.JPG
    384 x 542 - 33K
  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    Generating the displacement maps

    Having lost all the detail by going back to the base resolution we now need to generate the displacement maps that will put it back in at render time. This is where the grouping is needed, so that we can selectively hide the rest of the mesh, generate a displacement map for oen material group, and then go on to the next area. To hide all but one group on the mesh, hold down the ctrl and shift keys (cmd and shift on a Mac) and click on the area you want to keep - everything else will be hidden. To bring the hidden areas back, ctrl-shift click on an area where no mesh is currently showing.

    Once you have only a single material group's mesh showing open Tool>Displacement Map, click Create DispMap and make sure it looks OK in the preview (hover the mouse over the little thumbnail to get a fuller view). You may want to click the Adaptive button, that should give smoother results but slowed the process down greatly for my example so it didn't seem worth using for a test. Once happy, click the Create and Export Map button, give it a name (I just called it HeadDisp, but a more usual system would be ProjectNameHeadD - the name needs to indicate what map group it applies to, and that it's a displacement map). Repeat for the other areas of the mesh that were modified by the sculpting (in this case the torso and the left arm) and then send the morph back to DS by clicking the GoZ button.

    07-CreateMap.JPG
    378 x 449 - 31K
    06-HideAllButOneGroup.JPG
    489 x 599 - 18K
  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    Tying it all together in DAZ Studio

    Finally we need to reunite the low resolution shape from the morph and the high-resolution detail from the displacement map.

    In DAZ Studio, with Genesis selected, open the Surfaces pane and select all the materials that start with the same number and that are affected by the sculpt - for example, I can be sure that the lips weren't affected when it comes to the 1 materials for the face, so I don't need to select that zone, and that only the upper arm was affected, so the hands can be left alone; In the image, I did select all of the materials for the torso as I thought there might be a bit of spill over around the top of the hip. Click the image preview square for Displacement Strength (2), from the menu chose Browse..., and select the displacement map for that group of materials (TorsoDisp.tif for me in this case). Finally set the value of the Displacement Strength to 100% (I prefer to set the strength to 100% and adjust the Min and Max values, since that allows me to work directly in cm, but you can use the Strength as your control variable if you wish - however, varying both the strength and the min/max values is apt to be confusing). A certain amount of experimentation may well be needed to get the right result - you will want to use the same values for strength, Min and Max on all surfaces affected by the displacement map to avoid obvious jumps so you can select them all in the Surfaces pane and adjust them as a group once you have the maps loaded.

    10-DisplacementPlusMorph.jpg
    1000 x 1000 - 137K
    08-ApplyMaps.JPG
    687 x 768 - 92K
    09-JustTheMorph.JPG
    833 x 1069 - 73K
  • shona_nqnshona_nqn Posts: 0
    edited December 1969

    THANK YOU! arrived at the same result ... before I go to my work, I finally got the same result! .. from and THANK YOU! ... although I still have some questions ... haha

  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    Glad to help.

    I didn't notice last night that there's a ridge on the left arm in the rendered version - that's because I failed to follow my own advice and had Smt on when I created the SubDivisions in ZBrush, so there was distortion (thinning) on the arm which was then baked to the displacement map. Which is at least an object lesson in why you don't want that setting on.

  • shona_nqnshona_nqn Posts: 0
    edited December 1969

    if, like me .. I discovered another problem .... I create clothing in ZBrush but not adapted to the genesis daz ..... Publishing here? or open another thread ... Goz really think this plugin has great potential.

  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited December 1969

    I replied in your other thread, it's probably best to leave this one for anyone with additional questions about the tutorial.

  • hellbornhellborn Posts: 34
    edited December 1969

    As far as I can figure it out I'm following your example but something must be missed somewhere.

    When I subdivide with Smt turned of in zBrush my mesh don't get smooth as yours seems to be on the images.
    It looks just the same as the base.
    Of course, if I turn on polygons I can see that polygons has been added.

    So, I thougt that maybe this is how it must look, as otherwise the change in form will generate displacement.

    So I continued, created a scar, (did not greate morph as there was almost no change in the basemesh, created the displacementmap and loaded it into the hip in DAZ)
    When I apply the displacement I get the scar but the shape of the hip also turns into looking jast as if it had been the basemesh with no smoothing.

    I also tried with smooth on but that makes everything grow as blowing up a balloon.

  • Cris PalominoCris Palomino Posts: 4,534
    edited December 1969

    If you mean it doesn't get smooth in ZBrush, you are correct. I'm not seeing it smooth either, so I will have to do some more investigation, however, the displacement worked fine. Can you perhaps post some screenshots of how it looks in ZBrush and in Studio?

  • hellbornhellborn Posts: 34
    edited May 2015

    Ok,
    A small test on the Genesis 2 butt.
    First images shows:
    Left image,model at base resolution in zBrush.
    Mid image, model subdivided 4 times with Smt turned of..
    Right image, model at sDiv level 5 with displacement done.

    Second image shows the generated displacement map.
    It looks strange to me, why are all polygon edges white.
    To me that indicates some kind of movement.
    Or?

    Image 3 shows what happens if I apply that map to the hip in DAZ.

    Displace_03.jpg
    409 x 680 - 23K
    Displace_02.jpg
    1200 x 1200 - 63K
    Displace_01.jpg
    1200 x 431 - 70K
    Post edited by hellborn on
  • oomuoomu Posts: 161
    edited December 1969

    Thanks a lot

    Still interesting and useful.

  • RAMWolffRAMWolff Posts: 8,550
    edited December 1969

    Glad that Siciliano1969 posted the link to this tutorial. Seems like this should be in Nuts and Bolts but in any case I'll bookmark it and read it later.

    Thanks Richard!

  • Richard HaseltineRichard Haseltine Posts: 47,704
    edited June 2015

    At a quick bit of testing this seems to work:

    Send you figure to ZBrush

    Divide it once

    Set it back to the base resolution

    Send it back to DS and name the morph somethign like SMTDistortion

    Set the figure up as you want, with the SMTDistortion zeroed so that you are sending the normal mesh (plus any desired pose or morphs) to ZBrush).

    Send it to ZBrush, divide with SMT on, sculpt and generate displacement maps.

    Set resolution in ZBrush to base.

    In DS set SMTDistortion to 100%

    Send mesh back to DS from ZBrush

    Assuming you have Reverse Deformations on (it should be, by default) this should cancel the changes due to smoothing while leaving your morph largely as intended.

    I have given this only a quick testing so there may well be issues - especially with subtle or fine details - but it looks hopeful so far. I don't think you need a separate morph for each division level in ZBrush, and it didn't look as if you need a separate morph for each pose - though I would do a bit of testing before saving SMTDistortion as a Morph Asset.

    Post edited by Richard Haseltine on
  • RAMWolffRAMWolff Posts: 8,550
    edited December 1969

    Hmmmm, that's a very interesting work around Richard! :-)

  • NosiferretNosiferret Posts: 237

    thank you Richard for doing this. I don't suppose you'd help out with some newbie zbrush stuff? Snowsultan started a thread on moving figures from Studio to ZB. 

  • DrHemulenDrHemulen Posts: 64

    That is extremely clever, and less convoluted than any of the ideas I have :)

  • lol Zbrush and Daz is great!

  • At a quick bit of testing this seems to work:

    Send you figure to ZBrush

    Divide it once

    Set it back to the base resolution

    Send it back to DS and name the morph somethign like SMTDistortion

    Set the figure up as you want, with the SMTDistortion zeroed so that you are sending the normal mesh (plus any desired pose or morphs) to ZBrush).

    Send it to ZBrush, divide with SMT on, sculpt and generate displacement maps.

    Set resolution in ZBrush to base.

    In DS set SMTDistortion to 100%

    Send mesh back to DS from ZBrush

    Assuming you have Reverse Deformations on (it should be, by default) this should cancel the changes due to smoothing while leaving your morph largely as intended.

    I have given this only a quick testing so there may well be issues - especially with subtle or fine details - but it looks hopeful so far. I don't think you need a separate morph for each division level in ZBrush, and it didn't look as if you need a separate morph for each pose - though I would do a bit of testing before saving SMTDistortion as a Morph Asset.

    Hey Richard, I didn't realize you had a possible workaround for this...thanks a bunch!  Quick question....when you initially send the figure to Zbrush to create the SMT distortion morph did you have SMT on or off?  SMT is on by default in Zbrush.  Thanks way too much!

  • At a quick bit of testing this seems to work:

    Send you figure to ZBrush

    Divide it once

    Set it back to the base resolution

    Send it back to DS and name the morph somethign like SMTDistortion

    Set the figure up as you want, with the SMTDistortion zeroed so that you are sending the normal mesh (plus any desired pose or morphs) to ZBrush).

    Send it to ZBrush, divide with SMT on, sculpt and generate displacement maps.

    Set resolution in ZBrush to base.

    In DS set SMTDistortion to 100%

    Send mesh back to DS from ZBrush

    Assuming you have Reverse Deformations on (it should be, by default) this should cancel the changes due to smoothing while leaving your morph largely as intended.

    I have given this only a quick testing so there may well be issues - especially with subtle or fine details - but it looks hopeful so far. I don't think you need a separate morph for each division level in ZBrush, and it didn't look as if you need a separate morph for each pose - though I would do a bit of testing before saving SMTDistortion as a Morph Asset.

    Hey Richard, I didn't realize you had a possible workaround for this...thanks a bunch!  Quick question....when you initially send the figure to Zbrush to create the SMT distortion morph did you have SMT on or off?  SMT is on by default in Zbrush.  Thanks way too much!

    Wow, I think this really did work!  I kept the SMT active...obviously if you are creating an SMT distortion morph it needs to be active!  I guess I'm just getting old.

     

     

  • hellborn said:

    Ok,
    A small test on the Genesis 2 butt.
    First images shows:
    Left image,model at base resolution in zBrush.
    Mid image, model subdivided 4 times with Smt turned of..
    Right image, model at sDiv level 5 with displacement done.

    Second image shows the generated displacement map.
    It looks strange to me, why are all polygon edges white.
    To me that indicates some kind of movement.
    Or?

    Image 3 shows what happens if I apply that map to the hip in DAZ.

     

    Was the issue of the mesh lines appearing as displacement solved?

    I have the same issue. I'm making a skinny ribs morph and the corresponding displacement map exported by Zbrush has the lines of the mesh as displacement (see attached image).

    So, when the displacement map is applied, the ribs apear but the mesh lines are also displaced. I assume there is a way to stop Zbrush from exporting mesh lines as displacement.

    Ribs1_DisplacementMap.jpg
    4096 x 4096 - 730K
  • I'm having the same problem as IsaacNewton, my displacement map looks really, really strange.

    Doesn't anybody else have this problem?

Sign In or Register to comment.