Forum: Poser - OFFICIAL


Subject: Snooker dynamics in Poser

scourge opened this issue on Mar 24, 2004 ยท 91 posts


scourge posted Wed, 24 March 2004 at 5:37 AM

Attached Link: Snooker1.AVI (DivX 5 codec required)

I tried Python scripting a few days ago and when I did I couldn't stop trying it some more. I came up with an ideal gas simulation, with gravity applied to the particles. Then I added friction and the wall and bag coordinates to the script. It works great for a bunch of ball props bouncing off each other.

There's no real collision detection involved, that's why this only works for balls. And currently the balls must have the same mass (and thus be the same size) because the script doesn't yet deal with masses. The balls don't also roll yet, they just slide.

I made the animations by setting two keyframes for the white ball(s) and then running the script, that's it. The scene's current frame and the previous frame are used to calculate the initial movement for the particles.

So, would anyone like to have this (for free) if I made a GUI for it?


scourge posted Wed, 24 March 2004 at 5:41 AM

Attached Link: Snooker2.AVI (DivX 5 codec required)

Here's another video clip. Seems like the groundlevel is set a little too high...

TrekkieGrrrl posted Wed, 24 March 2004 at 6:22 AM

Of course we'll want it :o) It looks great!

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.



Marque posted Wed, 24 March 2004 at 9:50 AM

Oh yes, Poser has come a loooonnnggg way! Marque


scourge posted Wed, 24 March 2004 at 10:16 AM

I'm all excited about the possibilities I have with Python and I've already got too many new ideas. I just wish Poser could offer more codes and methods for the scripts, like a simple boolean variable to indicate collisions. I already made my own "real" collision detection script which calculates a vertice's distance from a triangle (extracted from a polygon) but that's too slow even for low-res objects. Anyway, I'll upload the script soon.


odeathoflife posted Wed, 24 March 2004 at 10:37 AM

Very cool, me likes muchly :) Can't wait to try this, I thought that, from the subject line, that you got solids out of the poser cloth room :)

♠Ω Poser eZine Ω♠
♠Ω Poser Free Stuff Ω♠
♠Ω My Homepage Ω♠

www.3rddimensiongraphics.net


 


stewer posted Wed, 24 March 2004 at 4:33 PM

This is cool :) Looking forward to seeing more scripts from you!


scourge posted Wed, 24 March 2004 at 6:01 PM

Attached Link: Follow1.AVI (2.09 MB)

Stew, you bet you're goin' to see some more scripts, now that I've started. I just made this one which sets a character to follow another character or prop. This is not the perfect walking animation for the mannequin but it works as an example. No walk path or walk designer was used. I don't know if this is good for anything (not to mention the snooker dynamics script) but I enjoy making these.

Still adjusting the dynamics script a little...


TrekkieGrrrl posted Thu, 25 March 2004 at 12:32 AM

Wow that Follow thing looks impressive for sure! So you say the character folows anything that moves without the need of Walkdesigner? (trying to figure out HOW it works) How does that work on 4-legged characters? I'm seeing things like a dog on a leash here.... oh wow. Also was this rendered in Poser? And if so, how did you make that cool fade-to-black on the ground? Transmap?

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.



numanoid posted Thu, 25 March 2004 at 12:42 AM

I want. I am like TrekkieGirl, stamping foot and demanding, I WANT IT. Seriously, it sounds very good.


TrekkieGrrrl posted Thu, 25 March 2004 at 1:45 AM

Hehehe starts stomping again I WANT! I WANT!

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.



numanoid posted Thu, 25 March 2004 at 2:05 AM

Hey, you got explosions, but I got no feedback, and I am still waiting for my NVEIATWAS*. (*Naked Vicky Exploding In A Temple With A Sword) Lol.


scourge posted Thu, 25 March 2004 at 2:38 AM

Okay, here's how the walking script works: it applies a walking animation to a figure, and repeats it to fill the frame range. Then it goes through every frame again, replaces the Hip actor's XTran, ZTran and YRot values according to the target's direction. Just basic vector mathematics. So 4-legged characters should work equally well, if you have a walking animation for them. And yes, the animation was rendered in Poser 5. The fade effect is simple: just check DepthCue_On for the Atmosphere material, set DepthCue_Color to black, background color to black as well, and DepthCue_StartDist to 450 and EndDist to 670.


numanoid posted Thu, 25 March 2004 at 2:45 AM

I am very interested. I am tired of fighting with the walk designer and deskate scripts and feet going through the floor and stuff, so anything that will help is welcome. Um, I am assuming these are freebies?


stewer posted Thu, 25 March 2004 at 3:42 AM

So now combine the two scripts, and you have a neat little crowd simulation :-)


scourge posted Thu, 25 March 2004 at 4:54 AM

Attached Link: Follow2.AVI (374 KB)

These will of course be freebies. The walking script still needs some work but I didn't have any feet going through the floor. You mean figures acting as snooker balls, Stewer? LOL Here's a clip showing figures following other figures. I'll still have to get the feet working. Now they slide a little when turning, I hope I can get that fixed.

