Experimenting with dForce on older hair

13

Comments

  • kyoto kidkyoto kid Posts: 41,249
    kyoto kid said:
    JonnyRay said:

    I'm going to start playing with this soon; so thank you for sharing this information. I love how some of these new technologies in Studio are breathing life into the forgotten corners of my content library!

    Agreed. Some great V4 hairs by people like AprilYSH were amazing in their day but didn't look great in Iray. But with the newer hair texture presets and perhaps a bit of dyanamics as needed, they can be back in the game!  Which was one big motivation I had for doing this in the first place.  Older hairs that you try to parent onto a G3F but the shoulders don' line up right, the back is floating a bit, things like that.  Used to have to just shrug and say "well, 3D".  But now we have some better options to at least try to fix these issues without going to Zbrush or something.

    ..Osean Hair is one that doesn't fare well in Iray unless you crank up the cutout opacity beyond 100%.  Otherwise it looks like your character was subjected to radiation poisoning. Using Slosh's UHT2 helps with this as it has higher opacity settings (so you don't have to manually set the maximum in the slider parameters) but you also first need convert the hair to Iray parameters using one of the UHT colour bases.

    You can try my trick of using a geoshell, copying the correspding materials from the real hair to the shell, and then bumping up the offset a bit.  That helps fill in the gaps left by the radiation!  Well, depending on how bad they are.  Worth a try though if it's something you really like and feel like it's out of your toolbox because of that issue.

    ....using UHT2 seems to work pretty well I just have to use the maximum opacity setting.

     

    Leela goofball.jpg
    849 x 1200 - 671K
  • Richard HaseltineRichard Haseltine Posts: 102,745
    nicstt said:

    I've not noticed it before, but I'm not seeing the Dforce menu items; yes it is Studio 4.10.

    I've uninstalled and reinstalled.

    Window>Workspace>Update and Merge Menus. Though most of the dForce features are not in the Create menu.

  • Richard HaseltineRichard Haseltine Posts: 102,745
     

    Two questions:

    1. Would it be possible to save these weightmaps and make them available for other users?

    A wearables preset should work for items that already exist as assets.

     

    As there would be no copyrighted material exchanged (if I understood it right...) this would allow users to maybe set up a free (!) public (!) library of weight maps for the different hairstyles to be used with dForce?!?

    I was surprised that the deRoca hair worked, I thought the geometry would be converted and embedded (which is why my original reply specified items that already existed as assets). Note that any AutoFitting, or editing of grouping, will create "new" geometry which will be embedded in the file, rather than being an external reference, and that could not be shared. As long as you parent the hair without conversion (for use on figures other than the original), and don't chnage the geometry or rigging, the saved Wearables presets should be safe to share.

  • nicsttnicstt Posts: 11,715
    edited May 2018
    nicstt said:

    I've not noticed it before, but I'm not seeing the Dforce menu items; yes it is Studio 4.10.

    I've uninstalled and reinstalled.

    Window>Workspace>Update and Merge Menus. Though most of the dForce features are not in the Create menu.

    Thanks Richard, I'll give that a go.

    Edit; and it worked, ty again.

    Post edited by nicstt on
  • 3Diva3Diva Posts: 11,746

    With the current hair sale going on I thought I'd take a chance on some of the older hair and bought some to experiment on with dForce. So far so good! :)

    Here's Adaja Hair weight mapped and dForced.

    After weight mapping, some of the strands kept coming out when trying to sim, so I used grinch's technique and fixed the stray strands (thanks, grinch2901).

    That's the hair's default shader and texture, I'm going to see if I can give the hair a bit more realism with one of the newer Iray hair shaders. :) But so far I think it sims really nicely! It's a lot of fun converting these older hair into dForce hair! :)

  • 3Diva3Diva Posts: 11,746
    edited May 2018

    Here's the hair using grinch's idea of adding a geoshell and copying the hair's mats onto the geoshell. 

    I set the geoshell to 25%. 

    I like the geoshell technique - I think it adds little more thickness and I think improves the look of the hair after it's been dForced (that needs to be a word lol).

    Post edited by 3Diva on
  • maikdeckermaikdecker Posts: 2,974

    I was surprised that the deRoca hair worked, I thought the geometry would be converted and embedded (which is why my original reply specified items that already existed as assets). Note that any AutoFitting, or editing of grouping, will create "new" geometry which will be embedded in the file, rather than being an external reference, and that could not be shared. As long as you parent the hair without conversion (for use on figures other than the original), and don't chnage the geometry or rigging, the saved Wearables presets should be safe to share.

    Okay, will have to remember that. I *think* I used autofit for the hair - was showing the G2F option iirc - so other people will have to see if the .duf works or not wink

    Here's the hair using the @maikdecker idea of adding a geoshell and copying the hair's mats onto the geoshell. 

    I set the geoshell to 25%.

    Not my idea... it was @grinch2901 who mentioned it first. I only said that I'd use a negative setting for the geoshell, so it goes under and not above the original texture. 

  • 3Diva3Diva Posts: 11,746

    I was surprised that the deRoca hair worked, I thought the geometry would be converted and embedded (which is why my original reply specified items that already existed as assets). Note that any AutoFitting, or editing of grouping, will create "new" geometry which will be embedded in the file, rather than being an external reference, and that could not be shared. As long as you parent the hair without conversion (for use on figures other than the original), and don't chnage the geometry or rigging, the saved Wearables presets should be safe to share.

    Okay, will have to remember that. I *think* I used autofit for the hair - was showing the G2F option iirc - so other people will have to see if the .duf works or not wink

    Here's the hair using the @maikdecker idea of adding a geoshell and copying the hair's mats onto the geoshell. 

    I set the geoshell to 25%.

    Not my idea... it was @grinch2901 who mentioned it first. I only said that I'd use a negative setting for the geoshell, so it goes under and not above the original texture. 

    Ohh! Oops! :) I'll edit my post. Thanks for the heads up! 

  • 3Diva3Diva Posts: 11,746

    Okay... an attempt by me for De Roca Hair for V4 (came free with the Dark OPs ready to render bundle a while ago)

    From left to right (Figure = G3F):

    De Roca unmodified / De Roca dForced (basic head pose) / De Roca (different head pose + geoshell for hair with -0.05 cm setting and the same hair textures)

    The (basic) hair needs a small adjustment as it seems to be a bit to "tight" for the G3F head. So a small scale increase for the x and z axis (to 105%) is needed to not have blank skin show through on some parts of the head. This size increase is already added in the material setting below. The geoshell isn't.

    I guess the hair would profit a lot if a different texture could/would be applied.

    I *think* I only used the basic installation paths for this hair. So there hopefully aren't any problems...

    Best place to save that .duf to would be /my Library/Presets/(and either the wearables directory or you could make a hair directory to put it in there)

    This works great! Thank you so much! :D

    I lowered the dynamic strength a little bit and added a different shader to the hair.

    Thank you for sharing your work with us! :) That was really nice of you!

  • FSMCDesignsFSMCDesigns Posts: 12,781

    Nice work Diva!

    Anyone know of a way to freeze the dforce hair after it is draped? I know with dynamics you can freeze simulation and it creates a morph for the final shape and it can be parented and moved around. Any control like this for dforce hair?

  • grinch2901grinch2901 Posts: 1,246

    Diva: great work, looks really good.

    FSMCDesigns: under the paramaters tan there is an option to freeze simulation but it seems to just make it not sim, it doesn’t make a morph out of it as far as I can tell.  Probably have to export and use morph loader to make a morph.  If anyone knows an easier way to do it, I’d love to know too.

  • maikdeckermaikdecker Posts: 2,974
    Thank you for sharing your work with us! :) That was really nice of you!

    Well, with so many people trying out things I hoped to start a trend... dForce settings for old hair database, y'know... seems a bit weird if we all would have to re-invent the wheel again and again and again when it seems to be so easy to share the results.

    wink

  • 3Diva3Diva Posts: 11,746
    Thank you for sharing your work with us! :) That was really nice of you!

    Well, with so many people trying out things I hoped to start a trend... dForce settings for old hair database, y'know... seems a bit weird if we all would have to re-invent the wheel again and again and again when it seems to be so easy to share the results.

    wink

    So you just saved it as a wearable preset and that's all? Then it's shareable? Or does something else need to be done? And will it work if my hair content isn't in the default Library? I have my content set up a bit different and spread across three different hard drives. lol I've not packaged up a wearable preset before, so I'm not sure what's all involved. I'd like to share my own dForce weight mapping on the older hair if it's not too complicated to package. :) 

  • 3Diva3Diva Posts: 11,746

    @FSMCDesigns @grinch2901 Thank you, guys! :D That's nice of you to say! Hopefully I can figure out how to share the weight maps I'm working on for some of the older hair. 

  • Richard HaseltineRichard Haseltine Posts: 102,745

    I was surprised that the deRoca hair worked, I thought the geometry would be converted and embedded (which is why my original reply specified items that already existed as assets). Note that any AutoFitting, or editing of grouping, will create "new" geometry which will be embedded in the file, rather than being an external reference, and that could not be shared. As long as you parent the hair without conversion (for use on figures other than the original), and don't chnage the geometry or rigging, the saved Wearables presets should be safe to share.

    Okay, will have to remember that. I *think* I used autofit for the hair - was showing the G2F option iirc - so other people will have to see if the .duf works or not wink

    Then I'm even mor surprised it worked. Check the .duf file in a text editor, looking for a geometry_library block http://docs.daz3d.com/doku.php/public/dson_spec/object_definitions/daz/start

  • MarkHMarkH Posts: 79

    Wow, lots of imaginative, out of the box solutions here - anxious to put these to use - thanks so much.

  • maikdeckermaikdecker Posts: 2,974

    Then I'm even mor surprised it worked. Check the .duf file in a text editor, looking for a geometry_library block http://docs.daz3d.com/doku.php/public/dson_spec/object_definitions/daz/start

    No mention of geometry_library in the .duf.

    But this part of the .duf makes me wonder of I really autofitted it...

    "scene" : {
            "nodes" : [
                {
                    "id" : "DeRoca_V4_40016-1",
                    "url" : "#DeRoca_V4_40016",
                    "name" : "DeRoca_V4_40016",
                    "label" : "DeRoca_V4 (2)",
                    "parent" : "name://@selection/head:",
                    "geometries" : [
                        {
                            "id" : "DeRoca_V4",
                            "url" : "/data/auto_adapted/DeRoca_V4_40016/geometry_2510302e_e848_aa73_07b8_04fb8c64f359/DeRoca_V4.dsf#DeRoca_V4",
                            "name" : "DeRoca_V4_40016",
                            "label" : "DeRoca Hair",
                            "type" : "polygon_mesh",
                            "legacy_source_info" : {
                                "location" : "/Runtime/Geometries/SWAM_1a/2010_DeRoca/DeRoca_V4.obj",
    ...
    (cut some lines here that didn't look important)

                           "extra" : [
                                {
                                    "type" : "studio/element_data/geom_source_file_data",
                                    "source_file" : "/Runtime/Geometries/SWAM_1a/2010_DeRoca/DeRoca_V4.obj",
                                    "geometry_changed" : false,
                                    "group" : ""
                                },

    I tried to remember how all went, and I *think* the autofit menu showed up. I chose "G2F" as "V4" or "Genesis" weren't offered and "Hair; shoulder long". After that, the hair set in about the proper position but it wasn't parented (!). I then parented it to G3F's head and noticed after dForcing, that the head's skin showed at some spots, so I moved and resized the hair a bit until those spots were gone. DForced again and saved the material preset.

    The next time I manage to get some hair working; I'll try out both options - with and without using autofit.

     

    So you just saved it as a wearable preset and that's all? Then it's shareable? Or does something else need to be done? And will it work if my hair content isn't in the default Library? I have my content set up a bit different and spread across three different hard drives. lol I've not packaged up a wearable preset before, so I'm not sure what's all involved. I'd like to share my own dForce weight mapping on the older hair if it's not too complicated to package. :) 

    Well in my case the De Roca hair's geometry and texture files were sitting right there, where DIM had saved them - in the runtime/geometries and runtime/textures folders... or rather in the PA's folder structure, that got imposed when it was installed. /runtime/textures/swam/deroca/xxx.jpg for the textures and /Runtime/Geometries/SWAM_1a/2010_DeRoca/DeRoca_V4.obj for the .obj files.
    So I guess (!) everything should be okay, if the different libraries on your different HDs still use the basic subfolder structure with a runtime folder and texture and geometries folders in that.
    I would also *guess* that most people don't mess with these folders too much, as that would mean loading the hair or texture probably would produce an error message, unless one has heavily edited the files used for loading them and setting up any user changed folder paths.

    So in the end it depends a) on your setup and how far it deviates from a "normal" setup and b) the ability of the person trying to use the .duf (material setting) you deliver to change a couple lines of code to make them point to the place where this person has those directories stored...

    Did you use the .duf I uploaded? Did you encounter any error messages, when you loaded it on "your" De Roca hair? If not, I guess (!) the directiory structure used should be about the same wink

  • 3Diva3Diva Posts: 11,746
    edited May 2018

    Then I'm even mor surprised it worked. Check the .duf file in a text editor, looking for a geometry_library block http://docs.daz3d.com/doku.php/public/dson_spec/object_definitions/daz/start

     

     

     

    So you just saved it as a wearable preset and that's all? Then it's shareable? Or does something else need to be done? And will it work if my hair content isn't in the default Library? I have my content set up a bit different and spread across three different hard drives. lol I've not packaged up a wearable preset before, so I'm not sure what's all involved. I'd like to share my own dForce weight mapping on the older hair if it's not too complicated to package. :) 

     

    Did you use the .duf I uploaded? Did you encounter any error messages, when you loaded it on "your" De Roca hair? If not, I guess (!) the directiory structure used should be about the same wink

    I do get an error message:

    But the hair and weight map and everything seems to load fine anyway.

    I'll try and package up and share one of my weight maps and see if you guys can use it without any problems. Hopefully, my odd file system won't muck things up. lol

    Post edited by 3Diva on
  • grinch2901grinch2901 Posts: 1,246
    edited May 2018

    In the interests of furthering the experimentation, I took a hair I think everyone owns (Toulouse Hair for G3F - which I know I never bought and don't even see as for sale -so it must be part of the basic content) and added a weight map to it.  I've been experimenting with using a gradiant map because my earlier experiments showed that blue in the weight map pretty much froze things so if I created a gradiant map going up (i.e. blue at the top, fading down to red at the bottom) all I need to do is deepen the red for the lower bits and it pretty much does a great job locking all the strands down. Makes the painting part a lot faster. So I did that for the toulouse hair (see the gradiant map I created below).  To do this, all you need to do while in paint mode is right click, selctect "Brush Mode -> Directional Gradient" and then a couple of little discs appear. Move one to the top, the other to the bottom of the hair and inside the Too Settings window, select "Apply Gradiant".  If it's upside down, select "Flip Gradient" and then apply it again.  Then tweak it a bit and you're done (in theory).  

    So the result is seen in the second pic below.  It definitely sims, doesn't fall apart but with the current map you can see in the result the fairly sharp line between the ble and the red. That's my fault, the gradient map makes if very subtle shift from red to blue but it made the lower parts too blue so I took a brush and painted that part more red. That made a more harsh transition and if I were worred about it I'd paint using a low sensitivity around that transition area to make it a little less instantaneous.  But for the purposes of proving it's shareable, doesn't matter.  Anyway dforcifying short hair doesnt make for dramatic results but the whole point is to see if I can share the result as a wearables preset.  So that is also below. Like I said, this should be one I think everyone has. So give it a try, looking forward to feedback.

    Toulouse Hair - Weight Map.png
    556 x 561 - 425K
    Toulouse Hair - Sim.png
    656 x 594 - 429K
    duf
    duf
    Toulouse Hair - dForced.duf
    1M
    Post edited by grinch2901 on
  • kyoto kidkyoto kid Posts: 41,249

    ...so for Dforce (hair or fabric) you need to manually "paint" the surfaces first.  Hmmmm, with my arthritis that seems a bit problematic as I do not have a very steady hand. Hard enough working with the styling combs in Garibaldi.

  • AlmightyQUESTAlmightyQUEST Posts: 2,005

    I have not had to do that yet for any items sold as dforce, and not for most of my clothing tests on older clothing. It is not required for everything, it can help for some things.

    It can help with clothing that wasn't made for it if pieces are falling off. For hair it tends to be needed more since a lot of hair isn't connected to anything at the scalp, but it's just very roughly painting large areas with a few clicks, I haven't needed to do any fine painting yet.

  • grinch2901grinch2901 Posts: 1,246

     

    kyoto kid said:

    ...so for Dforce (hair or fabric) you need to manually "paint" the surfaces first.  Hmmmm, with my arthritis that seems a bit problematic as I do not have a very steady hand. Hard enough working with the styling combs in Garibaldi.

    No, normally when you add the dforce dynamic modifier it assumes that the weight (i.e. strength) is 100% for the whole item, all surfaces. You can sim that as-is. If you want to, you can go into each surface and tweak the settings for the dymanic strength as well as stretch, etc. So for buttons you might say "I don't want that simulated" and just turn dynamic strength setting for that surface to zero. No painting needed.

    Where it gets dicey is a situation like hair. Here I want most of the hair to fall natureally but just like real hair, it shouldn't fall off the head.  So you need to find a way to lock just a part if it to not simulate. Unfortunately hair doesnt tend to have a seperate surface for the roots, so you need to fake it, and my solution was to use a weight map. Which works well, and if you use my gradient approach it will work for a lot of hairs with not much painting, you just tweak it by dragging the mouse around the bottom a bit.  But yeah, in this case painting is part of it.  That's not the case for all dForce stuff, though.

    In fact I've done many sims and until I started this thread I never painted a weight map in studio for anything.  It's part of why I created the thread, so I'd have  a place to go to remind myself how I did it a year from now!

  • 3Diva3Diva Posts: 11,746
    kyoto kid said:

    ...so for Dforce (hair or fabric) you need to manually "paint" the surfaces first.  

    No.

    dForce clothing bought in the store already has weight maps. So there's nothing you need to do with the dForce clothing bought in the store.

    Most of the older clothing (V4, G1, G2, etc) that I tried dForce on didn't require a weight map to be painted on either. The reason why most hair does is that most of the older hair (and probably the newer hair that hasn't been made for dForce) has "strands" that aren't attached to the cap's mesh. They're individual meshes instead of one big mesh. Pretty much anything with a full and intact mesh can be dForced without problems. However hair is different in that the way it's made is individual strands or poly planes. The weight map you paint on those hairs pretty much tells dForce to pretend that the hair is all one mesh and gives the individual poly planes anchor points at the hair cap (like hair strands coming out of the head). 

     

  • grinch2901grinch2901 Posts: 1,246

     

    Where it gets dicey is a situation like hair. Here I want most of the hair to fall natureally but just like real hair, it shouldn't fall off the head. 

    By the way, as I've been experiencing recently, real hair does actually fall off the head for some people. Would that it were as easy as painting a weight map to solve that problem!

  • kyoto kidkyoto kid Posts: 41,249

    ...bugger so still out of luck when it comes to hair. Sad I have so many nice older hairs and cannot afford to buy a lot of new content on my extremely tight budget. Also not sure many of the older styles I like and use will reappear when we get Dforce hair.

  • grinch2901grinch2901 Posts: 1,246
    edited May 2018

    This experiment with sharing wearable presets with weight maps included would allow you to leverage a map painted by someone else for hairs you already own. If it works out. Of course that implies that someone has the same hair and has gone to the trouble to weight map it. But it's not that hard really so people might be willing to help out if asked and share their results. Then all you'd need to do is push "simulate".

    Post edited by grinch2901 on
  • 3Diva3Diva Posts: 11,746

    In the interests of furthering the experimentation, I took a hair I think everyone owns (Toulouse Hair for G3F - which I know I never bought and don't even see as for sale -so it must be part of the basic content) and added a weight map to it.  I've been experimenting with using a gradiant map because my earlier experiments showed that blue in the weight map pretty much froze things so if I created a gradiant map going up (i.e. blue at the top, fading down to red at the bottom) all I need to do is deepen the red for the lower bits and it pretty much does a great job locking all the strands down. Makes the painting part a lot faster. So I did that for the toulouse hair (see the gradiant map I created below).  To do this, all you need to do while in paint mode is right click, selctect "Brush Mode -> Directional Gradient" and then a couple of little discs appear. Move one to the top, the other to the bottom of the hair and inside the Too Settings window, select "Apply Gradiant".  If it's upside down, select "Flip Gradient" and then apply it again.  Then tweak it a bit and you're done (in theory).  

    So the result is seen in the second pic below.  It definitely sims, doesn't fall apart but with the current map you can see in the result the fairly sharp line between the ble and the red. That's my fault, the gradient map makes if very subtle shift from red to blue but it made the lower parts too blue so I took a brush and painted that part more red. That made a more harsh transition and if I were worred about it I'd paint using a low sensitivity around that transition area to make it a little less instantaneous.  But for the purposes of proving it's shareable, doesn't matter.  Anyway dforcifying short hair doesnt make for dramatic results but the whole point is to see if I can share the result as a wearables preset.  So that is also below. Like I said, this should be one I think everyone has. So give it a try, looking forward to feedback.

    Thank you for sharing your weight map with us. :)

    It loads fine but it does ask for a few OOT shader maps when loading. It still loads fine though.

    There seems to be a few strands on the back sides that aren't fully attached to the cap:

  • grinch2901grinch2901 Posts: 1,246
    edited May 2018

    Oops, I tend to use some of the hair textures from Slosh or OOT or others and did here, then before I saved the wearable I thought (hmm better fix that and tried to reload the original textures but guess I missed one. Since it's not sharing the texture, that's okay but I may fix the duf to get rid of the error. The loose bits are an issue (and if I  update the duf I'll fix those too) but the real idea was "would it work for you" if I shared it and it does. Very cool! This can be very useful for more than just hair!

    Post edited by grinch2901 on
  • maikdeckermaikdecker Posts: 2,974

     So give it a try, looking forward to feedback.

    Worked fine (except for the missing OOT texture, which produced an error message that could be ignored without causing any problems).

    So the basic principle has been proven as: IT WORKS!


     

    As an addition:

    To catch those single strands that like to fall off, it helps to...

    • place the figure onto which the hair is attached at a 90° angle floating in the air, lying on the back
    • simulate and apply weightmap modifier the the strands falling off. Stop the simulation if needed, when it are too many. Simulate a couple times 'til all strands are found
    • turn the figure around for 90° on the side. Simulate, catch strands, rinse, repeat..
    • turn the figure for a further 90°, so now it's facing to the ground. Simulate etc..
    • final turn of 90° and strands catching...
    • now turn the figure upside down (feet up, head down). If anything is still falling off, you'll find it now

    Sounds like a lot of work, but with these older hair and the low polygons they have, the simulation is quite fast (Toulouse hair = 15 seconds or so) so it can be done in a couple minutes...

     

  • Richard HaseltineRichard Haseltine Posts: 102,745

    A weight-map can also be sahred, probably more safely, via a dForm preset - that's what the head Split dForm that comes with the Genesis 8 figures is for.

Sign In or Register to comment.