Triggered Loop

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Triggered Loop // Interactive Artwork

1  |  

Post by Délé // Mar 4, 2006, 11:55am

Délé
Total Posts: 1374
pic
I finally figured this one out, Woohoo! :D Good 'ol modulus arithmetic. :) Didn't realize it was so easy, lol.


I think this is the last major puzzle piece I was working towards for making procedural animations that run off of a single timer. This new script here, along with all of those little flow controllers and triggers and stuff (from the "Procedurals make'em move" thread) should make it possible to create pretty complex choreographed procedural animations that run off of a single timer.


Now, with this "Triggered Loop" object, loop events can be triggered at determined times off of a master timer.


Here's a screengrab, Triggered Loop object, and a scene file to demonstrate one way it can be used:

Post by SteveBe // Mar 4, 2006, 3:49pm

SteveBe
Total Posts: 282
pic
Thanks Délé! Very usefull!
Tell me something, do you ever sleep!:)
And when you do, are your dreams about tS!:D

Post by Délé // Mar 4, 2006, 5:28pm

Délé
Total Posts: 1374
pic
Thanks SteveBe. Glad you like it. :) Yeah, TS works it's way into my dreams from time to time, lol. I have a bit of a one track mind. When I get focused on something I just can't concentrate on anything else. :)

Post by SteveBe // Mar 4, 2006, 5:46pm

SteveBe
Total Posts: 282
pic
Thanks SteveBe. Glad you like it. :) Yeah, TS works it's way into my dreams from time to time, lol. I have a bit of a one track mind. When I get focused on something I just can't concentrate on anything else. :)
I know exactly what your saying. As I tell my wife, "Would you rather I go to
the bar? Because I'm not watching television until there's more than just a few
good shows.":)

Post by trueBlue // Mar 5, 2006, 6:53am

trueBlue
Total Posts: 1761
pic
Dele: This one gets Six Stars: Most Excellent!
Thank you ever so much!

Post by bill // Mar 5, 2006, 7:07am

bill
Total Posts: 114
pic
Perhaps someone at Caligari can set up a repository where people can place tools that they have created. Then it would be a lot easier to find them later rather than having to dig back through the message board.

Post by Délé // Mar 5, 2006, 8:36am

Délé
Total Posts: 1374
pic
Thanks trueBlue. :)


bill: I agree, it would be nice to have a repository of some sort where people could upload their creations and documentation on how to use them. And also be able to post updates to those objects. The forums do work, but you're right, people may have to dig more.


Well, I was playing with the loop and realized I should have built in a Stop Time to stop the loop. So here's an updated version. I think I'm going to start naming my scripts with version numbers from now on too. :)

Post by trueBlue // Mar 5, 2006, 8:58am

trueBlue
Total Posts: 1761
pic
Sure would be nice to be able to use this at different locations other than from 0,0,0. I see that it is douable from reading the scripts inside Interactive Replace Tool and Scene Deformer.
Like the "Keep target orientation". But instead have it "Keep target's location".
Anybody have an idea and how to connect it?

Post by Délé // Mar 5, 2006, 9:53am

Délé
Total Posts: 1374
pic
trueBlue: You can use it anywhere. The only thing is, that to plug it into an object, the matrix of the object needs to be expanded which deactivates the widget. You can still manually enter in the coordinates that you would like the object to be located in the tx, ty, and tz of the objects matrix.


I think I know what you're saying though and it does give me an idea. I shall investigate. :)

Post by Délé // Mar 5, 2006, 10:30am

Délé
Total Posts: 1374
pic
hmmm....I guess I don't quite follow trueBlue. Can you elaborate a bit more?

Post by trueBlue // Mar 5, 2006, 12:15pm