who3d posted Thu, 25 March 2004 at 6:15 AM

Hmm... a "flocking" script, esp. if it could be configured to work with "any" characters (bipedal or... otherwise) would be interesting. I wonder if we could get a flock of DAZ gallimimus models flocking across an uneven (hilled) terrain...? (IIRC there's already a super "keep the figure on a ground" type pythonm script, but it might need some work to take account of extra feet and tails?). Typically flocking scripts have sets of simple rules, like "a character should get no nearer another character than X, and no nearer an obstacle than Y" and so on and so forth. Now there's a challenge for ya! Cheers, Cliff


who3d posted Thu, 25 March 2004 at 6:36 AM

Have now actually watched the animations (it helps, I guess). Wow. Ideas that occur to me having watched them. 1. Wow. That might seem like repeating myself, but some things are worth repeating. 2. How about being able to select which frame of the source walk animation is used to "start" a given character? That should make it easier to avoid any "marching band" syndrome. 3. To be able to select a different walk animaiton for each character would be another way of avoiding a uniform look (allows for more variation but more work for the "animator"). 4. If you could include some variations in the "follow" routines you might be able to get surprising results more easily than I initially imagined. For example, if each figure just has it's own "speed" then a collision-avoidance aspect might tend to make the figures walk/run around each other, resulting in apparently complex behaviour. Might have to watch out for the possibility of an infinite loop in trying to ensure figures don't get too close to each other (assuming each figure is moved for each frame, rather than all frames calculated for 1 figure after another - which still might have unforseen "issues"). 5. Wow - even without "keep feet above a custom 'ground' geometry" feature I'm already gagging to try out the results of such a project! Argh! Well done that man :) Cheers, Cliff


scourge posted Thu, 25 March 2004 at 9:13 AM

Attached Link: Follow3.AVI (434 KB)

Well, take a look at this clip. Now the figures keep their distance, there's no "marching band" (because the script can be run at any frame), and the third guy has a different animation and walking speed. The variations to the routines should be quite easy to implement. I don't know if I can get the figure to follow a ground mesh but I'll do something to avoid the sliding feet effect.

TrekkieGrrrl posted Thu, 25 March 2004 at 9:44 AM

scourge, this is totally AWESOME!!! WOW!!

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.



numanoid posted Thu, 25 March 2004 at 8:57 PM

This rocks. A question. Can you habe only one ball as the "leader", or could you have three balls connected to a "sidebar", and each figure following a different ball. This would allow you to have figures walking next to each other. Then putting extra figures behind each of those, you could have a squad marching, for instance. By bending the "sidebar" into a V shape you could have different formations, like planes flying in a V. That is if the script would allow you to have muliple leader objects. Can't wait to play with this.


who3d posted Fri, 26 March 2004 at 4:23 AM

As I understand it (and judging by the animations) yes - in fact I believe each of those figures is following the thing immediately in front of them (which is why they stay in a line). One of my interests will be to set them all following the ball rather than each other, to see them (hopefully) work around each other, try and take short-cuts to where the ball is and be much less apparently organised than follow2 or even follow3. It's looking amazing and WANNA PLAY! Cheers, Cliff


scourge posted Fri, 26 March 2004 at 6:58 AM

Attached Link: Follow4.AVI (572 KB)

numanoid, Yes, each character can follow any object or character. You can have figures walking next to each other, but when they have to turn the row breaks because the distance they have to walk differs. So you could have an army walking straight but turning would be a problem, unless I do some changes to the script. Currently the script only walks one character at a time but it's probably a piece of cake to make it affect multiple characters at the same time. who3d, Yes, the guys are all following a different target (either the guy in front or the ball). Currently they can't take short cuts or avoid objects, other than stop when there's someone on the way (like in the video clip). I'll try to create some kind of simple path finding routine. I'm also working on the animation because the default walking anim doesn't work when a character stops or slows down.

who3d posted Fri, 26 March 2004 at 6:17 PM

Don't get me wrong - what you've done is simply superb. I just want you to do more . I'd imagine that if a charcter can't go forward (blocked by a slower figure) it'd be an idea to make it move left or right - side-step - if at all possible. Perhaps if there were "near" and "far" boundaries set you might have time to make figures turn before they get so close tha they have to stop or side-step. I'd base which way to turn on what side of the figure in front the "stopped" figure is (e.g. if left on center, move left). This is where I see potential speed problems coming in (and the possibility for endless loops) where you have numerous "Low-Res Vicky 1 in a temple with a sword" running after a frightened Michael 2... it'd be possible for a character to get "trapped" amongst other figures, unable to go forward or to either side (and probably with another Vicky coming up from behind). Greater minds than I can probably come up with realistic approaches, perhaps the best one being to limit the number of checks and tell animators not to be so lazy but "get in there" and do some of the work themselves . Cheers, Cliff


who3d posted Fri, 26 March 2004 at 6:21 PM

Oops - nearly forgot. Although I'm sure that Ockham wrote a "keep figure above a customer floor geometry" script I can't find it anywhere - but it lead me to consider something else that'd be neat - an option to follow in the Y axis. For flying pteranodons, birds, millenium dragons and the like. Just a thought :) Cheers, Cliff


TrekkieGrrrl posted Sat, 27 March 2004 at 4:20 AM

Ockham made his "walk this way" script (the one that keeps things over ground), but I THINK he told me not so long ago that it is now implemented in his Eureka script. Please correct me if I'm wrong, ockham :o) So the possibility is definately there :o) is also imagining stuff like flying thingies now

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.



who3d posted Sat, 27 March 2004 at 6:34 AM

I can't see it in Eureka (judging by the readme) but someone calling themselves "svdl" released a "walkthiswayv2" pythin script into freestuff in Jan this year... might have to check that. My current best thought on the flying thing was to use a flying animation (a 30 frame cycle) in the Walk Designer and then use Ockham's "walk this way" script (now maybe svdl's wtw2) to bump the flying creature up over a "ground" mesh, then probably remove the mesh so that it doesn't show that a false floor was used to move the creature... ...however, a script that makes a creature follow a prop in x/y/z axis (and optionally "tilts" the figure so that it's always pointing at the target) would do an even better job IMHO. Hmmm, the possibilities! Cheers, Cliff


numanoid posted Sat, 27 March 2004 at 7:38 PM

Walk this way is by svdl, and always was. He said he was working on a four legged version at the moment. It is a great script, because it stops the slide (ice skating effect) that you sometimes get when doing walking or running animations. The way I understand it, and I may be wrong, is that any object can be the leader, and this doesn't have to be used only on walking figures. As long as your following figure as a "hip", it will follow the leader. So could this be used to make a aircraft, or numerous aircraft follow a prop. If it is aircaft, the turning on a "3 balls on a sidebar" shouldn't be a problem, because there is no actual walk animation, hust a onject folloing a ball. I think this script is amazing. I animated a space fight with about 50 spaceships and suffered to get them to move properly, but if I could just have had a bal to move around and they followed the ball it would have been so much easier, or the parts where one spaceship had to be following the other one. Another question, if I have the ball as leader, and a character following the ball, can a camera be made to follow the character? The camera does not have a "hip", but it would be a good way of doing tracking, better than parenting, possibly.


who3d posted Sat, 27 March 2004 at 10:41 PM

parent the camera to an invisible character (who has a hip). Ockham took down his "walk this way" pythin script when svdl made a better version (walk this way 2) available.


numanoid posted Sat, 27 March 2004 at 11:47 PM

Sorry about the confusion about the walk this way script. I joined these forums after Ockham took down his script, so I only have the version 1 and 2 by svdl. I didn't know Ockham had one previously, but I read in another thread that he had. Thanks for the tip about parenting to invisible character. I wish someone would right a proper tracking script for a camera that works the way the one in Vue'd Sprit does. Simply parenting the camera to the object does not give the same effect. The tracking script needs to have a slight delay, as though the camera is trying to keep up with the object it is tracking. Otherwise it looks as though the object is standing still and you are just moving the background around.


scourge posted Sun, 28 March 2004 at 4:30 AM

I've been out of town this weekend but I'm going back home today, I'll then check out that "walk this way" script, which indeed sounds great. I hope it doesn't take too much CPU time. Of course any object can follow a target, and it's actually a lot easier when there's no walking animation involved. A camera is also an actor, I think, so using the script you could have the camera follow a target, but you'd of course have to point the camera at the target using the "Point at" option. Who3d, your suggestions are on my "things to do" list. Shouldn't be a big problem to have the characters avoid obstacles on the way.


scourge posted Tue, 30 March 2004 at 1:31 PM

Attached Link: Follow5.AVI (63 KB)

Here's a small update. Now the objects can avoid obstacles on their way. The object plans its route again every frame and takes the shortest possible route. As you can see from the video clip the object doesn't have to do any "sidesteps" nor does it move straight at any obstacle. To simplify the process I only did this with balls but walking figures should work well too. What I am going to do next: - edit the route finder function to support multiple obstacles on the way and find the best route out of all the possibilities (i.e. if there are 10 obstacles). - edit it some more so that the object detects where the obstacles are moving (if they are) and calculates the routes based on that data - heck a lot of other things I checked that "walk this way" script. It's pretty good and I could probably add something like that to this follow script. If only I could make it a little faster...

TrekkieGrrrl posted Tue, 30 March 2004 at 1:54 PM

Wow! Soccer in Poser!!! Great!! :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.



scourge posted Tue, 30 March 2004 at 2:05 PM

The video clip may need some explanation. The big red ball was animated to get on the white ball's way, so that it would be noticeable that the route is recalculated every frame. Soccer? That would be cool.


diolma posted Tue, 30 March 2004 at 2:51 PM

Hmm. And... School-kiddies being taken for a trip somewhere (with teachers ushering)... Jet-fighters in formation... Sausages on a production line (or is that the same as the school-kiddies? :-) )... Shoppers in a mall... Lawyers (ambulance-chasers) to an accident..:-)) Athletes in a race... (This is just a bookmark btw..) This whole idea looks very promising. Will await events.. Excellent work! Cheers, Diolma



who3d posted Tue, 30 March 2004 at 3:42 PM

Oh joy! I'd started worrying that this thread might have died :( A flock of gulls, pteranodons, Millenium Dragons, dinosaurs, horses running in a field, Daleks moving around parked cars in central London, sperm seeking their target, salmon swimming upriver - possibly even leaping up waterfalls, ants rampaging through the undergrowth, bees chasing winnie-the-pooh - nah, this kind of script will never catch on. As for football/soccer - I suppose actually it WOULD be possible to add in rules to control the passing of a ball around... but even ignoring the CPU time that whole thing would require, just the Poser rendering time would make it the slowest game of soccer EVER! Cheers, Cliff


scourge posted Tue, 30 March 2004 at 6:11 PM

Oh no, this thread ain't going to die before I finish these scripts. The path finding part is coming along nicely, the objects now find their way around a number of obstacles. I'll post another clip when I've tweaked it a little.


scourge posted Wed, 31 March 2004 at 11:14 AM

Attached Link: Follow6.AVI (63 KB)

Okay, the path finding works better now, the object can now avoid multiple obstacles. This isn't perfect yet though because it doesn't always find the quickest route. I'm still going to make it a little better but the porpose of the path finder is to avoid other objects and characters, not navigate through a labyrinth or any other complex environment.

