Jump to content
Developer Wiki and Function Reference Links ×

clock node?


Recommended Posts

Is there a node or strategy to cause an intermittent pause, eg to make an animation of the steps or cycles?

 

For instance a cycle of

         Object>Duplicate in Place>Move the dupe      Repeat x number of cycles

Result: A display of the original and all the dupes.  The display appears all at once.

 

To show the dupes appearing in sequence the cycle would be:

          Object>Duplicate in Place>Move the dupe>Pause   Repeat x number of cycles

Result: An animation of the duplicates appearing individually, ending with a view of the orig and all the dupes.

 

Ideally, the Pause duration is an adjustable parameter.

 

-B

 

Link to comment

Or refining the description a bit, the cycle is:

     Selected Object>Duplicate in Place>Move the dupe>Dupe remains selected>Pause   Repeat x number of cycles

 

Manually, one could run one cycle, then click run again, and again, and again . . .

 

A strategy to automatically cause Run multiple times? (sounds dangerous).

 

-B

 

Link to comment

Before OzCAD (the Australian distributor of VW) was purchased by VW, they had a product called AnimationWorks. It would  let you animate both the camera path as well as object motion to a limited extent.  Since OzCAD was integrated into VW global, I don't think it is available any longer.

 

I think you will have a hard time doing what you want using Marionette, but @Marissa Farrell and @sbarrett usually show me that I am completely wrong when I disparage Marionette. 😉

 

For both out sakes, let's hope I am wrong again.  🙂

 

If I had to do this, I would probably write a vectorscript to do the action refresh the screen and export either every frame (or hopefully just key frames that some video software can use to step between) and then put the movie together outside of VW.

  • Like 1
Link to comment

Now I'm really in trouble.

This is the inspiration, but not necessarily the goal:

https://en.wikipedia.org/wiki/Conway's_Game_of_Life

 

I want to explore/create a much simpler rule based system, of my own devising, that propagates at a controllable rate.

As described above.

 

The math teacher demands, "Show your work".

The Buddha proclaims, "Happiness is a journey, not a destination, . . ."

 

-B

Link to comment

Having given this a full 10 minutes of thought 😉 that might be doable using Marionette.

 

The Marionette would implement your rules, maybe based on what is around it, to move, duplicate, create, delete, etc.

 

The "clock" would be a script (maybe a Marionette Menu Command, but probably a simple VS or Python script that would Reset all objects, wait a small user defined time, check for a "break" signal to end. If no break was detected them repeat.

 

The trick is figuring out the Marionette, the Clock script could probably be less than 20 lines of code.

 

Sounds like a fun project.  Keep me in the loop and ask if you need more help.

Link to comment

Hello
Also very interested in making visible the work of an algorithm.

I think it is possible by script to show the Objects created or manipulated by script. But a Marionette saves the view before the script runs and recovers it. Somehow this results in a different behavior from Marionette compared to a python script. I played around with this some time ago. The Attached Document shows a script that contains the same code as a Marionette. By executing the script the movement of rectangle is plotted on the screen. 
 

 

 

For another example I putted every of the steps of the script on different layers. Then after the execution I batch-export the layers as pictures then combined into a movie with an external tool. Like this:
 


I can't find that example anymore but I think i just hardcoded an Object creation and a vs.SetParent to put it on a new Layer

Animation.vwx

  • Like 3
Link to comment

Thanks @DomC,  That is kind of what I was thinking.  That the Marionette could look around itself and figure out how it should move when it is reset, but that you would need a script to trigger the reset.

 

And it is also very nice to know that I am not the only one who can't find the files for tests that I know I have done at some point. 😉🤣🤣🤣🤣

 

 

 

  • Laugh 1
Link to comment

OK, Thanks Pat and Dom

 

If I understand discussion above (or maybe not), one idea is to manipulate an object(s) via Marionette, but have a separate VectorScript to repeatedly, but with delay, "press" the Run button on the Marionette.  Each cycle would produce another instance of the object.

 

The idea to export each step to a unique layer, then make a flip book animation is of less interest.  It can look good, but not what I hope to learn or accomplish. I think there are many examples of this, though, going all the way back to Ishmael's rotating cog animation in the Machine Design "extras" file (Vectorworks v8 is where I 1st found it).  @AlanW made some flipbooks, too, I think.

 

I looked at a few python timer scripts, perhaps to adapt into Marionette.  Dom's file contains several time related nodes eg Lag, Pause, Step Delay, Pass and Wait.  I need to examine these, too.  Their descriptions show user input in file units, but vwx document units do not include time measure.  Or?

 

Note that I am total novice - only one prior attempt at Marionette, several years ago (Fun thing plotting radial prime pairs).  Have to relearn everything. No experience creating or using scripts.  Please bear with me.

 

-B

 

 

Link to comment

Good luck with what you are trying to do.  Ask questions. Lots of people here happy to help.

 

Based on the Wikipedia page for game of life, my thought would be to have the intelligence be in the Marionette. It would "look" around itself and then do what the logic tells it to do based on those conditions. It would then just sit there until the next regeneration step from the script.

 

If you don't have a lot of other objects other than your marionettes in the file the "script" portion is really easy.

 

The following script will reset all Marionette (and other types) objects on the active layer. This could be expanded to repeat until cancelled and to wait between iterations if it runs too fast.

 

Procedure Test;

BEGIN
    ForEachObject(ResetObject, ((L='Design Layer-1')));
End;

Run(Test);

Procedure Test;

BEGIN
	ForEachObject(ResetObject, ((L='Design Layer-1')));
End;

Run(Test);

 

  • Like 1
Link to comment

Thanks again, Pat

 

Not sure what is meant by “reset”?  For Marionette, is that same as “run”?

 

also, if this script starts a process, what stops the process?

 

i will give it a whirl with nothing open except one vectorworks file. If it won’t quit, I can shut down

 

-B

Edited by Benson Shaw
Link to comment

Reset for Marionette is basically equivalent to Run. But the code in the script has to use the Reset language.

 

The reset script I have about only runs once. If you want it to automatically repeat we will need to add additional code to check for some kind of a stop or break signal. Probably a keypress or maybe a mouse click.

 

I recommend that you do your preliminary testing with the single step reset script. That way you know it won't run as an out of control infinite loop.

 

I also recommend that you get in the habit of Saving the file every time before you run the script if you edit it. I have had to force quit and recreate changes to a script far to often because I forgot to save.

 

😉

  • Like 1
Link to comment

@PatStanford

Exploring your Reset script with my simple Marionette test network.

See attached.

 

The script appears to run, because objects in the drawing area blink. But I cannot discern any other effect.  The script does not trigger the Mnet to run.  Other kinds of objects do not switch to some other status. What would be an example object or process that demonstrates a reset?

 

The Mnet follows runs via OIP Run button, and follows the rules to create couple new objects in correct positions. These are groups containing duplicates of the original with designated new fill color.

 

Still working on inducing the Mnet to loop several cycles with different offsets.  I will get there bit by bit.

 

-B

 

image.thumb.png.94def01abf064b356d5fc63e270a2fbb.png

 

image.thumb.png.95443faa5a5cc3995e13fe200c8fa89f.png

Reset Script test.vwx

Edited by Benson Shaw
Link to comment

I think you need to "Wrap" the marionette network to make it a single node and then Convert to Object Node. Those two steps effectively make a PIO from the Marionette network. The node will disappear and be replaced by the object that the node draws. The reset script will then trigger a reset on that object.

 

You can right click on the Object Node and choose Edit Script to be able to see and change the network. When you exit the edit mode the created object will reappear using the changes to the network.

 

I hope this makes sense.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...