EZCloth Settings

  • @amethystpendant said in Product Suggestions...:

    @eclark1849 said in Product Suggestions...:

    @amethystpendant Amanda, unfortunately I don't know Python myself. Frankly, I'd like to redesign everything so that it would open up as a window panel that would let me select or input a new setting.

    You mean you want EZCloth :) Might take me a bit longer but I love a challenge, I'm guessing you want to be able to select a preset from a drop down and have it applied to which ever sim is active and whichever dynamic group is selected. I'll look at some of @Snarlygribbly's code and see what I can come up with.

    I'd also like to be able to select specific sims to run rather than just current or all so if I can I might have a go at that as well


    It did take me a while but I am now ready for alpha testing EZCloth Settings
    I named it this because I totally ripped off @Snarlygribbly's EZDome code (which he released to the world! I didn't try dipping it in acid as suggested but I came close!)

    What it allows you to do is create presets of cloth settings and then apply them to a current simulation. I've emailed PhilC to ask if he minded me including his material room preset values, but I haven't heard back yet so I can't release it generally yet, but if anyone would like to test it I'll be more than happy to send you the current release.


  • Here's a screen shot

  • This post is deleted!

  • @ghostship Oh well, I "replied" to the wrong person. Ooops.

    Anyway, I'm with Ghosthip . . . very cool. ~smile~

  • Poser Ambassadors

    @amethystpendant Is this script in EZ skin? I don't have it.

  • @Ladonna No it is a totally separate app to EZSkin and was based off @Snarlygribbly's EZDome app. I basically used his layout and config manager code to create my own functionality. Do you want a copy?


  • Poser Ambassadors

    @amethystpendant Yes, please :)

  • Okay, let me knock up some basic user notes (I'll remove the PhilC defaults as I haven't heard anything from him.)

  • Poser Ambassadors

    @amethystpendant Okay, thank you so much :) Very much appreciate your effort.

  • The purpose of EZCloth is to be able to store / apply presets of parameters for use in Poser's Cloth Simulator.

    The code is based on that created by @Snarlgribbly for EZDome which he kindly put in to the public domain and I completely ripped off!

    Save the EZCloth.py file either in your scripts menu, or anywhere on your hard drive

    So how do you use it.

    If it is in your scripts menu simply select it from there, if not go File: Run Python Script, browse to where you stored it and double click.

    You have to be in the cloth room to launch the app, if you leave the cloth room the window will vanish but return if you go back to the cloth room.

    Because of limitations in the Python implementation of Poser's cloth simulation api you need to select the Actor you are going to apply the settings to. In poser if you are in the cloth room and have multiple simulations, if you select an actor (dress, skirt etc) that is in a simulation, Poser goes to that simulation. Python can only apply settings to the current simulation and the current dynamic group, so if you have more than one dynamic group you need to select the one you wish to apply your settings to in Poser's window.

    Once you have the Actor, sim and correct dynamic group selected, simply select one of your presets, amend as required, then click the heart shaped icon on the toolbar to apply (Top left). You will be asked to confirm that you have selected the actor (this is so I can find the correct sim, as there is no "SelectedSimulation" in the API.) If you choose no, nothing happens, if you choose yes your settings are coppied to the simulation. For some reason a call to Poser's Redraw does not refresh the settings. I therefore change the selected Actor to be the Ground and then reselect the previously selected actor and that does refresh the settings.

    To save your current choices as a preset simply click the "Add" button, choose a name and it is saved. Similarly to delete a preset, select it then hit the Delete button. If you want to change the values for a previously saved preset, make the changes and hit the "Update" button.

    There are 2 extra settings "Cloth-Cloth Force" and "Cloth Bend Rate" that are not exposed via Poser's GUI. They both deal with how cloth interacts with itself during a simulation. The Cloth-Cloth Force increases the force trying to stop cloth intersecting itself. It goes from 0 to 1000. Poser defaults this to 10. Cloth Bend Rate limits the amount a poly can bend in relation to it's neighbour. It runs from 0 to 1 and poser defaults it to 0. Both these settings help with larger density meshes where the fold resistance is low. I generally set them to 980 and 1. I haven't noticed a particular slow down when they are used but the results are certainly worth setting them, though your mileage may vary.

    Clicking on the gear on the tool bar will ask if you want to load defaults, currently there is only one and it matches the default for Poser so not very useful, I might add more in the final release.

    Please let me know of any bugs and I'll do my best to fix them, probably a post to this thread would be best.

    Hope it helps some people, and if it does please let me know.


    Download the app

  • Poser Ambassadors

    @amethystpendant OMG, this is awesome. Thank you.

  • @amethystpendant

    Thanks Amanda, will do few tests later on

    Thanks, Jura

  • @amethystpendant
    Very interesting that is!!
    I never thought of the possibility to use Snarly's EZxx approach for cloth.

    Looking at the settings in the Python manual I note there is an provision for separate properties in u- and v- direction:

    The Bend Rate parameter operating on the U coordinate axis.
    The Fold Resistance parameter specifies the resistance to out-of plane bending (folding). The UBendResistance code specifies the U coordinate axis of the Fold Resistance parameter.
    The Scale parameter operating on the U coordinate axis.
    The UseEdgeSprings parameter sets whether or not the cloth will use edge spring calculations.
    The Stretch Resistance parameter specifies the cloth’s resistance to in-plane bending (stretching). The UStretchResistance code specifies the U coordinate axis of the Stretch Resistance parameter.
    The Bend Rate parameter operating on the V coordinate axis.
    The Fold Resistance parameter specifies the resistance to out-of plane bending (folding). The VBendResistance code specifies the V coordinate axis of the Fold Resistance parameter.
    The Scale parameter operating on the V coordin ate axis.
    The Stretch Resistance parameter specifies the cloth’s resistance to in-plane bending (stretching). The VStretchResistance code specifies the V coordinate axis of the Stretch Resistance parameter

    It could be worth while to separate them. Clothing models made in Marvelous Designer come with a .xml file giving the physical parameters of fabrics (= materials) used, separate for U and V direction, scale parameters; the whole shebang.
    I never included this datafile in my published products because they had no use. This may change it.

    If the scale parameter is what I think it is and represent shrinkage, it would be the mechanism I used in MD for making the Prefitter object.

    Very interesting!!

  • @F_Verbaas Hi, although they are separated Poser only passes through (ISTR the U versions) I tried when I first looked at this many years ago setting them differently but it made no difference and some like U/VScale have no effect at all, the only 2 I found that did have an effect were the CLOTHCLOTHForce andU/VBendRate which I have exposed in my tool.

  • BTW I've only tested this on windows, but on that platform it appears to work in Poser 11 and Poser 2014

  • @amethystpendant
    It would seem strange to make a function that does not do anything. When it is provided for compatibility that should be noted in the docs.
    Was this confirmed by support?

  • @F_Verbaas said in EZCloth Settings:

    It would seem strange to make a function that does not do anything. When it is provided for compatibility that should be noted in the docs.
    Was this confirmed by support?

    Have you ever tried contacting support at SM? You have access to the code, add the split for the U & V as I said it was a long time ago that I tested it.

  • @amethystpendant
    They usually are/were? responsive to me, but yes, I can hack the code.
    Not sure if the new crew has the knowledge so I may need to try it out myself.
    Had already planned to do so but if you had confirmation the V-variants are not working (yet)/are not transferred to the simulator (yet) I could have saved myself the trouble.

  • @F_Verbaas I believe they never were implemented, Max did in their implementation but Poser didn't, and lets face it cloth sim has not had ANY work done on it from when it was first released and was at the time amazing, now not so much. It's the one thing I REALLY hope is addressed in the next release of Poser. If all they have are new rigging tools (which I don't use) or new characters (which don't deserve to be used) then I doubt I will upgrade to the next release, I only went to P11 because of Superfly.

    The cloth sim and render engine are what I use. I make my own clothes in Blender and sim them in Poser as the cloth sim in Blender, although very flexible doesn't come up to snuff yet, if it did, I would pose in Poser, export to alembic cloth sim and render in Blender.

  • @amethystpendant
    Having different stretch parameters does have an effect, but more complicated than one would expect.

    Below is the standard hgh density cloth pane, secured by the top row of vertices as 'choreographed'.
    The stripes in the cloth are parallel to v-direction.

    I tweaked the code so the u-stretch-stiffness is as specified (here default 50) vstretch-stiffness set to 0.1
    Result is non-symetry!!!
    The sim was 300 frames and the end result was stable.

    I think the problem lies with the shear springs, the difference in stiffness and the fabric being ordered quads. Will see what happens with a Delaunay triangulation.