TrekkieGrrrl posted Wed, 31 March 2004 at 1:35 PM

Ooh it's GREAT! I can't help wondering if Bushi's what-did-he-call-it-thing he used for his targeting/posing script could be used here. I don't understand WHAT the script does other than it seems to keep calculating the new possibilities of each movement. Perhaps that could make this one always find the quickest route?

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.



diolma posted Wed, 31 March 2004 at 1:49 PM

Years ago I read an article on route-finding in real time. It was something to do with routing telephone calls through exchanges. Aparrently it was sometimes taking a VERY long time to find the shortest path. Then some people (Cambridge students, if memory serves) came up with an idea. The basic algorithm was still used to start with, but after a short time, if it appeared that there were going to be many more choices, the algorithm just picked a nuumber of routes at random and chose the shortest of those. Everyone was happy, because callers weren't kept waiting while the computer (which in those days was a lot slower than we have now, but the principle still holds) trawled its way through thousands of possiblities trying to find the quickest route. And taking a l-o-o-o-n-g time finding it:-) Just thought I'd share that - someone may find it useful.. Cheers, Diolma



scourge posted Wed, 31 March 2004 at 2:41 PM

Well, Bushi's script uses genetic algorithms, which can be also used to find the quickest route out of many options. But I don't think the scripts have much in common, bushi's script is only for posing. I know some algorithms for path finding, including the famous A* which is probably the most commonly used one. These algorithms find always the best route but they are only good for working with a very limited grid, say a 100x100 sized one. I ended up creating a totally different kind of algorithm, which is fast unlike the others but unfortunately also less precise. But it's getting better all the time and I think I can make it good enough to have a bunch of characters moving around without collisions.


diolma posted Wed, 31 March 2004 at 3:04 PM

Actually, scourge, unless there's a specific reason for it, there's probably no need to find "best/quickest path". If you observe people in (say) a pedestrianised shopping centre, they often don't choose a best path - just the one that comes to mind when they realise they're about to bump into something if they continue the way they're going, unless they've over-imbibed of course, in which case they use the "drunkards walk":-). Hmm. Perhaps it might be an idea to be able to set "way-points" along the route - or is that going beyond the realms of the script you're writing? Keep up the good work.. Cheers, Diolma



scourge posted Wed, 31 March 2004 at 3:38 PM

You hit it pretty well diolma. The script uses way-points for the route: at first the object has one way-point, the destination, which is the target object. Then the scripts checks if the road is clear for moving straight at the destination. If there are obstacles then new way-points are created to avoid those obstacles. The script also checks the gaps between the new way-points and creates more of them until all the routes to the destination are clear. This is the point where intelligent path finding would come to play. Currently the script always chooses the shortest routes, which doesn't necessarily mean the shortest path from the starting poing to the destination.


who3d posted Wed, 31 March 2004 at 6:55 PM

I agree that shortest or "best" path isn't necessary for my needs - just A decent path is more than good enough. More useful would be the ability to affect the smoothness of paths/number of waypoints - so that one could make mechanical things "clunkier" (perhaps) while organics might tend to turn more smoothly, if you follow. As always when one of these python gurus develops a script with the users... exciting times! Cheers, Cliff


scourge posted Mon, 19 April 2004 at 5:59 PM

Good news, I have the path finding algorithm ready now it always finds the best path... and it isn't too heavy on system resources: I tried with 10 obstacles on the way and the best path was calculated in about 1 second. Things were getting too messy and difficult with Python so I decided to re-make the whole path finder in Visual Basic. I wrote an app which creates a path between two points and connects the way-points so that I can actually see the path. The attached image is a screen shot of the application.

