Spring Animation

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.

Spring Animation // Tech Forum

1  |  

Post by ivampretti // Sep 3, 2008, 2:43pm

ivampretti
Total Posts: 151
pic
Is there an way to do this doformation animated? I would prefer something controled by a script.

Post by stan // Sep 3, 2008, 2:47pm

stan
Total Posts: 1240
pic
http://forums1.caligari.com/truespace/showthread.php?t=3331&highlight=spring+script
Dele's handywork

Post by ivampretti // Sep 3, 2008, 3:18pm

ivampretti
Total Posts: 151
pic
but stan the dele's script only can resize the spring, look what hapend with the spring just resized: (it doesn't look realistick! and I don't need an ocilator, I just need to control the size of the spring with a number!)

Post by ivampretti // Sep 4, 2008, 3:22pm

ivampretti
Total Posts: 151
pic
there is nobody that can help-me? I was thinking if that mesh control could do the job, but I don't know anything about it...

Post by frootee // Sep 4, 2008, 6:11pm

frootee
Total Posts: 2667
pic
well there's two examples that may be of help; they would have to be combined.


1) The Heart object


2) the Cable Object


Both of these are located in the Objects - Base library. Both are scripted items.


The Heart demonstrates a spring-like concept, with similar code to what you may need; it is also similar to Dele's spring script.


The cable object creates a cable mesh with scripting.


There may be faster methods but, it sounds like you need to create a mesh rotated about an axis (the cable example will help with this), displaced over time (the heart object will help here).


The Objects - Script objects library also has the Cone object which is drawn via scripting.


I am not sure if you're interested in scripting or not though. Springs would be a very cool thing to have. The way I see this is, as an open faced torus, with a large radius, stretched out and twisted/wrapped about a fataxis. Something like that.


I know this probably does not help much at the moment though. This isn't something that has been done and posted about in the forums yet. But we've got some good ideas so far.

Post by ivampretti // Sep 5, 2008, 2:04am

ivampretti
Total Posts: 151
pic
Cool advices man! thanks a lot, I didn't realize this objects before! I'm going to study this and the result I post here!

Post by frootee // Sep 5, 2008, 2:08am

frootee
Total Posts: 2667
pic
you're welcome. :)

Those may not be a perfect fit for what you are trying to achieve but they may give you ideas into what you need to do. Are you going to script this stuff?

Post by Norm // Sep 5, 2008, 6:12am

Norm
Total Posts: 862
pic
There are two ideas that come to mind for this:

1. use a cylinder for the spring, textured with a spring image. That way when the spring is going through contraction and expansion, the image is resized and you might get a good looking scenario.
2. Create spring and load it up with skeleton. When skeleton moves, the geometry is not scaled.

The scripting scenario mentioned can be helpful. The math behind the script is what was being pointed out I believe.

Post by TomG // Sep 5, 2008, 6:49am

TomG
Total Posts: 3397
I'm thinking a skeleton might be necessary - you want the spring to compress along its length, but the geometry not to compress so the cylinder remains the same thickness.


And that is the tricky part. You want to actually move parts of the model, rather than scale the model.\


Actually morphs might also be another idea, perhaps the best, Point Edit the model into its compressed state and then you can morph between the two states smoothly. By using point edit and moving the vertices of the model you can keep the cylinder the same thickness throughout and avoid that compressing when the spring compresses.


HTH!

Tom

Post by ivampretti // Sep 5, 2008, 10:04am

ivampretti
Total Posts: 151
pic
Frootee, I want to learn about the mesh stuff because the scriptin would be the perfect for me. The skeleton Ideas, gaved by Norm and TomG, it's realy simple and elegant but I think that skeleton can't be controled by a script...


anybody know where can I find a tutorial of mesh and stuff like these?


and TomG, what is this morph?? I don't know anything about it just like mesh...

Post by frootee // Sep 5, 2008, 10:19am

frootee
Total Posts: 2667
pic
The Cone Object script is a good one. Chapter 6 in the Users Guide covers scripting. Basically the best way to understand the creation of meshes is to study the code. The Cone object is in the library I referred to earlier. Same for the cable. I have a flag script which uses the spring script. I think you can search for that phrase to get the files I posted in the forums here. :)

Post by TomG // Sep 5, 2008, 11:17am

TomG
Total Posts: 3397
Morphs are new in tS7.6. Basically they let you take an object, use point editing to move things around, then store this as a new morph. You can then make another shape by more point editing, and store that.


You get a slider for each shape that you save. In the middle, you get the original shape of the object, as you move to the right the shape blends toward the saved shape. If you move to the left, then you get a "negative" of the saved shape.


You can adjust and blend all your edits using the various sliders.


So you can Point Edit your mesh to a compressed state, and save that. Then one slider will let you move from the uncompressed state to the compressed state. This can be keyframed and recorded (don't know if it can be driven by script).


See Chapter 9, Animation, Pg 97 for more on morphs.


HTH!

Tom

Post by J90 // Sep 5, 2008, 1:17pm

J90
Total Posts: 107
Tom, Can morphing be rendered on the model side? I made a simple morph and I couldn't render it after keyframing the morph.

Do you have to have to be in morph editing mode to do it?


When I am not in the editing mode I can't scrub through the animation after keyframing it and see any morphing. I did tell it to key morphs in the animation keying attributes.


Maybe I am missing something. Probably

Post by SteveBe // Sep 5, 2008, 5:40pm

SteveBe
Total Posts: 282
pic
Hi J90, If you're looking at rendering this on model side then it can be done with NURBS.
I created the spring with a radial array and used Loft Surface then keyframed
the scale in the Z axis.

Modeler Scene file attached, just unzip and use Load Scene on model side(TS6 Files).
Animation is 60 frames.

Post by ivampretti // Sep 6, 2008, 4:35pm

ivampretti
Total Posts: 151
pic
My special thanks to TomG. I did a little test video with the morph idea! its great, give a little work to built it, but its just the first time! after its just enjoy, and it can be controled by a script!


I used the lathe to built a spring with a hexagon shape, after its just built the morph and apply the Sub-Division.

Post by TomG // Sep 8, 2008, 2:15am

TomG
Total Posts: 3397
You can render workspace animations in the model side - see Bitesize video on that. Basically you have to ensure you have "workspace" (rather than Model) selected as the source when you click the Render To File button on the Model side.


Glad to hear the morph idea worked!


HTH!

Tom

Post by frootee // Sep 8, 2008, 4:55am

frootee
Total Posts: 2667
pic
Very Cool ideas everyone!

Good job Steve! Nice!
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