Professional Web Applications Themes

havok explosion demo - Macromedia Director 3D

this small sample is a performance test using havok engine and parentscripts. every cube represents a parentscript, if it explodes cube, havok-cube and instance is deleted. on my mashine it runs very smooth. if you have performace problems please let me know. [url]http://kisd.de/~lutz/3dtest/explode/[/url]...

  1. #1

    Default havok explosion demo

    this small sample is a performance test using havok engine and parentscripts.
    every cube represents a parentscript, if it explodes cube, havok-cube and
    instance is deleted.

    on my mashine it runs very smooth. if you have performace problems please let
    me know.

    [url]http://kisd.de/~lutz/3dtest/explode/[/url]

    hondo3000 Guest

  2. #2

    Default Re: havok explosion demo

    Very interesting. It's working fine for me too. Congratulations.
    Americo Guest

  3. #3

    Default Re: havok explosion demo

    cool. runs smooth on my computer at work
    win xp pro
    2.4 ghz p4
    512 mb ram
    nvidia geoforce4 mx 440 agp8x
    Ex Malterra Guest

  4. #4

    Default Re: havok explosion demo

    nice job!

    is all the scene of Havok's?
    bgsBS Guest

  5. #5

    Default Re: havok explosion demo

    to all:
    thanks , and thanks for checking it!
    >is all the scene of Havok's?
    in havok_xtra is nothing like a radial force field, so this part is calculated
    with lingo. everytime a explosion happens i apply impulses to the objects
    depending on their distance to the explosion. and this works fast enough to be
    used in a game.

    thanks again!

    hondo3000 Guest

  6. #6

    Default Re: havok explosion demo

    Hi cool demo,

    Can I ask if you actually delete each cube from the havok simulation and then
    recreate a new one or do you in fact just reposition.

    I have tried some similar stuff (primarily asteroids game) in the past however
    after a period of approx 5 min I always seem to gain a memory drain and plummet
    in frame rate when I delete and then add to the simulation.

    To overcome this I reposition the havok model and all runs fine. I?m culling
    my scripts fine according to the inspectors and remove all references it just
    seems that deleting and adding to havok causes memory drain over periods.

    Do you know if there are or suggest any references created in havok that could
    add up and thus I might be missing?

    Any suggestions would be great.

    Cheers, SJB


    S.J.B Guest

  7. #7

    Default Re: havok explosion demo

    thanks for the tip, i let the demo run the whole night and in the morning it
    was very slow everytime when a explosion happend.
    and i did not thought about a memory leak in the havok xtra. i think there are
    only two ways to get out of the problem.

    the manual says about deleting rigid bodys
    Syntax:
    havok.deleteRigidBody(RBName or RBIndex)
    Description:
    This function removes a rigid body from the physics simulation given the rigid
    bodies
    name or index.

    and i thought it would remove the deleted rigid body from memory and not only
    out of the simulation. this is different.

    i came to the idea to write a clean-up-havok-script that uses:
    Syntax:
    havok.shutdown()
    Description:
    This function stops the current simulation and removes it from memory.

    but before shutting down the simulation it is nessesarry to record all things
    that should be in the simulation. This could be done with a list, where
    everytime when you create something in the havok xtra it is stored and removed
    when you delete a rigid body.

    in the moment before the shutdown the script should hold all propertys of the
    moveble bodys like force, angular velocity, linear velocity and so on. so they
    can be recreated after the shutdown.

    i did not tested this, but i think its not a big thing to transfere everytime
    something is added or deleted to the simulation in a propertylist. or one list
    for every havok class like springs, dashpods, movable rigid bodys and so one.
    and call the resethavokscript when you deleted x times something. at the
    moment i am not sure if this would lead to new problems or a big stuck of the
    simulation.

    it would be really nice if the havok xtra would be updated....

    the other way would be not to delete rigidbodys and recycle them. but i dont
    like the idea not to get things out of memory.

    if a have a script to test i will add it to this post.

    hondo3000 Guest

  8. #8

    Default Re: havok explosion demo

    Ha, I never thought of trying to use the havok.shutdown() to clear out the
    memory.

    You have inspired me to re visit an old project, in brief im going to try use
    an ancestor script to hold havok reference and control of all its child
    asteroids.

    The only thing that worries me at the moment is how re-initiation
    (registerStepCallback for each instance) will affect playback. Ill have a play
    and get back to you.

    Cheers, SJB


    S.J.B Guest

  9. #9

    Default Re: havok explosion demo

    Hello again,

    I have had a look at trying to use the havok.shutDown() command to clear out
    memory but to no avail im afraid. I have even tried using to havok members and
    swapping between them again no joy as suspected re initiation causes to much of
    a lag.

    However I implemented a system that uses a parent scripts to hold individual
    havok information for individual rigidBodys. I then use these instances as
    ancestors for additional parent scripts that control position and function.

    The following is a quick demo:

    [url]http://www.digitalpaintandink.co.uk/demos/inprog/shootNew.asp[/url]

    Mouse to move click to shoot.

    Id be interested to see how it performs on a range of machines, suspect an
    issue of number of bolts created dependant upon framerate - still needs tweekin

    Cheers, SJB

    S.J.B Guest

  10. #10

    Default Re: havok explosion demo

    on my maschine the demo runns smoth even after the n'th shot. it runns very
    smooth.

    on one of my projects i found something wiered that i can not explain at the
    moment. i found out, that the havok xtra runs for exactly 513 seconds my movie
    becomes slower. in this thing is not deleting of havok bodies. it makes me
    crazy....

    here is a link to it:

    [url]http://www.kisd.de/~lutz/chat3d[/url]

    no objects are added or deleted when the movie runs. if i start the movie
    again everything seems to be ok. but if it runns more then 513 seconds it
    becomes a little bit slower. i am confused ...

    hondo3000 Guest

  11. #11

    Default Re: havok explosion demo

    Hello,

    I do like your graphical style looks nice, all seemed to run ok on my vaio
    after 513, ill check again in a bit on me mothership and get back to you. In
    referance to our discussion have a look at the following:

    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19119[/url]

    One of my collegues suggests the use of.registerScript / .registerForEvent
    when workin with 3D, I am currenty looking into this.

    I have added some roids and first stage of skybox to my demo, same system as
    bolts.


    S.J.B Guest

  12. #12

    Default Re: havok explosion demo

    very cool thing, very nice grafics and skybox! very good idea to go back to
    this project and finish it, so we all can have some fun destroying asteriods!

    thanks for the links to the timeout thing, i included it into my code, but no
    change. it seems that i fixed the problem, i am not sure why it happend after
    this specific time on my maschine, but, and here comes the answere, it has to
    do with the registerInterest thing.

    i executed code in a collision handler, to be exactly, if you check out the
    demo you can only move when you are on the ground. the code to check this is
    executed in a #collisionhandler.
    my 3d world should run at 85 fps, but i want the havok xtra to work at 60 fps
    with 4 substeps for a stable simulation. so i did this:

    phavok.registerInterest( walkboxname, #all, 60, 0, #collisionHandler, me )

    this should check for collisions at 60 fps, somehow this works very good in
    the beginning. so it runs very smooth. but after a simtime of 513 it was only
    called about 50-60 times per second. so i changed the registerinterest to :

    phavok.registerInterest( walkboxname, #all, 85, 0, #collisionHandler, me )

    and this works very good now, at the moment i have no problems with it. now i
    am happy again :).





    hondo3000 Guest

Similar Threads

  1. Using complete demo?
    By SonixLLC in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: June 6th, 11:14 AM
  2. demo
    By thunderkatz in forum Macromedia Director 3D
    Replies: 4
    Last Post: August 6th, 03:34 PM
  3. Contribute Demo
    By Mark_Smith in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: May 17th, 06:37 AM
  4. [OT] looking for demo/screenshots
    By Ned in forum Macromedia Director 3D
    Replies: 4
    Last Post: February 1st, 10:52 PM
  5. Dialog box demo
    By George Bisson in forum Windows XP/2000/ME
    Replies: 2
    Last Post: July 8th, 04:24 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