object collision in a water environment

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.

object collision in a water environment // New Users

1  |  

Post by Gaz0 // Nov 14, 2006, 1:01pm

Gaz0
Total Posts: 47
Hello,

I am working on a project with several solid objects that are being moved about by a water environment. For some reason the solid objects aren't bouncing off one another properly. Instead they often intersect and get stuck together. Any idea on how to make my objects react to one another?


thanks,

David

Post by Bobbins // Nov 15, 2006, 12:07am

Bobbins
Total Posts: 506
1) Increase the amount of geometry on the objects, especially if they have a lot of large faces.


2a) If using tS7 Player physics, increase the Time Step value on the PhysEngine node in the LE

2b) If using tS3/4/5/6 or tS7 Model physics go to the Physical Properties attributes panel and set the collision type to vertex and face. You can then either check Constant and gradually increase the Time value or uncheck Constant to see what works better.

Post by Gaz0 // Nov 15, 2006, 5:33am

Gaz0
Total Posts: 47
1) My objects are spheres and cylinders with rounded ends. They seem to appear to have small precise edges and faces when viewed in wire frame mode.


2a) How high should the Time Step level be increased? It's defaulted to "2", but the animation seems to slow as I increase the number. At 60 everything is nearly still, but at 30 my objects were still intersecting.


2b) I am using tS7 Model Physics, but I am unsurehow to get to the Physical Properties menu where I can set the collision type. Could you walk me to the location?


Thanks

Post by Bobbins // Nov 15, 2006, 7:18am

Bobbins
Total Posts: 506
1) OK, but keep in mind that geometry density affects physical sim accuracy.


2) The time step should be increased to a value where the simulation runs as quick as possible but gives the accuracy needed. There's no set answer for that value since it varies from scene to scene. The higher the time step the more samples the physical simulation takes for each frame so the more likely it is to see a collision, but the longer it takes to calculate. For complex physical simulations the calculation time can be considerable, but it will playback fine.


3) Go to the Model view and right click the icon you press to calculate the Physical Simulation. You've confused me though - if using the Model side physical simulation then you should not edit the Time Step value in the PhyEngine node as that is really for the Player side phys sim engine. tS7 has two independant physical sim engines: the legacy one from tS6.6 on the model side and the tS7 version on the Player side. There is some linking between the two via the bridge but you're best off using one or the other exclusively.

Post by Gaz0 // Nov 15, 2006, 7:54am

Gaz0
Total Posts: 47
I'm currently using dual view, because I was under the impression that if I wanted to save the animation keyframes from a simulation, I needed to be in dual view. Is it possible to save the keyframes otherwise?

Post by Gaz0 // Nov 15, 2006, 8:04am

Gaz0
Total Posts: 47
hey Bobbins,

It looks like you're all over my problems between this and the other post about not recording keyframes. On the other post, you just kind of confirmed the use of dual view(player/model window) to record keyframes. Is there a way to specify the use of just one simulator and record keyframes?


Also, I found the collision with all button in the model window, but it didn't seem to have an effect.

Post by Bobbins // Nov 15, 2006, 9:22am

Bobbins
Total Posts: 506
Essentially, if you press the Start/Stop icon in the Model window then you are running the old engine. Run this and keyframes are recorded.


If you press the Start/Stop icon in Player view, you are running the new engine. If you want to record keyframes here then a Model window must also be open.


Confusingly, the icons are the same in the Model and Player.


Not sure about the Collision with all icon - I think you mean the one that is for the realtime positioning of objects in the Model view. If it's on the same flyout as an icon marked Collision with peers then that has nothing to do with physical simulations. If you want to know what it does, throw a couple of cubes into model view, enable Collision with all and then try to move one cube through another.

Post by Gaz0 // Nov 15, 2006, 10:31am

Gaz0
Total Posts: 47
Okay i am able to capture key frames on my objects moving, but I'm still unable to prevent them intersecting with one another. In a previous post I read:


"2b) If using tS3/4/5/6 or tS7 Model physics go to the Physical Properties attributes panel and set the collision type to vertex and face. You can then either check Constant and gradually increase the Time value or uncheck Constant to see what works better."


But I can't find where the Physical Properties attribute panel is to change the collision type. Where is this located?

Post by trueBlue // Nov 15, 2006, 10:47am

trueBlue
Total Posts: 1761
pic
In the Link Editor, enter your object that you want to set properties by clicking on the orange triangle. On the far right top of the PhysObject select the last small triangle and select Constraints. Here you can select Vertex and Box ("Box I beleive is faces"). Picture below is an expanded version of the PhyObject. I assume no knowledge with the above. HTH

Post by Bobbins // Nov 15, 2006, 10:56am

Bobbins
Total Posts: 506
Select the default layout

Swap to the Model view.

In the top left of the Model view, near the trashcan is a small grey square.

Double click that square.

Find the Start Simulation icon on the toolbar that appears (hint, it's on the flyout where Set Parameters of Object as Rubber is).

That is the icon that starts the older, model side physical sim engine. Right click this icon to bring up the Physical Simulation properties.


Re-reading your posts it still isn't clear that your scene is set up properly. Your objects do have physical properties assigned? They are contained within an object that has 'water' properties - presumably stream environment - assigned? When you run the simulation your objects move by themselves - you are not keyframing the object motion beforehand, are you?

Post by Gaz0 // Nov 16, 2006, 8:16am

Gaz0
Total Posts: 47
My scene seems to be set up properly. My scene has several objects in a larger object. The smaller objects have physical properties of styrofoam. The larger object they are contained in has the properties of a water stream.

When I hit the simulation button they move accordingly. I am not creating key frames for the objects, they are moving entirely through the means of the simuation, the object characteristics, and the environment properties.


However, my objects continue to intersect with one another during the simulation. Some of them clump together. Others attach and swing each other around.


I've followed trueBlue's tip about setting the collision. It was initially set to normal, but I tried it with both vertex and box, yet my objects are still intersecting.


Any ideas?

-David

Post by Chester Desmond // Nov 16, 2006, 9:16am

Chester Desmond
Total Posts: 323
To re-iterate what was mentioned up the page a bit, the mesh density will affect collision quite a bit..the more vertices\faces available for calculation, the more accurate and ,of course, slower.

Post by Gaz0 // Nov 16, 2006, 9:42am

Gaz0
Total Posts: 47
Would adding a subdivision layer function as a way to increase mesh density? It seems to generate more faces and verticies, but will that effect the simulation?

Post by Chester Desmond // Nov 16, 2006, 11:09am

Chester Desmond
Total Posts: 323
bear in mind I am using TS 6.6 so your results may be different...but it does seem to work (and quite well!) . I did a quick phy sim on two basic cubes, then I subd'ed them twice and did a sim..The results were different and more pleasing with the higher density meshes..I then deleted the subdiv layers and pressed play and it worked fine (ie used the high mesh animation on the lo poly cubes)

Incidentally in case you didn;t know, you can save and apply the animation path generated by the sim to another object and or move\scale\rotate the path if you just need to move something slightly out of the way..

Post by Gaz0 // Nov 17, 2006, 7:28am

Gaz0
Total Posts: 47
hello,

I've increased geometry, switched to box collision, and finally my animation appears to be correct. Although a bit chaotic, but that is just a matter of fine tuning the environment or object material to slow down the way they are moving.


thank you for everyone's help.

David
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