mcjShrinkWrapA for DS 4.5+ shrink wrap figures and objects - SAFE 2019 Update

124

Comments

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    COOL BEANS> looking forward to seeing this implemented! :-)

  • mCasualmCasual Posts: 4,607
    edited August 2013

    now that i'm back from the aiko-shoe-making detour

    i'll resume work on the shrinkWrapper script or plugin

    here you see in blue the profile of ... something wrapped onto something

    and in magenta, the convex hull that is supposed to give us a tent / spandex effect

    --- the second image clarifies the situation

    the line in green would be like a cloth stretched on top of the something

    and the line in magenta would be a hammoc on which the something lays

    ----

    and you know what all this reminds me of ? .... this ... http://www.youtube.com/watch?v=AOiuh2Upa8s

    ---

    Turns out what i want has a name, it's called Andrew's Monotone Chain Algorithm

    http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain

    testsheet3.jpg
    1280 x 447 - 86K
    testsheet2.jpg
    686 x 822 - 82K
    testsheet.png
    1280 x 720 - 85K
    overunder.jpg
    863 x 424 - 43K
    coberit.jpg
    863 x 424 - 43K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    My head hurts from the technical stuff! lol Still watching and hoping you can get all this working even better than before. :coolgrin:

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RAMWolff said:
    My head hurts from the technical stuff! lol Still watching and hoping you can get all this working even better than before. :coolgrin:

    some progress! i caught the moon in a net

    not there yet but that's progress, the curve shows how the "spandex" part of the script would treat a cloth shrink-wraped onto a ball+floor

    spidermoon.png
    800 x 900 - 287K
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Very nice but do you think there is a way to even out the curvatures where the verts on the ground are more gradual up to the verts where they are more populated on the moon ball??

    Looking at your dialog your working in what would happen if you spaced out the dots more evenly from the ground to where that first dot is up on the curve on either side??

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RAMWolff said:
    Very nice but do you think there is a way to even out the curvatures where the verts on the ground are more gradual up to the verts where they are more populated on the moon ball??

    Looking at your dialog your working in what would happen if you spaced out the dots more evenly from the ground to where that first dot is up on the curve on either side??

    i had an experimental version where, as a last step, i reconstructed the curves/loops by first measuring the loop. then spreading the vertices at constant distances, i could add that as an option.

    but this wont affect the shape of the curves which are like rubber-bands under tension

    it's not a simulation of an elastic knitted cloth, in fact for now its just rows or columns of rubber-bands along one axis

    when i'll combine 2 axis it should give interesting results

    one thing i may also do is a tapering effect based on something like the D-Form's weights

    in the distant dream future i'd like to add semi-random wrinkle/folds in the areas that are not in contact with the wrappee

  • mCasualmCasual Posts: 4,607
    edited August 2013

    RAMWolff said:
    Very nice but do you think there is a way to even out the curvatures where the verts on the ground are more gradual up to the verts where they are more populated on the moon ball??

    Looking at your dialog your working in what would happen if you spaced out the dots more evenly from the ground to where that first dot is up on the curve on either side??

    oh but actually in the script, ( my laboratory version, that is ) presently, there IS a system that "re-populates" the curve, it's just that in the previous plot they were not computed , but in a forum post before that one you could see how the curves had the same number of vertices at the end of the process

    so it would look more like this

    repop.jpg
    723 x 343 - 27K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Ooo, now were talking! That's lovely!

  • mCasualmCasual Posts: 4,607
    edited August 2013

    Fig 1 - a momentous event, the first time the script came up with an acceptable rubberband effect for ribbon/plane wrappers
    Fig 2 - corrected interpolation issue
    Fig3 - complex case
    Fig 4 - improved
    Fig 3 - stuff to look into

    mouse.jpg
    1128 x 642 - 347K
    improv.jpg
    1136 x 644 - 125K
    netted.jpg
    1078 x 808 - 183K
    second.jpg
    850 x 638 - 167K
    momentous1.jpg
    840 x 630 - 169K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    This is just awesome! WOW!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RAMWolff said:
    This is just awesome! WOW!

    had some fence issues to solve ( is a flat line concave or convex? asked the computer )

    next time i should have the first example of lets call it a spandexish mesh

    fence.jpg
    1280 x 720 - 648K
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    WHOA, that's looking perfectumundo! Getting the shrink wrap to work over many areas of the body will greatly benefit from the new improvements.

  • patience55patience55 Posts: 7,006
    edited December 1969

    Still here too. Haven't got a clue how you do all that, but it looks like it'll be fun to play with ... web wires, forcefields, ...

  • mCasualmCasual Posts: 4,607
    edited August 2013

    Still here too. Haven't got a clue how you do all that, but it looks like it'll be fun to play with ... web wires, forcefields, ...

    i think my characters are getting tired of the spiderman tests but they wont mind having new clothes done with it

    aikomiku.jpg
    920 x 528 - 94K
    spidergreen.jpg
    1920 x 1080 - 499K
    Post edited by mCasual on
  • patience55patience55 Posts: 7,006
    edited December 1969

    Casual said:
    Still here too. Haven't got a clue how you do all that, but it looks like it'll be fun to play with ... web wires, forcefields, ...

    i think my characters are getting tired of the spiderman tests but they wont mind having new clothes done with it

    Okay :-)

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    That last one with the kick is just unbelievable. WOW!

  • mCasualmCasual Posts: 4,607
    edited August 2013

    another lab test which was a good idea since it let me discover a tiny rarely ocuring bug in the phase where the script discovers the architecture of the wrapping cloth

    ( it holds in place using nanotechnology )

    nanonano.jpg
    800 x 1200 - 387K
    planebustier.jpg
    800 x 1200 - 219K
    AABB.gif
    533 x 800 - 110K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    I like the third image with the red as the verts look more nicely spread out under the breast area! Perhaps there is a way to include a spreading smoothing option to make sure tighter areas won't get bunched up??

  • patience55patience55 Posts: 7,006
    edited December 1969

    Considering the hours I just spent trying to get a uvmap in Hexie for that area "presentable" ... WANT!!!!!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RAMWolff said:
    I like the third image with the red as the verts look more nicely spread out under the breast area! Perhaps there is a way to include a spreading smoothing option to make sure tighter areas won't get bunched up??

    to get this result, i made a first shrink pass, then i decimated and subdivided the bustier/shield
    then i re-shrunk it

    maybe there will be "rebuilding " of the curves to spread out the vertices ... maybe soon maybe later :)

  • mCasualmCasual Posts: 4,607
    edited December 1969

    didn't advance the script but i made a little demo video !

    http://www.youtube.com/watch?v=mpC8fFnq8vg

  • patience55patience55 Posts: 7,006
    edited December 1969

    Casual said:
    didn't advance the script but i made a little demo video !

    http://www.youtube.com/watch?v=mpC8fFnq8vg

    ? would there be a better result for the box if it was tessellated a lot ... like the sphere was?

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Yea, exceptional examples but the box was a little weird.

  • mCasualmCasual Posts: 4,607
    edited December 1969

    Casual said:
    didn't advance the script but i made a little demo video !

    http://www.youtube.com/watch?v=mpC8fFnq8vg

    ? would there be a better result for the box if it was tessellated a lot ... like the sphere was?

    the wrapper is projected onto the wrapped objects at a perpendicular angle from the wrapper plane (normals )
    some collider rays hit the box others hit the floor, then the script pulls them back a little - to reduce poke-trough
    but in this case the poke-through is as tall as the box so it doesn't work, then the spandex effect is (optionally ) applied
    and this too isn't enough to solve the poke through

    to really really solve poke-trough, the script would check each one of the 4096 edges of the wrapper plane and move them so that they
    don't pierce the cube .... but i'd leave that for later

    for now the air-gap is enough to fix poke-trough enough to help make clothes for figures

    makeitsonumberone.jpg
    1280 x 720 - 58K
  • mCasualmCasual Posts: 4,607
    edited August 2013

    by pre-shrinking the wrapper plane and using a larger air-gap we get rid of the poke-trough

    note here that the spandex / rubber-band effect is still only along 1 axis but should be available along 2 axis

    ph1c.jpg
    1280 x 720 - 298K
    ph1a.jpg
    1280 x 720 - 353K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Very nice. Perfect even!

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    You know, it occurred to me that perhaps you might actually develop a dynamics engine for DAZ Studio that can take simple obj's and drape them and then work up to more complex or outfits that were previously made. One of the factors that is gravely missing from DAZ Studio is a way use common and complex shapes to drape at the end users convenience rather than relying on that other system (which to me is too limiting).

  • mCasualmCasual Posts: 4,607
    edited August 2013

    an important step for the script ( though i was holding it by the hand )

    the sort-of-spandex effect along 2axis

    the the script does

    - push the cloth against the cube, as if it was a wet t-shirt

    - stretch the cloth fibers along the X axis

    - stretch the cloth fibers along the Z axis

    ----------
    Figure 2
    maybe the essence of this script is cup / hat / tent making

    tent.jpg
    1280 x 720 - 570K
    importantstep.jpg
    1280 x 720 - 469K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    a first garment-ish result with the 2 axis sort-of-spandex effect!

    garment-panel.jpg
    800 x 1200 - 276K
  • patience55patience55 Posts: 7,006
    edited December 1969

    Oh that's going to be popular!

Sign In or Register to comment.