As you can see the path is now smooth and the shortest distance from the moving object to the obstacle is object radius + obstacle radius. So what does this mean? It means that all the objects are considered circle-shaped in the X-Z axis which also works fine for humans and other rather small characters, but if the obstacle is really big and not circle-shaped (i.e. a truck) the script doesn't work that well.

I've got too many projects in the works now but I'm working on these scripts always when I find some time. Next I'll have to convert the algorithm into Python and try it in Poser...


who3d posted Mon, 19 April 2004 at 7:49 PM

Presumably for "too big" objects one would simply substitute a number of smaller objects which take up the space (approximately) of the large object (e.g. building) to be avoided :) Cheers, Cliff


who3d posted Fri, 28 May 2004 at 1:25 PM

Not being the fastest to finish things myself and "put them out there" - I really really want this routine so thought I'd be cheeky and say "How's it Goin'?"


scourge posted Mon, 31 May 2004 at 1:21 PM

When I write programs or scripts my little projects (like the MAT Pose Edit application) often begin to grow and I can't put an end to it. And though I've done it a few times I don't like releasing any work-in-progress stuff. But since I can't be sure how long it will take to finish all the detailed algorithms I'm working on I'll make an exception this time. I'll try to cut the 100% working parts from the project and release that script tomorrow. So, please check back in a day. Thanks, Ilari


ynsaen posted Mon, 31 May 2004 at 2:05 PM

Ilari, Been following this thread off and on, nad I have to say it's a killer script -- very interested in seeing it come out.

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)


who3d posted Mon, 31 May 2004 at 3:16 PM

Good on yer scourge! :)


scourge posted Thu, 03 June 2004 at 12:12 PM

Attached Link: http://koti.mbnet.fi/~ilaripih/Follow.py

Thanks ynsaen and who3d. Okay, not a big suprise that I crossed my "deadline" by a couple of days. Some of the walking animations looked really silly and I found out it was because of the Hip's rotation. So I changed the script to only affect the Body actor. The good thing is that the animations now work correctly, and the bad thing is that the animation can't be saved as a pose file... well not until I have finished my script which writes pose files that include the Body actor. Here's how to use the script: Before running the script select the figure that will do the walking. 1. Pose file: Type the file name and full path of the walk animation 2. Frame count: The amount of frames to be used, the first frame being the current frame 3. Frames in loop: The amount of frames in the walk animation file 4. Speed: Speed of the walking character (you'll have the correct speed when the feet don't slide) 5. Target figure: The name of the target figure. Leave empty if the target is a prop 6. Target actor: The name of the target actor. Usually "Body" or name of a prop. I had to cut a lot of functionality from the script to make it work correctly. There's no path-finding/detection of obstacles and the script only works for characters that walk on the ground. I'll soon upload a script that works for flying creatures. Ilari

who3d posted Thu, 03 June 2004 at 1:36 PM

Cool - just the ability to use walk paths longer than 30 frames has got me thinking - there's room there for some very subtle animations I suspect. Don't let us hurry your scourge. Any time in the enxt 30 minutes for the full, finished, debugged code will be fine :) Cheers, Cliff


scourge posted Thu, 03 June 2004 at 2:33 PM

Oh crap! Only 30 minutes time left for the next release! I'd better activate some more brain cells quickly...

When it comes to the walking animations this version of the script offers pretty much the same as the Walk Designer. So you can make pretty cool moving animations (not necessarily walking).

The next version will support, as promised, flying animations and also an additional following algorithm. Hopefully I'll get a better grasp of the GUI library for Python too, the current GUI sucks.

Tip Of The Day: use a negative speed to have the character walk away from the target =)


scourge posted Fri, 04 June 2004 at 6:02 PM

Attached Link: WDragon_Fly.avi (572KB)

Okay, looks like the script works great with flying/swimming things. There's still some work to do but I already managed to make a sample flying animation. The Walk Designer pose is poorly animated and the Sixus1 Water Dragon is a bit difficult to pose and animate. However you can clearly see that the dragon is following the ball also in the Y axis and the body rotates to face the target. The dragon, as mentioned, uses my own anim (60 frames) and the the people use Poser 5's Run.pz2 WalkDesigner pose (30 frames). I had the people follow the dragon with a negative speed (= run away).

scourge posted Fri, 04 June 2004 at 6:05 PM

Attached Link: WDragon_Fly2.AVI (385KB)

Here's the clip from another view.

who3d posted Fri, 04 June 2004 at 6:42 PM

Cool - I can't check out the anims right now but have downloaded to view later. Have some lovely animations to test this with (some flying, most walking) and - wouldn't you know it? No TIME to play! Great stuff m8 :) Cheers, Cliff


scourge posted Fri, 04 June 2004 at 7:22 PM

Thanks. You can't test the flying anims with the current version of the script, but I should be able to upload the update in no time. I feel the pain... actually I've got the same problem, only 24 hours in a day.


who3d posted Sat, 05 June 2004 at 4:43 AM

Ya guessed that - tho I have some "level flying" stuff that I might try if I find some spare time in a corner of a pocket somewherwe :) Cheers, Cliff


