Sat, Nov 23, 11:54 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)



Subject: Experimental Poser #5 - Poses Without Posing (Sneak Peek)


bushi ( ) posted Wed, 11 February 2004 at 3:02 PM · edited Sat, 23 November 2024 at 11:52 AM

file_98119.jpg

The pose in the image is pretty simple but interesting since I didn't create the pose. It's the work of a new script currently in the works. The script is called PoseGenie. PoseGenie is the result of wanting a better way of creating poses besides sitting for hours twiddling dials. With PoseGenie, all that is required is the placement of three sphere props and the setting of rotation limits on the joints of the body parts used in the pose. The underlaying principle is pretty simple. One of the props (the Seeker) is parented to a body part and another prop (the Target) is placed where you want the Seeker to end up. A list of limits defines which body parts are involved in the pose and how far they can rotate. The script then tries to move the Seeker to the Target with the lowest number of total degrees in the rotation of the joints. The script makes repeated attempts at getting the Seeker to the Target and then scores the attempts. The poses that get the Seeker closer to the Target with fewer joint rotations are scored higher and are used as the basis for new poses in later attempts. Over many attempts, the script zeroes in on a pose that solves the problem of getting the Seeker and Target together with the fewest rotations possible. To do this, the script uses a genetic algorithm. (more)


bushi ( ) posted Wed, 11 February 2004 at 3:03 PM

OK, this is going to get a bit deep but it is necessary to understand how PoseGenie does what it does. A genetic algorithm is a method of arriving at a good solution for a problem that has a very large number of possible combinations. As an example, take the "nose touch" problem in the first image. There are a very large number of possible joint rotations involved in getting the Poser figure to touch the tip of a finger to it's nose. If the pose only uses the collar, shoulder, and forearm and you limit the rotations to whole numbers for -360 to 360 you get: 720 (integer degrees from -360 to 360) times 3 (x, y and z rotations) times 3 (number of body parts) = 6,480 combinations Only a very few of those 6,480 combinations are going to actually get the finger close to the nose. An even smaller number will look good since most will contort the limbs into un-natural configurations. But in fact, the number of possible combinations is much larger since Poser doesn't use whole number increments in the rotations. With just three places after the decimal you've now got: 6,480 times 1,000 = 6,480,000 possible combinations Granted, in most instances you wouldn't have a situation here all the joints could rotate from -360 to 360 but regardless you'd still end up with a very large number of possible combinations. Finding possible solutions when dealing with a very large number of combinations can be a daunting task. A genetic algorithm is useful in situtions like this because it can sift through the possible combinations and arrive a good solution (though not always the best solution). It does this by simulating the processes that living organisms use to pass on genetic traits. (more)


bushi ( ) posted Wed, 11 February 2004 at 3:06 PM

file_98120.jpg

One mechanism of reproduction in living organisms involves the transfer of genetic material from one individual to another. The genetic material cares instructions for re-creating the physical traits of the individual involved. These traits are coded in the form of chromosomes which are composed of long strands of DNA. The chromosomes themselves can be broken down into shorter sections called genes. You can think of each gene as a container carrying the blueprint for a single characterist.

