Professional Web Applications Themes

Havok Gravity/Friction Question - Macromedia Director 3D

I'm new to using Havok, so I'm not sure exactly what my question is, but this is the problem I'm having: I'm trying to create a simulation of a marbles game, so I have a number of spheres inside a 5-sided box. The problem is that they never seem to stop moving after an impulse is applied to them. Even when they do finally "stop," they still seem to jiggle a little. It sort of looks like the surface they're resting on is moving slightly or has little dimples in it. I've tried changing friction and restitution values for the ...

  1. #1

    Default Havok Gravity/Friction Question

    I'm new to using Havok, so I'm not sure exactly what my question is, but this
    is the problem I'm having: I'm trying to create a simulation of a marbles
    game, so I have a number of spheres inside a 5-sided box. The problem is that
    they never seem to stop moving after an impulse is applied to them. Even when
    they do finally "stop," they still seem to jiggle a little. It sort of looks
    like the surface they're resting on is moving slightly or has little dimples in
    it. I've tried changing friction and restitution values for the spheres and
    box. I've tried setting velocity and momentum values to zero before an
    interaction begins. I've tried adjusting gravity, and the higher the gravity
    the worse the problem. I've scaled everything up 10 times (because I get an
    error if I try to create a rigid body from a very small model) and when I scale
    the gravity by 10 to compensate, the spheres never even come close to stopping.
    In fact, with 10x gravity they start moving on their own after I stop them.
    If I set the gravity very low, it improves considerably, but then it's like
    playing marbles on the mooon and that's not what I want to simulate. I think
    I've tried adjusting every property that could possibly have any effect, and
    still the slight, constant motion. So my question is, what is causing this?
    Is there some small, random force that the Havok engine is constantly applying
    to the models? Is this the "chaos" that's referred to in the Havok docs? Is
    there some other parameter I need to set before or while the user is
    interacting with the models? How can I get objects to come to a complete stop
    at some point after an impulse is applied to them? In other words, make them
    behave like real marbles.

    Thanks.

    John

    jabaro Guest

  2. #2

    Default Re: Havok Gravity/Friction Question

    try the following settings:
    on inithavok me
    pHavok.initialize(pMember,10,1)
    pHavok.gravity=vector(0,-1000,0)
    pHavok.deactivationParameters=[100.0000, 0.0100]
    end

    then try to make more substeps:

    on exitframe me
    pHavok.step(0.0167, 4)
    end

    and make the models in the size of 100
    for example
    radius of 50 or 100 ore more:

    like one meter is equal to 100 world units.

    give all movable bodies a mass like 100. you can even take higher values, a
    box with 100x100x100 meters and a weight of 100 kilos is not realistic, but if
    the other movable bodies in the scene have relative values to this, it will
    work.

    in my tests i set the ground restitution of the fixed bodies to 0.9 and used
    the restitution of the movable bodies to make them jump or not.

    but you have to test around with all these parameters to make your scene work
    well.

    i use for all my 3D stuff a puppettempo of 85 fps and try to optimize
    everything to this tempo.

    by the way the jitter effect is ablosutely normal in a physics simulation. its
    allways there. but you can fix movable bodys with lingo, they will react then
    like normal fixed rigid bodys.or you can use the deactivation parameters to
    sort out bodys that are not moving.

    if you want to use the dragparameters you will get "fatal errors" and a crash
    in director. but you can use them in the shockwaveplayer without problem. in
    authoring mode there is a bug in it.













    hondo3000 Guest

Similar Threads

  1. gravity help
    By bobstarlau in forum Macromedia Director 3D
    Replies: 1
    Last Post: August 17th, 06:21 AM
  2. Havok Collision in zero gravity
    By Skavengur in forum Macromedia Director 3D
    Replies: 5
    Last Post: August 17th, 02:57 AM
  3. Help, Havok question
    By alex in forum Macromedia Director 3D
    Replies: 0
    Last Post: September 30th, 09:35 AM
  4. friction problems
    By Beanolas webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: September 11th, 10:53 AM
  5. Havok Dashpot and Spring Question
    By flashjedi webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 1
    Last Post: July 21st, 10:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139