TrekkieGrrrl posted Sat, 05 June 2004 at 6:16 AM

Those flying animations are really really great! I hope you find the time to get the script uploaded soon :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.



scourge posted Sat, 05 June 2004 at 11:04 AM

Attached Link: WDragon_Fly3.AVI (393KB)

Thanks, and I think you won't have to wait long for the update Ernyoka. In fact you can probably start holding your breath now (but just in case, make it a deep breath) =) Here's another animation. In the two first flying animations the dragon had to fly straight because turning would have resulted in strange body rotations. Now the figures can turn correctly and they even do some curving when they have to turn. Now I'll just have to write some kind of a turning radius so that the figures can't just suddenly turn around (in this animation you can see that the dragon's movement isn't smooth because it turns too quickly). The turning radius will be useful also for figures moving on the ground.

TrekkieGrrrl posted Sat, 05 June 2004 at 11:30 AM

Oh wow! That looks so totally COOL, Scourge! cheats and breathes a little thru a straw

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.



who3d posted Sat, 05 June 2004 at 2:46 PM

Well I'm not gonna cheat, I have faith in scourge (starts holding breath)


scourge posted Sat, 05 June 2004 at 3:30 PM

Attached Link: http://koti.mbnet.fi/~ilaripih/Follow_Fly.py

Yeah, c'mon Ernyoka, anyone can hold breath for a few hours ;) Here's the script for flying things. I still need to work on that turning radius, but this one works pretty well already. There are two new input parameters: - Curving: the amount of tilting the figure does when it's turning. I used a value of 32 in the dragon animation. - Curving angle: The amount of tilting the figure can do during one frame. For smooth movement I recommend a small value (between 1 and 3). I know I could have come up with better names for the parameters but I'm going to re-design the whole GUI later anyway...

who3d posted Sat, 05 June 2004 at 5:01 PM

As usual, your generosity astounds me. Sincere thanks for the effort you've put into this, which I reckon could benefit ALL Poser animatiors :) Cheers, Cliff PS or at least all who find this thread.


scourge posted Sat, 05 June 2004 at 5:55 PM

I'm glad that people find the results of my work useful. When the time comes I'll upload the final product to Free Stuff, at least at PoserPros. So it doesn't matter that this thread can't be easily found anymore. Any questions about the script? Everyone may feel free to ask and I'll do my best to give a good answer. If anyone's willing to modify/develop the script, go ahead. But the code can be difficult to read because it's all chopped from a larger bunch of code and there's no comments in the uploaded scripts.


TrekkieGrrrl posted Sat, 05 June 2004 at 6:49 PM

PHEW** It got pretty hard breathing thru that straw.... Kiitos, scourge!! :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.



TrekkieGrrrl posted Sat, 05 June 2004 at 6:51 PM

Oh and the people who ORIGINALLY followed this thread wil get the e-bots :) And for those who DIDN'T follow this thread from the beginning.. well... their loss ;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.



scourge posted Sun, 06 June 2004 at 6:10 AM

I see that you know the basics of Finnish. Now you just need to learn some undetermined muttering and put a miserable expression on your face, and you can fool any Finn. You're a Dane, right? Do Danish people understand Swedish or vice versa? I'm curious because I can understand written Danish pretty well but when I hear a Dane talk I have no idea what he/she is saying. "Oh and the people who ORIGINALLY followed this thread wil get the e-bots :) And for those who DIDN'T follow this thread from the beginning.. well... their loss ;o)" That, I think, is a good thing. I've got just the right people here following the thread, those that don't get bored watching as I slowly make progress writing some stupid script, occasionally reporting something like: "Woohoo! After weeks of hard work I got the figure's right toe to bend correctly!" Thanks for your support


TrekkieGrrrl posted Sun, 06 June 2004 at 7:36 AM

:o) Kiitos is about the only word I know in finnish - at least where I (hopefully) know how to spell it too. Danes and swedes in general can unnderstand each other, but I agree it is far easier to READ swedish than to hear it spoken, and since danish sounds even more different from how it is written, I would think it is easier to read danish than to listen to it. Many danes (myself included L) speak rather "sloppy" and swallow half of the words, making it close to impossible for other people to understand. Finnish on the other hand... no offense, but are you SURE it's a real language? ;o) It looks and sounds so unlike everything else. Except estonian, I've heard that finns and estonians can understand each other? and one more, possibly hungarian? Now I'll try out this new script. Not that I usually do much animation, but I love to play with python scripts and like see what they do :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.



who3d posted Sun, 06 June 2004 at 7:55 AM

I agree - you've got some of the best here watching you work. BTW, given the tests I plan to put it through over the next few days, don't forget that swiming is practically flying, but in water. Cheers, Cliff


scourge posted Sun, 06 June 2004 at 8:49 AM

