Very interesting. It's working fine for me too. Congratulations.
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]...
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]
Very interesting. It's working fine for me too. Congratulations.
cool. runs smooth on my computer at work
win xp pro
2.4 ghz p4
512 mb ram
nvidia geoforce4 mx 440 agp8x
nice job!
is all the scene of Havok's?
to all:
thanks , and thanks for checking it!
in havok_xtra is nothing like a radial force field, so this part is calculated>is all the scene of Havok's?
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!
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
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.
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
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
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 ...
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.
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 :).
Bookmarks