A GA (I'll be using GA for genetic algorithm from now on) uses this concept of chromosomes and genes as a mechanism for solving problems. The image is of a slightly different pose created using PoseGenie. The print window on the right shows the chromosome that was the best solution found when the script was run. You'll notice that down in the listing there is a section titled Genes. Each gene is composed of a body part name, a rotation name and a number that represents the number of degress for the named rotation. I'll get into how PoseGenie uses the chromosome later. I just wanted you to have an idea of what a GA chromosome looks like.

Typically, a GA will start by creating a number of chromosomes with values for the individual genes selected at random. This first set of chromosomes is the first generation of chromosomes. It then uses a fitness function to grade how well each individual chromosome performs at solving the task. Figuring out what the fitness function should test for is one of the more difficult tasks when building a GA. After all the chromosomes are graded, a predetermined number of the fittest chromosomes are selected and saved. Copies of these saved chromosomes are then used in a process called cross-over. Two chromosomes are selected from the most-fit group and the GA goes down the list of genes. At random points through the list, the GA plucks the gene from one chromosome and uses it to replace the corresponding gene in the other chromosome. During the replacement the gene that is being replaced is copied over to the other chromosome. So what you've got is a gene for gene replacement at random points between the two chromosomes. The result is two new chromosomes that have shared characteristics. The new chromosomes are saved and the process is repeated with two different chromosomes from the saved most-fit chromosomes. This process continues till a pre-determined number of new chromosomes are created. (more)


bushi ( ) posted Wed, 11 February 2004 at 3:07 PM

This new group of chromosomes has one other process performed on it called mutation. The GA takes each of the chromosomes and reads through the list of genes. At random, the GA will change the value in the gene. The probability of this change occuring is pretty low though since the GA only makes the change 0.001% of the time. So, what's the point of doing the cross-over and mutate steps? The cross-over step is basically the same as cross-breeding to produce plants or animals with desired characteristics. The mutate step is analogous to the mutation process that occurs in nature. Mutations don't happen very often and when they do the organism is usually worse off for it. Mutations that do work can create an organism or chromosome that is more fit then it's peers. At this point, we have three groups of chromosomes. The the original randomly created group, most-fit group and the group that resulted from the cross-over/mutate step. We're well on the to creating a new generation here but it needs to be filled out a bit. In a typical GA, the number of chromosomes the are selected to be in the most-fit group equals 40% of the original group. Since the cross-over/mutate step created an equal number of chromosomes, we now have 80% of the necessary total. The last 20% is created at random just like the original generation of chromosomes. These three groups are combined to form the next generation of chromosomes. This new generation is then graded using the fitness function and the whole process of most-fit selection and cross-over/mutate chromosome creation is repeated through a pre-determined number of generations. To recap: 1. Create the first generation of chromosomes. 2. Test the chromosomes with a fitness function. Rank according to fitness. 3. Select the top 40% based on rank and save the chromosomes. This is the most-fit group. 4. Use copies of the most-fit group chromosomes to do cross-over and mutation till the number of new chromosomes is equal to the number in the most-fit group. 5. Combine the most-fit group and the cross-over/mutate group then pad with new random chromosomes till the number is equal to the original generation of chromosomes. 6. Go back to step #2 with the new generation of chromosomes. Repeat until the pre-determined number of generations have been processed. 7. Do the fitness function one more time. The chromosome that ranks highest is the fittest of all tested. The result of this whole process is a single chromosome that is the most fit of all the chromosomes created during the time the GA was operating. (more)


momodot ( ) posted Wed, 11 February 2004 at 3:10 PM

Bushi, this is facinating on a purly conceptual level but I am curious also concerning the practical... how long does this script take to run?



bushi ( ) posted Wed, 11 February 2004 at 3:13 PM

file_98121.jpg

OK, if you got through the background stuff then this will be easy. PoseGenie uses 100 chromosomes per generation and cycles through 20 generations. The image shows the pose resulting from the most-fit chromosome for each of the 20 generations in an example run. The Target is the sphere parented to Daisy's nose and the Seeker is the sphere parented to Daisy's finger. The body parts included in the chromosome were Head, Upper Neck, Right Collar, Right Shoulder and Right Forearm. As the basis for the genes that PoseGenie creates, the script reads a file that lists the body parts to include in the genes, the rotations to use for the body part and minumum and maximum limits for the rotations. The reason for needing minimum and maximum limits on the rotations is a result of the script's fitness function. The fitness function scores on how close the Seeker and Target are and the total number of degrees used by all of the rotations. Ideally, a pose will have a very small distance between the Target and Seeker and small total number of degrees. The problem is that a pose that adheres too tightly to the small distance, small degree number principle can look unnatural. In the example image, if the Bend property on the Right Shoulder hadn't been limited to a range of from 50 to 75 degrees then the elbow would have ended up being too high in the final pose. It really isn't necessary to rein in the rotations too hard but a little tinkering can make a world of difference in the result.

As to the pose itself, this is a simple example using just the right arm, neck and head. More complex poses can be developed by breaking the body into sections and using PoseGenie on each section, positioning the Target and parenting the Seeker as necessary.

I was a bit surprised at the runtimes for the script. There's a lot going on in the script but poses like the one in the image usually take around a minute. It's sometimes necessary to run the script 2-3 times to get the best results. Much of how the pose ends up depends on the random selections for the first generation. It is possible that selections for the first generation do not contain the range of joint rotations necessary to give a desirable result even with the cross-overs and mutations. In GA jargon this is called hitting a local minima.

I'm planning on having this available in FreeStuff in another couple of weeks. The main script is solid but I don't like having to edit the text file used to describe the genes so I'm adding that functionality to the script's GUI. This script has taken several months to get in it's present form (with a detour to do the MeasureIt script) so another couple of weeks isn't going to matter. There will also be a PDF file included that has all of this background plus examples of how to use the script.

After PoseGenie is finished I'm thinking of writing a version that will use multiple Targets and Seekers. This one would be specific to creating hand poses (call it HandGenie maybe ... ;) ). Thanks for attention.

Credits:

Daisy figure by Thorne
Messy Hair by the Master Koz


dagar ( ) posted Wed, 11 February 2004 at 3:32 PM

Ah...wow! :)