"Finnish on the other hand... no offense, but are you SURE it's a real language? ;o)" Well, I've heard someone describe Danish as a throat disease, not a language =). Seriously though, I don't know about the logic of Finnish grammar but I think the pronounciation is very close to how it's written. In LOTR most of the names (like Saruman, Sauron etc.) are pronounced like Finns would pronounce them. Finnish is very different from other European languages because it doesn't derive from languages like Latin or French. And the writing is somewhat similar to German because Mikael Agricola (the guy who invented written Finnish and its alphabets) used German literature as base for the ABC book. The Estonian language is just weird. It's pronounced like Finnish and they use many same words, but most of the words are strangely swapped, like if they had copied our language but wanted to confuse us. An example: - In Finnish "kirja" means "a book". In Estonian it means "the Bible". And vice versa, in Finnish "Raamattu" means "the Bible" and in Estonian it's "a book". That can't be a coincidence! About Hungarian, I doubt we could understand it. Hell, it's sometimes difficult for me to get a grasp of some Finnish dialects. The same goes for other languages as well: I can almost perfectly understand spoken English but when I hear some redneck from the southern part of the US talk I'm having hard time trying to figure out what he/she is trying to tell. The Swedish-speaking Finns also speak very clear Swedish but the real Swedes just can't speak it right ;) who3d, Yes the script works also for swimming, of course. The movement is just slower and smoother. Please report us the results of the tests when you're done, I always like to get feedback so that I can make my products better. I bought Poser solely for animation purposes in the first place and I'm glad I'm finally beginning to understand how to animate. That's why almost all of the scripts I'm working on are for animation.


TrekkieGrrrl posted Sun, 06 June 2004 at 10:48 AM

I agree about the swedish spoken by finns. If only all swedes would speak like that, it would be a lot easier to understand swedish :o) Norwegian is worse. "normal" norwegian (bokm) is very close to danish and the written bokm is so close that manuals ect usually are the same in danish and norwegian, with only some words written in both languages. That is of course far too simple, so the norwegians had to invent Nynorsk, something closer to icelandic or oldnordisk (not sure or the english word for that) Oh and it is DUTCH which is a throat-disease, not danish ;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.



scourge posted Sun, 06 June 2004 at 11:52 AM

I stand corrected, the throat disease was Dutch. When I was younger I thought Dutch was the language people speak in Denmark, that's why the confusion. Of course, the description matches other languages pretty well, like arabic languages and the language some people speak in Wales. Why do they punish their throat like that??


TrekkieGrrrl posted Sun, 06 June 2004 at 12:07 PM

Uhm well apparently danish and dutch sounds rather similar to foreingers. I've often been mistaken for dutch when I am in England. Of course we all know that danish is a much nicer language L But you're right, there are some languages where you wonder how they can evolve such strange sounds. And of course some sounds are totaly impossible for people to pronounce if they haven't learned them from their childhood, like the clicking sounds in xhosa and similar african languages.

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.



who3d posted Sun, 06 June 2004 at 5:30 PM

Apparently we're born with the ability to learn a huge range of phonemes - vut we quickly concentrate on teh phonemes that we hear around us and actually lose the ability to pronounce and possibly even hear "correctly" phonemes from unfamiliar languages. The more you can subject your child, when young (sorry no idea what age) to a variety of languages the better the chances they'll be able to do well with languages (if they want to) later. Apparently. Cheers, Cliff (and I mean the actual languages - not the "pidgeon" version spoken by idiots like me, but native speakers of other tongues. E.G. My French is limited to "Allo Allo" and my Spanish to "Grassyarse")


scourge posted Sun, 06 June 2004 at 6:43 PM

"Grassyarse" LOL! I agree, children learn new languages a lot faster than grown-ups. I have a few Swedish speaking friends and I envy them because both their Swedish and Finnish are flawless. They also seemed to learn English and French faster than I did. I'd say I'm pretty good at English and moderate at Swedish and French but learning is a lot harder for me than it is to those particular friends of mine. God natt, mina vner. Jag ska ervda i morgon.


TrekkieGrrrl posted Mon, 07 June 2004 at 9:21 AM

Well at least you written swedish is better than mine G I'm better at understanding swedish than writing/speaking it coz I can't remember which words are the same and which are different from danish. In danish, that sentence would be: God nat, mine venner. Jeg skal vende tilbage i morgen. (and in english: good night my friends. I'll return tomorrow)

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.



scourge posted Mon, 07 June 2004 at 9:50 AM

That's kind of the same situation when I have to deal with Danish (happens very rarely); I can read it but not write because the words are slightly different. I could have also used "komma tillbaka" instead of "ervda" so it would had been even more similar to Danish. Don't worry who3d, I'll get back to the original topic (the Python scripts) soon =)


who3d posted Mon, 07 June 2004 at 8:24 PM

Sadly I have to report I've failed abysmaly so far at my end - I'm occasionally getting SOME movment in the figure I am making follow Figure 1, but so far I'm always getting an error - such as: Exception in Tkinter callback Traceback (most recent call last): File "C:Program FilesCurious LabsPoser 5RuntimePythonliblib-tkTkinter.py", line 1292, in call return apply(self.func, args) File "", line 71, in mainProg File "", line 135, in Follow ZeroDivisionError: float division Err... help? Cheers, Cliff PS have used Don as the figure to follow, and a couple of different animals - latest was an elephant - as the figure to do the following.


who3d posted Mon, 07 June 2004 at 8:25 PM

Don't worry about the language topic - I've avoided saying that anyone outside the Home Counties is unintelligable to me :)


