Mon, Nov 11, 9:29 AM CST

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: How can I introduce "illogical" steps in a Python script?


numanoid ( ) posted Fri, 10 October 2003 at 6:37 PM · edited Sat, 02 November 2024 at 12:04 PM

OK, I have written a fantastic new script for Michael, but I need some help to convert the script for Vickie.

My problem is this. Python, like most programming languages is a logical progression of steps, and I need to find a way to introduce illogical steps into the script.

Let me explain what the script does and why I need to introduce illogical steps.

I have written a script that lets Michael choose what clothes to wear, depending on the scene in which I place him. For instance, if I place Michael on the bridge of a star ship, he will automatically be imported with a complete sci-fi outfit, helmet and weapons and accessories from my clothing and props library. If I place Michael in water, he will appear in the scene in a wet suit with flippers and a diving mask. The script chooses the most appropriate clothing and accessories according to certain parameters such as the scene file name, the amount of light, the names of props in the scene and other factors too numerous to explain here.

The problem is that when I apply this script to Vickie it stays logical. A real woman placed on the bridge of a space ship would be imported wearing high-heeled boots, and not magnetic soled shoes. A real woman placed in water would appear dressed in a bikini with sunglasses on, not in a wet suit. And looking at the artwork in the galleries it seems like a real woman placed in a medieval combat situation will be imported barefoot wearing a chain mail bikini and a veil, as opposed to combat armour and fur boots.

So I need to find some way of introducing illogical steps into the script to artificially copy the thought processes of a real woman. If anybody has any ideas let me know. If anyone wants to have a look at the script just leave a message and I will e-mail it to you.

Please note that no poser characters were harmed during the writing of this script.


Orio ( ) posted Fri, 10 October 2003 at 6:58 PM

Thousands of years of human history, and nobody could even get close to start beginning to understand the mind of women... and you pretend to lay all of it's laws down and write them on the stone of a Python script? :o) Tsk.... ;-) (just kidding eh!!!) 8-)


Literata ( ) posted Sat, 11 October 2003 at 1:08 AM

I'm not sure that what you're describing is a 'logical-vs-illogical' thing, so much as your own preferences (e.g., it's not strictly illogical for a woman in the water to choose to wear a wetsuit). What you could do is to emulate those rule-based engines that were popular a few years ago. The idea is to give the appearance of randomness through a sufficiently large set of alternate options. Try this approach: First, build multiple lists of selections appropriate to each location. For example one set of selections for the 'water' location might be: Bikini Sunglasses Another set could be: Swimsuit Bathing cap And yet another: Wetsuit Fins Scuba mask Build enough lists to give a as much a feel for 'controlled randomness' as you want to achieve. Let's say you're able to come up with 10 such lists for each location. Second, Consider your locations as offsets: Starship Bridge: 0 At the beach: 10 In Midieval Combat: 20 As a Vestal Virgin: 30 and so on. Now, select your location (either randomly or by menu or whatever), and the sub-index of the appropriate selection (0 to 9). That number, ranging from 0 to 39 in this example, points you to a set of selection items. With enough lists (and enough variation, like 'red bikini' or 'blue swimsuit') you can easily create the appearance of randomness without winding up with such things as 'wetsuit and sunglasses.' Anyway, good luck -- it sounds like a pretty cool undertaking!


ockham ( ) posted Sat, 11 October 2003 at 9:30 AM

Ditto Literata. Real [sane] humans, whether male or female, are never illogical or random in their choices .... it's just that their desired goals differ widely. Maybe you could set up a few basic personality axes, like risk-taking vs risk-averse and vain vs drab, and then figure out where each of your clothing items, and each color, belongs on these axes. Then you'd have a wider set of personalities than simply male vs female, and more permutations.

My python page
My ShareCG freebies


numanoid ( ) posted Sun, 12 October 2003 at 1:08 PM

Please stop!!!! The original post was meant to be a joke that I wrote after watching my girlfriend choose an outfit to go hiking in. I personally think it would be impossible to write a script like that. PS. I hope no members where injured in the posting of that script message.


ockham ( ) posted Mon, 13 October 2003 at 8:02 AM

Ah. I had the sense you were really thinking of a game-generator, but describing it obliquely to avoid giving too many ideas. This is what happens when you toss a joke into a cage full of programming types, who are accustomed to thinking of everything as possible until solidly proven otherwise!

My python page
My ShareCG freebies


Literata ( ) posted Mon, 13 October 2003 at 12:33 PM

And I'm working on my version of the script right now!!


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.