Newton Dynamic Physics Integration

Programming Reality Factory and Genesis3D.
User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Post by bernie »

Hey Federico you're a genius. Great work. Looking forward to a release. whoooo hoooo :D :D :D
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Another Quick update:

I've added a spout effect in the collision callback. Make it definible through the Physicsmaterial entity it's just a step. Right now you can define in the editor the impact sound for the material, next you will be able to define the spout parameters. The callback simply stores the collision position and force, then takes the data defined in the material and do two things: it plays a user defined sound and creates a spout on impact event. The interesting thing is that the effects are tuned to reflect the forces of the two colliding bodies. I used those parameters to set the volume for the audio FX and to tweak the alpha and velocity of the spout.
I think it looks great. :wink:

Video:
Image

P.S. the previous video is quite slow, not only because of fraps. I turned on stencilshadows for an eye-candy effect, but I was wrong. Usually I can't play anything with those setting on my low-end laptop; it isn't about physics, it's my card that sucks. So this latter video, without stencil enabled, actually reflects the engine performance.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Excellent work! The videos are simply fantastic. I can't wait for the release. :D
Pain is only psychological.
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

how fast does all this stuff run on your computer. the videos look really good but i can imagine anything this complex running this fast on my computer.
is there a way to make the physics of actor spout a bit more realistic?
another question.
will we bbe able to script physics controlled objects?? like boxes that splinter into pieces when damaged or physics controlled grenade projectiles???
that would be awsome.

Thanks,
fps
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

the videos are recorded on my laptop toshiba PentiumIII 512MB with intel graphics card. It's one of the worst machine I ever owned.

The first version RF+Newton will not have physics integration in the particle system, nor in the projectile/weapon system, nor in the effect system. Probably the last one could be the easier to integrate so I could think about it but right now it isn't planned, in the future maybe...
The scripting system will be present but bare-boned:
- create objects (static and dynamic)
- create joint
- create materials
- freeze unfreeze bodies
- move rotate bodies
- apply forces and get calculation from the engine

so there's every thing you need to create "new things" but forget about
boxes that splinter into pieces when damaged
It's a rigidbody simulation.

eventually those things could be faked even right know using the actor spout or the explosion system...
I want to focus on simple tasks with few options.
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi Federico

Good job !!!.

I want to comment something to you.

My work is something different from his, and perhaps we can learn one of the other one.

You work with script, and I don't use script.
I built kind of a framework inside my smalltalk, where I encapsulate the functionality of Genesis3D and Newton, for then to build a model for my game .
One could make the same thing from any other programming language.

There are several things that I wanted to ask, but now I am short of time.

Topics:
Scale world , timeSlice, etc

Now you stay it alerts.

Kiko
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Closer and closer...

Finally I got the player integration done. Works with the Standard RF Player and with the Scripted player. The shape, the mass and the dimensions of the player physics Bounding BOX can be adjusted in the editor.

Video:
Image


@ Developpers, I need some help: Is there a way to extend the Genesis BoundingBox Y < 0? Setting offset in the newton collision is extremely difficult. The easy (and the only actually functional) way to export a physics object from milkshape id to set the center of the mass in the pivot coordinates, but the resulting genesis bbox covers only half body...

@ Game designers. If some game designer with some active project (I mean really and currently active), wants to test the current release and report errors and bugs is welcome. Next week I should have the first release without scripting but with all the basic physics entities in the editor (bodies, materials, joints, player integration, projectiles). My tests are limited to the developped feature and I need someone with a project set up and working: I need to know if simply switching from 075C to my release there are some unexpected troubles (failing collisions, crashes ...).
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

@ Developpers, I need some help: Is there a way to extend the Genesis BoundingBox Y < 0? Setting offset in the newton collision is extremely difficult. The easy (and the only actually functional) way to export a physics object from milkshape id to set the center of the mass in the pivot coordinates, but the resulting genesis bbox covers only half body...
geExtBox_Scale() should do that for you. Why not center the mass on the root bone?
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