lucstef ( ) posted Wed, 11 February 2004 at 3:46 PM

Great effort :-) Now you can see why animators are WELL paid by cartoon studios :-D Just a thought: has the target to be close to the body or can it be placed anywere (with reason, obviusly)? And if it is too distant to be reached by the seeker, what's the possible outcome? A perfectly straight arm for example? Or a straight arm not too stright (almost bent), which in final could look more natural? Thank you.


pobble ( ) posted Wed, 11 February 2004 at 3:47 PM

wow! sounds great!


maclean ( ) posted Wed, 11 February 2004 at 3:50 PM

Well, bushi, apart from giving me an enormous headache, you've also manged to impress me no end. It sounds terrific. Coupla questions. Any minimum hardware requirements to run this? Is it Python-based, therefore P5 only? Also, can the target be placed on a second figure, so that, for example, daisy can reach out to touch someone else? Kudos for the amazing work. Thinking out the box is so unusual. mac


Mason ( ) posted Wed, 11 February 2004 at 3:56 PM

Wow! Pretty elaborate. This would probably be real cool for making pose packs. Set up some generic ball locations then fire of N permutations. In fact a script I wanted to make would so something similar where you set the figure in one of your stock poses then fire of a randomizer which would slightly tweak each joint to get a different look. Thanks for sharing. I always enjoy seeing new uses for Python.


jade_nyc ( ) posted Wed, 11 February 2004 at 4:09 PM

that is just too cool! Bushi you're a genius ;)


ynsaen ( ) posted Wed, 11 February 2004 at 4:24 PM

Yes!!! Thanks for getting back to this one, Bushi! This is fantastic! oh, I can't wait to play with it! maclean -- ProPack also supports Python. That was why I first went to Propack. All the other stuff was sorta like a bonus, lol. and Mason -- what have you got going on in your oven of late? Yer no slouch at this sorta stuff!

thou and I, my friend, can, in the most flunkey world, make, each of us, one non-flunkey, one hero, if we like: that will be two heroes to begin with. (Carlyle)


SamTherapy ( ) posted Wed, 11 February 2004 at 4:24 PM

" Bushi you're a genius" I was thinking the same. Very impressive. mac - it should also run in P4PP if it's python based. Pro Pack supports python.

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


FishNose ( ) posted Wed, 11 February 2004 at 4:28 PM