trueBlue
Total Posts: 1761
pic
Doh! I left out some valuable information in my last post. It's when using a Circle generator with your awesome Triggered Loop is where I am having difficulties. What I did, was copied your Triggered Loop in your Demo and hooked up a Circle generator to it and then to the cube. Okay thats fine, works great! Now what if I wanted to add another object at a different location and tie all into the same Timer? This is where a "Keep targets location" would be great. Has nothing to do with your creation and I truely hope I did not cause you any concerns. Look at the Interactive Replace Tool for an example.

Post by Délé // Mar 5, 2006, 1:20pm

Délé
Total Posts: 1374
pic
Ah, I think I see what you mean now, thanks. :) The circle generator only circles around 0,0,0, and you would like to have multiple objects circling, but around different positions, right?

I've adapted the circle generator in the scene below to be able to offset the X and Y outputs so that you can position the objects to circle around different locations. It just adds the inputted "offset" amounts to the outputs before they are outputted. I have the timer filtered through a block that multiplies it by -1 to reverse it before going into the second circle generator to get it to rotate the opposite direction.

If I understand correctly this should help with what you're trying to do. Perhaps a script version of the circle generator could be set up to work even better. You've got me thinking now, lol. :)

Post by Délé // Mar 5, 2006, 5:05pm

Délé
Total Posts: 1374
pic
Here's a circle generator made with script. It's not as intuitive as the idea you had there trueBlue, but you can position the object with this one. The difference between this and the nonscript one above, is that I incorporated the "Reverse" into it. So now you can simply just check or uncheck the Reverse box to change the circle direction. :)

Post by trueBlue // Mar 6, 2006, 7:10am

trueBlue
Total Posts: 1761
pic
Thank you Dele!:jumpy:

Post by Délé // Mar 6, 2006, 1:30pm

Délé
Total Posts: 1374
pic
I keep getting more ideas. Sorry for all of these multiple versions. I think this last one here is as far as I'm going to take the circle generator. So here is the Circle Generator v3.2.

I noticed that the original circle generator could only do horizontal or vertical orbits because of only two outputs. So this one also includes the Z axis and has an "Angle" adjustment for each of the axes to allow the orbit to be manipulated around any angle. Also, you can make elliptical orbits. And the last thing I added was the ability to set a start position for the object to start from along the orbital path. :D

Note: If you want a circular orbit, set two of the axes angles to 180 or -180, and then set the last axis angle to a smaller number to rotate the orbit. It may take a little playing with but any angle should be achievable.

Post by Délé // Mar 6, 2006, 1:59pm

Délé
Total Posts: 1374
pic
Arrggg. Sorry guys, I just noticed an error. I will fix it and upload the fixed one soon.

Post by Délé // Mar 6, 2006, 4:56pm

Délé
Total Posts: 1374
pic
Ok, sorry about that. I hadn't really thought this script through as much as I should have, but I do have a fix that is simple. The problem is that Z has to be opposite of either X or Y to make a circular orbit. If it's opposite of X, that means it's equal to Y. If it's opposite to Y, then it's equal to X. Thus creating a problem, it can't be opposite of both, 'doh. When it's equal to the other axis being used to generate the circle, it ends up just zig zagging diagonally.


So, If you see it zig zagging when it should be circling, just change the selection I added to the bottom. It is predictable, so if you play with it a little bit it should become pretty apparent when you need to switch.


Now all orbital angles can be generated. :)

Post by Délé // Mar 6, 2006, 4:59pm

Délé
Total Posts: 1374
pic
oops, forgot the screengrab:

Post by trueBlue // Mar 6, 2006, 5:05pm

trueBlue
Total Posts: 1761
pic
Dele: This is by far the best. This is much more then a simple Circle Path Generator. I have had so much fun with this...well I am almost sea sick. Try hooking this up to one cube and wire's to tx,ty,tz,yaw,pitch,roll and sz. Whooohoo!
Thanks again!

Post by Délé // Mar 6, 2006, 5:32pm

Délé
Total Posts: 1374
pic
lol, thanks trueBlue. :) It can be kind of hypnotic can't it, lol.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn