Sun, Oct 6, 6:28 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Scripts for dynamic clothing...


blackbonner ( ) posted Wed, 26 July 2023 at 4:14 AM · edited Sun, 06 October 2024 at 6:28 AM

Hi, I recently found an dynamic clothing item in the store that comes with a script for better/faster simulation in the cloth room. My question would be, if someone could explain to me how such script's work.

I created a  dynamic jacket for LaFemme and wanted to have the possibility to change which button of the jacket is open or closed. I tried it with the on-board Tools in Poser, but it was to complex and difficult to use.

After reading about those script's I thought I could get my project back on track this way.

I'm a complete black page when it comes to python script so I would appreciate if someone could show me at least where to start.


jancory ( ) posted Wed, 26 July 2023 at 7:41 AM

The sim script was probably produced with this tool https://www.renderosity.com/marketplace/products/149763/easy-simulation-script-generator

it makes dynamics really simple for the end user.

as for the buttons things, better minds than mine will have to help.  i think odf did something like this for one of his antonia outfits.


lost in the wilderness

Poser 13, Poser11,  Win7Pro 64, now with 24GB ram

ooh! i guess i can add my new render(only) machine!  Win11, I7, RTX 3060 12GB

 My Freebies



blackbonner ( ) posted Wed, 26 July 2023 at 2:15 PM

Thanks, this is helpful. The tool sounds interesting. I'm using Poser since version 5 but I never thought about writing a script. Seems like time to learn something new, right?



jancory ( ) posted Wed, 26 July 2023 at 3:23 PM

new skills are always good.

i can usually hack a script but can't write one from scratch.


lost in the wilderness

Poser 13, Poser11,  Win7Pro 64, now with 24GB ram

ooh! i guess i can add my new render(only) machine!  Win11, I7, RTX 3060 12GB

 My Freebies



FVerbaas ( ) posted Sun, 30 July 2023 at 3:07 PM
Forum Coordinator

Changing open/close button could be done via Python but it would mean messing around with geometry so it would be very specific for that garment. 

You would have to know the vertex numbers to add the polygons that make the connection. Maybe it is easier to build in all the connecting geometry (build with all buttons closed), and make the connecting polys a group per button. You can then easily delete the polygons of the connections you want 'open'. You can do that in the group tool. No need for Python, but of course that action can be scripted.

Remember: Clothify only AFTER you made the geometry changes. The cloth room uses a copy geometry and geometry changes you make to the original may/will not be carried to the copy. 


blackbonner ( ) posted Mon, 31 July 2023 at 8:38 AM

@ FVerbaas, thank you for your response.Your solution sounds like something I saw in an very old dynamic cloth for V3.
The fellow who created it (SVDL is the name of the items folder) made 16 items to chose from, each with a different amount of buttons open or closed.

My initial idea using a script was to have those constrained groups saved to the library, like poses or props, it but seems not possible.
I went back to Blender and made separate material groups for each button to address them as individual constrained.
That made the selection part easier, but I couldn't figure out how to have more then one constrained group at a time and I didn't see how I can save them.
So, it seems that I have to go back to Blender and detach each button and save each step as a morph.
Your last hint means also I have to add a morph before the clothing item gets clothifyed, do I understand that right?
This was very helpful, thank you very much.


FVerbaas ( ) posted Tue, 08 August 2023 at 2:45 PM
Forum Coordinator

What I meant is that you make the clothing model with polygons that provide the structural connection a closed  button would provide, so bridge between two vertices of the button base stitches and two vertices of the button hole, and define groups named say 'button 1 closure', 'button 2 closure', etc. These groups then to contain each the polygon(s) representing the closure of their button. 

In the group tool you can select easily the groups, and hence the polygons, representing the closure of the buttons you want to open, and then delete the polygons, thus breaking the connection. It is not a matter of morphs, and when done properly it will not change the vertex numbering. The only change is there are a few polygons less. 

Zippers you could do the same way, defining a narrow row of polygons connecting the two sides. You could then box-select the polygons not to be deleted. Obviously this will not move the zipper, but that can not be avoided.

 

 



blackbonner ( ) posted Sat, 26 August 2023 at 7:40 AM · edited Sat, 26 August 2023 at 7:40 AM

@FVerbaas, thank you for the explanation. Sorry for my late response, I was on vacation until yesterday.
I will check out what you have suggested as soon as I have installed and tested the new Poser Version that came out during my absence.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.