Just..... amazing. Amazing. :] Fish


bushi ( ) posted Wed, 11 February 2004 at 4:31 PM

file_98122.jpg

momodot - If the scene is put into box-tracking mode, it usually takes a minute or two to do a run. In the other tracking modes the run can take quite a bit longer.

lucstef - There is another sphere prop that is placed in the scene when setting up for a pose. The Base is used at the beginning of a run to calculate a maximum distance from the Seeker to the Target. In the case of the above images, the Base is placed in the figure's chest and parented there. It's pretty much a housekeeping issue but gives the script a realistic frame of reference for the distance calculations. The pose that results from a distant Target depends on how the limits on the rotations are set. In the attached Koshini image, the Target was set closer to the sword handle then the left arm could reach. The results still worked well for the pose though. When posing the right arm, the Seeker (the red sphere) was posed onto the sword tip then parented to the right hand. There is a lot of flexability in the script for setting up the relationship between the Target and the Seeker.

maclean - Yes, it's a PoserPython script so should run fine on anything that runs P5 or the ProPack. And yes, you certainly can place the Target on a different figure and have the Seeker track to it. The figure that the Seeker is parented to is just a vehicle for moving the prop. All distance calculations are between the two props and don't involve the figures.


PabloS ( ) posted Wed, 11 February 2004 at 4:36 PM

OMG. Can't wait to take this for a spin.


lucstef ( ) posted Wed, 11 February 2004 at 4:50 PM

Thanks for the explanation. Going to recall infos from my Nuclear Phisic books...just kidding :-)))


Ajax ( ) posted Wed, 11 February 2004 at 5:01 PM

Awesome work, Bushi! Please forgive me, but I'm going to argue with a little bit of your mathematics. In post 2, you said that with three joints and restricting yourself to whole numbers of degrees in your rotations you would have 720 times 3 times 3 = 6,480 posible combinations. The formula should be 720 to the power of (3 times 3) = 51998697814229000000000000 possible combinations, which is a lot larger than 6,480. I would argue that you should use a 360 degree range instead of 720 (180 degrees in either direction is enough to cover the full 360 degree range of movement - no need to have two full circles). Then you wold have 360^9 = 101559956668416000000000 possible combinations, which is a quite a lot smaller, but still much larger than 6,480. If we then allow rotations to be specified to 3 decimal places, we have 360,000^9 = 101559956668416000000000000000000000000000000000000 possible combinations. Of course, this just makes your GA even more impressive and illustrates even more clearly why the GA approach is preferable to trying to test every single combination. Congratulations on some amazing work. This is a wonderful approach to the problem and I can see it's going to be very useful.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


maclean ( ) posted Wed, 11 February 2004 at 5:24 PM

Well, it's OK if it's python. I have poser 5.... even if I've only opened it a couple of times to admire the interface! LOL. Well, I did pre-order it, but only installed it last week. If you can use this between figures, I can see it being great for things like posing figures to look at one another or pointing to another figure. I suppose the target can also be parented to an outside prop too, in which case, you can easily make a figure point a finger at (or give the finger to) something else within the scene. mac


Don ( ) posted Wed, 11 February 2004 at 5:39 PM

8?)


lululee ( ) posted Wed, 11 February 2004 at 6:07 PM

Sounds totally cool.


bip77 ( ) posted Wed, 11 February 2004 at 6:13 PM

"Just..... amazing. Amazing." Yes, it is!


nomuse ( ) posted Wed, 11 February 2004 at 6:17 PM

I saw what you were doing the moment you mentioned genetic algorithms...remembered the work of Karl Sims, for isntance. I'd never thought of using this to arrive at a solution for a static pose! I'm amazed it runs so quickly, too. As for the sort process at the end of each generation, what about a variation that allows the user to pick instead? Thus a guided evolutionary process (shades of creationism!!) That way user input could train the evolving solution in ways that better suited an artistic goal (such as the elbow height issue you mentioned). This is revolutionary. Almost makes me want to run out and buy Pro-pack.


