Get Version 4 ! mcjHatsAreTheFashionOfTheDay : Fit Any Hair in Hats Pc/Mac

24

Comments

  • barbultbarbult Posts: 24,358

    I edited my copy of the script to fix the air gap and it works perfectly. I'll download the official version when it is ready.

  • barbultbarbult Posts: 24,358
    edited February 2019

    Off topic, but your beanie lady has a problem with her skin materials. Her arms don't match her torso. Beanie fit looks good, though.

    Post edited by barbult on
  • mCasualmCasual Posts: 4,607
    edited February 2019

     Version 2 is online

    https://sites.google.com/site/mcasualsdazscripts9/mcjhatsarethefashionoftheday

    thank you for having been an involuntary beta tester

    barbult said:

    I edited my copy of the script to fix the air gap and it works perfectly. I'll download the official version when it is ready.

     

    thanks.jpg
    930 x 806 - 313K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited February 2019

    been working on a skin shader related project 

     

    barbult said:

    Off topic, but your beanie lady has a problem with her skin materials. Her arms don't match her torso. Beanie fit looks good, though.

     

    airgap2.jpg
    343 x 555 - 120K
    Post edited by mCasual on
  • barbultbarbult Posts: 24,358
    mCasual said:

    been working on a skin shader related project 

     

    barbult said:

    Off topic, but your beanie lady has a problem with her skin materials. Her arms don't match her torso. Beanie fit looks good, though.

     

    yes looks good.

  • mCasualmCasual Posts: 4,607
    edited February 2019

    No But Really, You Should Get Version 2

    with version 1 if your hair prop was subdivided and you created the hat-fit morph 

    the scene file could become un-openable !!! so you do want version 2

    which makes sure to put the hair prop in non-subdivided state before computing the hat fit morph

    then everybody ilives happily forever after

    airgap2b.jpg
    800 x 600 - 180K
    Post edited by mCasual on
  • barbultbarbult Posts: 24,358
    edited February 2019

    Without this great script:

    With this great script:

    G8F Latonya Cassie Georgette hat Rings SOx2.jpg
    2000 x 1500 - 645K
    G8F Latonya Cassie Georgette mcjCollider hat Rings SOx2.jpg
    2000 x 1500 - 668K
    Post edited by barbult on
  • barbultbarbult Posts: 24,358

    I'm trying the new version of the script now with a hair that has SubD. It is not going well. When I run the script, it stays at 0% "forever". I see an unmoving white ray in the viewport. When I click the cancel button on the progress dialog, nothing happens except the cancel button disappears. When I click the X to close the progress dialog window, if finally goes away. Then when I click Exit on the main dialog, an error message box appears saying an error occurred while reading the file, see the log file for more details. The log says:

    2019-02-17 01:34:49.770 Loading script: N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/HatsAreTheFashionOfTheDay/mcjHatsAreTheFashionOfTheDay.dsa
    2019-02-17 01:40:08.965 WARNING: Script Error: Line 216
    2019-02-17 01:40:08.965 WARNING: Error: cannot access member `getVertex' of deleted QObject
    2019-02-17 01:40:08.965 WARNING: Stack Trace:
    <anonymous>()@N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/HatsAreTheFashionOfTheDay/mcjHatsAreTheFashionOfTheDay.dsa:216
    2019-02-17 01:40:08.989 Error in script execution: N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/HatsAreTheFashionOfTheDay/mcjHatsAreTheFashionOfTheDay.dsa

    Then after all this, when I look in the Parameters pane, I can see that the hair was set back to Base resolution, so at least that part worked.

  • mCasualmCasual Posts: 4,607
    maybe after the script sets the resolution to base and sets subdlevel to 0, the daz studio viewport renderer needs more time to re-generate the cachedGeometry, but the script starts.querying vertices from a half built object i'll add a call to processEvents() before accessing the hair node's object and cachedgeom
    barbult said:
  • barbultbarbult Posts: 24,358

    I tried it again and it worked that time. I wonder what was different? Maybe an intermittent timing thing. I'll wait for your next version.

  • mCasualmCasual Posts: 4,607
    edited February 2019

    version 3 is online

    if the hair is a subd, the script temporarily sets it to base rez and subd level 0

    then it calls processEvents() which i think lets the Daz Studio process all the time it wants to do tasks it accumulated since the script started

    then the script does its thing

     

    ( her left eye is straining a bit too hard )

     

    barbult said:

    I tried it again and it worked that time. I wonder what was different? Maybe an intermittent timing thing. I'll wait for your next version.

     

    airgap2c.jpg
    343 x 555 - 136K
    Post edited by mCasual on
  • barbultbarbult Posts: 24,358

    I'll try it tomorrow. I'm going to bed now. Thanks for the quick updates.

  • barbultbarbult Posts: 24,358

    I've tried the latest version several times now, and it seems to be working perfectly so far.

  • mCasualmCasual Posts: 4,607
    barbult said:

    I've tried the latest version several times now, and it seems to be working perfectly so far.

    this week i'll do tests on older scripts that also made use of the mcjCollider plugin, in the days when it was not Mac compatible and today i may update my script's thumbnailed index which hasnt been done in an embarassingly long time though the left-side menus are current https://sites.google.com/site/mcasualsdazscripts9/
  • barbultbarbult Posts: 24,358

    I tried the deforce High Resolution (subD) Bang Bob hair again with the Romi Headcloth. That headcloth is very asymmetrical where it meets the head. However, I was able to get surprisingly good results. I dialed a couple headcloth morphs a little bit to get a slightly better fit around the head. I never could have achieved anything close to this without your collider and script. It is great! The latest version of the script handled changing the resolution to base and back to my selected resolution just fine. I was able to save the scene ane  reopen it just fine, too.

     

     

    Dailia Granny Nightgown Tassel Brown Bang Bob High Res Romi Headcloth_002.jpg
    1600 x 2000 - 2M
  • mCasualmCasual Posts: 4,607

    i didnt try it but for difficult cases you could change the name of the morph in the script's UI and add a second fit-morph 

    when you run the script a second time, if you leave the morph name as-is, you'll notice the script starts by zeroing the existing morph, then it creates the new one and sets its strength to 100%

    if you change the morph-name, the existing fit-morph will be left at 100%

    and the script will create a new morph that further fits the hair

     

    barbult said:

    I tried the deforce High Resolution (subD) Bang Bob hair again with the Romi Headcloth. That headcloth is very asymmetrical where it meets the head. However, I was able to get surprisingly good results. I dialed a couple headcloth morphs a little bit to get a slightly better fit around the head. I never could have achieved anything close to this without your collider and script. It is great! The latest version of the script handled changing the resolution to base and back to my selected resolution just fine. I was able to save the scene ane  reopen it just fine, too.

     

     

     

  • barbultbarbult Posts: 24,358

    That is an interesting idea. Do you mean I could change the position of the plane and run it again with a new morph name? I may try that.

  • barbultbarbult Posts: 24,358

    I'm trying to learn more about using the collider. I tried the script mcjLittleScriptToFixPokeThroughUsingMcjCollider.dsa, but I keep getting errors in the log file. I wonder if this script is too old and some of the functions have been removed or whether I am just using it wrong. I don't see any instructions particular to this script, so I am trying to follow the generic instructions in the collider manual.  This is what I see in the log:

    2019-02-18 16:56:38.740 Loading script: N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/mcjLittleScriptToFixPokeThroughUsingMcjCollider.dsa
    2019-02-18 16:56:38.740 WARNING: Script Error: Line 38
    2019-02-18 16:56:38.740 WARNING: TypeError: Result of expression 'geom.getQuad' [undefined] is not a function.
    2019-02-18 16:56:38.740 WARNING: Stack Trace:
    <anonymous>()@N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/mcjLittleScriptToFixPokeThroughUsingMcjCollider.dsa:38
    2019-02-18 16:56:38.741 Error in script execution: N:/DAZ 3D/Studio/My DIM Library/Scripts/mcasual/mcjLittleScriptToFixPokeThroughUsingMcjCollider.dsa

  • mCasualmCasual Posts: 4,607
    that script is from the days of Daz Studio 3.x starting at DS 4.5 i think it was, they changed from Quads and Tris to Facets So when the script tells daz studio "gimme quad 111", daz studio answer "what yo mean Will Robinson ????" i will upgrade that script soon ( i forgot it existed actually )
    barbult said:

    I'm trying to learn more about using the collider. I tried the script mcjLittleScriptToFixPokeThroughUsingMcjCollider.

  • barbultbarbult Posts: 24,358
    mCasual said:
    that script is from the days of Daz Studio 3.x starting at DS 4.5 i think it was, they changed from Quads and Tris to Facets So when the script tells daz studio "gimme quad 111", daz studio answer "what yo mean Will Robinson ????" i will upgrade that script soon ( i forgot it existed actually )
    barbult said:

    I'm trying to learn more about using the collider. I tried the script mcjLittleScriptToFixPokeThroughUsingMcjCollider.

    Thanks! Can I be so bold as to ask for some simple instructions or illustrations of how to use it? Or are the basic instructions in the manual enough, once the script is updated? The title sounds very useful. 

  • mCasualmCasual Posts: 4,607
    edited February 2019
    i may improve the manual yes, i may do the upgrade this evening. Since i posted the mac version of mcjCollider very recently i want to check mac compatibility on all mcjCollider related scripts and later this spring i'll make mac versions of plugins like mcjWarp which is a sort of 3d sculpting plugin ... i forgot if i made a ds4.5+ version ... yes i did https://sites.google.com/site/mcasualsdazscripts3/mcjwarp
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited February 2019

    That's like the Pro version of the DS3 script, which was more an example for script writers than anything

    https://www.daz3d.com/forums/discussion/310141/mcjpushpullfacet-perform-facet-surgery-movements-right-in-daz-studio

    ppull0.jpg
    800 x 800 - 109K
    Post edited by mCasual on
  • barbultbarbult Posts: 24,358
    edited February 2019

    I haven't tried the new version of push pull facet yet. I wanted to be sure I had the new V3 collider installed and working properly with the "hair under hat", which I know how to use. I ran in to a problem, though. Admittedly, this is a very extreme case. I put Wild Dreads hair (hr2 prop hair) on the RDNA greyling. Because the greyling head is so big, I scaled the hair up and translated it into place. I created a plane 2 ft instead of 1 ft, because the head was so big, I thought 1 ft might not be enough, but it would have been OK. I selected the plane and the hair and ran the script. I used the default values in the script for taper and air gap. When the script finished, the hair is compressed inside the greyling head, both above and below the plane. Does this have something to do with the scaling of the hair, or is something else going on? Thanks for your continued support!

    Edit: I added a screenshot of the hair and plane with the mcjFitHat morph dialed out, so you can see what it started out as.

    Greyling Top Hat Dreads mcj hair under hat.JPG
    2599 x 1517 - 503K
    Screenshot 2019-02-19 15.06.54.png
    416 x 488 - 27K
    Greyling Top Hat Dreads mcjFit Hat 0%.JPG
    2597 x 1652 - 611K
    Post edited by barbult on
  • barbultbarbult Posts: 24,358

    I think my trouble is related to the hair scaling, because I tried another test where I used existing morphs in the hair to make it larger. The result looks much better with the same script settings.

    Greyling Top Hat Dreads hair not scaled before hat fit.JPG
    2362 x 1488 - 415K
  • mCasualmCasual Posts: 4,607
    if you are okay with losing the ability to change/animate the hair morphs, the way you obtain expected results is : un-parent/ unfit the hair, zero its pose, scale it as you want. Hide.everything in the scene except the hair ( i wrote the mcjHideAllBut script for this ) export the hair as a wavefront obj, delete the hair, import your exported hair, parent it to the head and reposition it.
    barbult said:

    I think my trouble is related to the hair scaling, because I tried another test where I used existing morphs in the hair to make it larger. The result looks much better with the same script settings.

  • mCasualmCasual Posts: 4,607
    if you are okay with losing the ability to change/animate the hair morphs, the way you obtain expected results is : un-parent/ unfit the hair, zero its pose, scale it as you want. Hide.everything in the scene except the hair ( i wrote the mcjHideAllBut script for this ) export the hair as a wavefront obj, delete the hair, import your exported hair, parent it to the head and reposition it.
    barbult said:

    I think my trouble is related to the hair scaling, because I tried another test where I used existing morphs in the hair to make it larger. The result looks much better with the same script settings.

  • barbultbarbult Posts: 24,358
    edited February 2019

    Here is my top hatted alien with wild dreads. Not too bad for ancient stuff. I probably could have found a nicer hat.

     

    Geryling Top Hat Dreads_003.jpg
    1600 x 2000 - 834K
    Post edited by barbult on
  • carrie58carrie58 Posts: 3,987

    I is lurking and learning...

  • barbultbarbult Posts: 24,358
    mCasual said:
    if you are okay with losing the ability to change/animate the hair morphs, the way you obtain expected results is : un-parent/ unfit the hair, zero its pose, scale it as you want. Hide.everything in the scene except the hair ( i wrote the mcjHideAllBut script for this ) export the hair as a wavefront obj, delete the hair, import your exported hair, parent it to the head and reposition it.
    barbult said:

    I think my trouble is related to the hair scaling, because I tried another test where I used existing morphs in the hair to make it larger. The result looks much better with the same script settings.

    You mentioned exporting to obj before. It totally slipped my mind. I needed to hear it again. In this case, switching from scaling to internal morphs worked out OK for me. I hope I remember the Obj trick next time I see something funny.
  • lukon100lukon100 Posts: 809

    Does it require dForce?

    Does it work with non-fitted (or is that "non-conforming") hairs?

    I often use a hair without "fitting" it to the character. So I was wondering whether this scrip could even get such non-fitted hairs under a hat.

Sign In or Register to comment.