federico wrote:@ Game designers. If some game designer with some active project (I mean really and currently active), wants to test the current release and report errors and bugs is welcome. Next week I should have the first release without scripting but with all the basic physics entities in the editor (bodies, materials, joints, player integration, projectiles). My tests are limited to the developped feature and I need someone with a project set up and working: I need to know if simply switching from 075C to my release there are some unexpected troubles (failing collisions, crashes ...).
Yes, absolutely! I'd love to test this! Just tell me what I need to do since I have no experience whatsoever on testing like this. :)
Pain is only psychological.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

geExtBox_Scale() ?
Really this can extend the BBox under the Y=0?
That would be nice.

It's not possible (or it's too difficult for me) setting an offset to the newton collision. In fact, when you pass the genesis origin and BBox dimensions of the actor in order to create the newton collision, you pass as origin the pivot coordinates of your editor, that is between the foots of virgil, and not in the RootBone. Then you pass the AABB Bounding Box dimensions, and newton rightly extends the collision geometry from the pivot in the three axis.
So:

Genesis BBox:
_____
|xxxx|
|xxxx|
|xxxx|
------------- Y = 0 the genesis actor is above the origin

Newton BBox:
_____
|xxxx|
------------- Y = 0 the newton collision is around the origin
|xxxx|
------

the best way to avoid this is to center your body before the export in the pivot axis. But the genesis BBox doesn't calculate in the BBox height all the geometry that is Y < 0.

Exported this way, the genesis actor correctly moves with the newton geometry but the genesis bounding box starts in the middle of the actor (that is Y >= 0).

Newton BBox:
_____
|xxxx| Genesis BBox & Newton collision
------------- Y = 0
|yyyy| Newton collision
------

i could pass the origin of the RootBone, but then I will have to calculate the matrix local translation to set the actor position when I have to Trasform the actor position and rotation according to the physics. The transform callback has to be faster as possible, all that calculation would be the murder of the application. The best way is to work in the genesis side and extend the BBox under the Y origin.

I will try your suggest. Help is appreciated. :wink:
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

would we be able to move objects with explosions by creating a circular bounding box (or ball) that rapidly expands to create the effect that objects are being thrown by the force of an explosion?


<--O O-->
< ( ( (()) ) )>
Not now. i mean could we implement this in the future. i only ask because you are having trouble with bounding boxes and i was wondering if there was a way to make a "spawn a rapidly expanding collision ball" thing that could apply forces on the things it collided with. or am i wrong about this even being needed?
thanks,
fps
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

also.

i am so excited about this release! i could scream and break things at random. :D :D :D
you are a genious! i cant wait.
is there going to be an integration with jays new release when it comes out?
also is that rotate bone scripting command going to be in the release?

Thanks,
fps
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

would we be able to move objects with explosions by creating a circular bounding box (or ball) that rapidly expands to create the effect that objects are being thrown by the force of an explosion?
Once created the Newton bbox can't be modified. There are other ways to simulate explosions, even without newton.
Is there going to be an integration with jays new release when it comes out?
Sure I'm working on the basic integration so I can pass it to jay.
also is that rotate bone scripting command going to be in the release?
Yes. It was created to have ragdolls working. I think it can be useful for many other things. The trouble is that I had to modify the genesis source. So, to compile RF+Newton, you will need this source.
i am so excited about this release! i could scream and break things at random.
So am I. :D
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi Federico

I center my body before exporting from 3DS.
This problem I found it quickly as you, but I didn't want to get complicated and I solved it centering the bodies in 3DS.
It would be good to find a better solution.

kiko
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

i am having a little trouble following this problem. i have a large model resource already and should i worry about having to change them? all of my models are placed on top of the origion in milkshape. will they still work?
also
I had to modify the genesis source. So, to compile RF+Newton, you will need this source.
will i have to do this on my own or will it be in the release?
And what is the difference between what you are modifying now and the genisis source?

Thanks,
fps
Post Reply