bushi ( ) posted Wed, 11 February 2004 at 6:26 PM

Ajax - (bushi slaps his forehead) No, of course your correct. It's in a 3d space so it would be cubed rather than just a multiple. Thanks for pointing that out! mac - The Target doesn't really need to be parented to a figure at all just the Seeker since that is the prop the GA is trying to get to the Target.


numanoid ( ) posted Wed, 11 February 2004 at 6:47 PM

Wow. Is this genetic evolution or revolution. Really impressive.


catlin_mc ( ) posted Wed, 11 February 2004 at 8:35 PM

I'm astounded at the complexity of your creation bushi and I'm in awe at you figuring this out. This will be one neat tool to use and I can see many possibilities becoming available with it's use. Kudos to you and thank you for making this wonderful script for us lowly poserites. 8) Catlin


nomuse ( ) posted Wed, 11 February 2004 at 8:35 PM

No, no.... Using that original formula of "720 (integer degrees from -360 to 360) times 3 (x, y and z rotations) times 3 (number of body parts) = 6,480 combinations" The problem isn't one of dimensions, it is in calculating the permutations. Take a single 6-sided die. One die has 6 possible positions. Two dice have 36 possible combinations. The answer isn't 6x2; it is 6^2 In this case we have, say, 360 possibilities on three axis on at least three joints (shoulder, elbow, wrist). (360^3)^3 or 360^9 equals 1.016 EE 23 (1 followed by 23 zeroes). If you added finger joints it might be, say, 360^12 and we get up to 4.7 EE 30 (sorry to change notation there; also known as 4.7 x 10^30, or maybe just 4,700,000,000,000,000,000,000,000,000,000 ). That's what Ajax is saying. Number of dimensions doesn't matter per se. It's the difference between multiplying and raising to a power! So be proud -- you've found a way to filter through a much, much greater number of choices than you thought!


bushi ( ) posted Wed, 11 February 2004 at 10:51 PM

nomuse - I'm not saying anymore about the number of possible combinations other then it is very large. Sticking my foot in my mouth twice is quite enough for one day, thank you. ;) As to a "guided evolutionary process" in a way that's pretty much built into the process. With the rotations controlled by max and min limits it's a simple task to alter the range of the results. With it only taking a minute or two to do a run and with the limits being available for change on the GUI, doing multiple runs to tune a pose is a good solution. To everyone that posted - Thank you for your comments and encouragement. Now all I have to do is get the thing finished so it can be put to work! :)


Mesh_Magick ( ) posted Thu, 12 February 2004 at 12:55 AM

Great she's picking her nose again.....


TrekkieGrrrl ( ) posted Thu, 12 February 2004 at 4:12 AM

I don't understand a word of this but it looks like it's something cool. So I too will be waiting to see it and try it for myself :o) Great work! --- Heh now I just feel like when some of my high-educated friends discuss quantum-what-ever-it's-called-physics. You know where you try to not let TOO much fresh air in thru your gaping mouth ;o)

FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
  Using Poser since 2002. Currently at Version 11.1 - Win 10.



nomuse ( ) posted Thu, 12 February 2004 at 4:22 AM

The only reason I understand "raising to the power of" is because I just took my nephew up to the science museum and ended up trying to explain binary to him. I can't handle any math higher than that!


Ironbear ( ) posted Thu, 12 February 2004 at 6:19 AM

Oh cool - millions of broken script generated poses flooding all of the online stores, rather than hundreds of broken hand generated ones. snicker Nice work, Bushi. ;)

"I am a good person now and it feels... well, pretty much the same as I felt before (except that the headaches have gone away now that I'm not wearing control top pantyhose on my head anymore)"

  • Monkeysmell


Dave ( ) posted Thu, 12 February 2004 at 8:53 AM

bm