shadownet posted Mon, 07 June 2004 at 9:55 PM

BM


scourge posted Tue, 08 June 2004 at 4:07 AM

Hmm. According to the error lines and the error the problem is that the following character is at the same place as the target (the distance to the target is 0 and that's why the division by zero error occurs). What have you typed in the text fields? I assume you selected the figure that will follow the target before running the script. You should always position the figure that follows the target by using the dials of the Body actor, not the Hip. Also, if you position the target with the Hip dials you should also set the target actor as Hip, not Body.


scourge posted Tue, 08 June 2004 at 4:19 AM

...and looks like you're using the flying script for Don and the animals. Are you sure you want to do that? Or are they swimming?


who3d posted Tue, 08 June 2004 at 5:27 AM

I seperated the two objects by moving the Body along the X axis with the appropriate dial. The target was at 0, the follower at... possibly not enough? Let me try again and increase the seperation to make them several bodies apart (I'll do this later). The aim was for swimming, actually - I have a "swim cycle" that I want to make, but I need to fine-tune how I'm going to be able to apply it. This script should be significantly better for my purposes than Walk Designer, but I need to make sure that I can make it work first :( I'll report back, hopefully tonight. Cheers, Cliff


scourge posted Tue, 08 June 2004 at 6:40 AM

Attached Link: http://www2.lut.fi/~pihlajis/Follow_Fly.py

Actually the error should only occur if the follower's Body actor has exactly the same coordinates as the target actor. I just tried what you did: I created two Don figures, moved Figure 2 along the X axis, ran the script and it worked. Anyway, here's a new version of the flying script. I fixed a bug which sometimes gives a "math domain error", and now the script can be used without an animation pose file.

who3d posted Tue, 08 June 2004 at 6:35 PM

OK, here's a test run...

New scene in Poser 5 SR 4.1 (v5.0.4.325). Contains a Don.
Add a ball (ball_1)
Change zTran to 5
Change animation frames to 200, then go to frame 200
set (ball_1's) zTran to 15 and xTran to 10.
Select Figure_1, Body
Start newest Follow_Fly script. Set Pose File to:
C:Program FilesCurious LabsPoser 5RuntimelibrariesPoseWalkDesignerWalk.p2z
Set Frame Count to 200
Delete Target Figure text
change Target actor to ball_1
Click Apply

It comes up with what looks like an error screen, but this just contains:
Do you wish to add frames to your scene to import the complete animation

and nothing else.
Close the "error report".

play the animation, Don is catching up with ball then flickering around it. Change final ball position to z=150, x=100 and retry
completes no error message. Try animation...

Yup, that seems to be working great. It's going to take some time and practise to get the hang of the speeds etc - but I think I'm ready to move on to slighlty more daring/interesting tests (Bwahahaaa!)

Cheers,

Cliff

Message edited on: 06/08/2004 18:36


scourge posted Wed, 09 June 2004 at 3:03 AM

Good. That "Do you wish to add frames to your scene to import the complete animation" message should be there. If the animation pose has 30 frames it will be applied 7 times for a 200 frame anim. 7 times 30 is 210 so there will be 10 frames extra, that's why you get the message. The script deletes the ten additional key frames, leaving them empty. The figure flickers around the target because there's no turning radius yet, so the figure can turn a whole 360 degrees during one frame. This will be changed soon. Ilari


scourge posted Wed, 09 June 2004 at 6:04 AM

Attached Link: Follow7.AVI (241KB)

Yippee! I finally got that damned turning angle thing working. In this clip the guy has a turning angle of 5 degrees, that's how much he can change the walking direction in one frame. This makes the movement a lot smoother, and now when the target is reached the figure doesn't flicker around it because he can't turn around that quickly. Of course this is a bit unrealistic for humans but i.e. any vehicle would turn like this, they need space for turning. Now wait 'til I try this with a flying figure...

who3d posted Wed, 09 June 2004 at 6:32 AM

I had a ball animating a mil dragon flying around a castle (OK, I used a huge box to start with but I slapped a castle in afterwards). Looks great, wish I had time to do the camerawork and rendering that I'd like to finish it off, but I've got to move on to my swimming animaiton and see what I can get going. At least - when I can find time for Poser. Time is a vanishing commodity lately :( Love your work, Cliff


scourge posted Wed, 09 June 2004 at 11:32 AM

Attached Link: WDragon_Fly4.AVI (470KB)

And yet another flying animation... This one was done with the latest version of the script (which I haven't yet uploaded here), using a turning angle of 1 degree to make the turning smooth enough. Values below 1 also work, as long as it's greater than zero.

scourge posted Wed, 09 June 2004 at 11:37 AM

Attached Link: http://www2.lut.fi/~pihlajis/Follow_Fly.py

And here's the new script. There's a new entry, the maximum turning angle. It accepts float values from 0 to 180 degrees. The lower the value the slower (smoother) the figure turns.