Indoda ( ) posted Thu, 12 February 2004 at 10:22 AM

"Interesting" ;)

The important thing is not to stop questioning.
- Albert Einstein

Indoda


shadownet ( ) posted Thu, 12 February 2004 at 1:20 PM

Bushi, this sounds awesome. Now correct me if I am wrong, but didn't the B administration ban this kind of research. :O)


BonBonish ( ) posted Thu, 12 February 2004 at 2:30 PM

I am also can not understand the technical part :(... but it seems as a Wonderful work, Bushi!


jwbaer ( ) posted Thu, 12 February 2004 at 7:16 PM

Cool application of GA to a 3D problem. Genetic Algorithms have definitely proven to be great at stochastic optimization over constrained problems with very large search spaces. Have you considered trying to optimize over time as well, for animation purposes? Probably pretty difficult, as the search space explodes even more and a fitness function is probably harder to define. Might make for some interesting research tests though :) -Jeremy


bushi ( ) posted Thu, 12 February 2004 at 10:11 PM

Ironbear - How does that go ... every solution creates it's own problems. ;) shadownet - That's correct. All research work for this script is currently being done at a secret facility in South Korea. jwbaer - There is some optimization that occurs while the script is running. The genes in the new chromosomes that are in the 20% group I discussed above aren't generated like the genes in the first generation chromosomes. The genes in the first generation use the full range of the minimum/maximum limits. From the second generation on, the values for genes from the top 40% group are sorted to find the largest and small for each type of gene. These more limited mininum/maximum ranges are used to generate the new chromosomes to pad out that extra 20%. When I first tried this I was concerned that it might make the GA converge too quickly on a local minima. Fortunately, it is still loose enough to keep that from happening.


shadownet ( ) posted Thu, 12 February 2004 at 10:20 PM

ROFL, yeah and the i on the end confuses folks as to who is funding the research. All bad puns aside, this is very interesting. I am looking forward to seeing more on this.


Ironbear ( ) posted Fri, 13 February 2004 at 12:06 AM

All too true, Bushi. ;) Howya doing, by the way? That's one of the main reasons I came out of [lurk mode] was to say "Hi" - haven't seen you around in freaking ages, man. Well.. that and to twit all the merchants, natch. I mean, you know it's a gonna happen, as sure as rain falls sideways in Texas. ;] I did mean the "nice work" not in a sarcastic way, by the way: that's an impressive technical acheivement, Bushi.

"I am a good person now and it feels... well, pretty much the same as I felt before (except that the headaches have gone away now that I'm not wearing control top pantyhose on my head anymore)"

  • Monkeysmell


Marque ( ) posted Fri, 13 February 2004 at 9:36 AM

So where is this script, will it be for sale or free or available at all? Marque


bushi ( ) posted Fri, 13 February 2004 at 12:39 PM

Ironbear - I didn't take your comments as being sarcastic. I've seen you do that before and this wasn't it! ;) As to where I've been, suffice to say I had some pressing family issues that kept me away for several months. Marque - The script will be in the FreeStuff area in a couple of weeks or so. It currently uses a file to define which body parts are being used and the rotation limits for the parts. I'm moving that into the GUI so that they can be picked and set directly from the script.


Marque ( ) posted Fri, 13 February 2004 at 1:26 PM

Glad to see you back hope everything is going great for you now. Marque


Ironbear ( ) posted Sun, 15 February 2004 at 2:54 AM

"...suffice to say I had some pressing family issues that kept me away for several months" - bushi 'Nuff said. ;[ And... that's a shame. Hope everything worked out well for you and yours? Good to see you back online. You've been missed. Heh. That's the nice thing about old acquaintance: can speak off the top of the head and trust somewhat that the other guy will take it as it's meant, not as it reads. ;]

"I am a good person now and it feels... well, pretty much the same as I felt before (except that the headaches have gone away now that I'm not wearing control top pantyhose on my head anymore)"

  • Monkeysmell


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.