Newton Dynamic Physics Integration
-
- Posts: 37
- Joined: Mon Sep 25, 2006 1:12 pm
Thanks for the report, Jutiis. This take back one issue on my work that I didn't choose how to solve, that is the collision between the player and the ragdolls. You could try to increase the PlayerYOffset value to raise the player BBOX (make it visible setting a PlayerShapeAlpha value different than 0). You could also try to change the shape or the dimensions of the BBOX setting different values in PlayerShapeScale and Shape parameters. Try "Box 0" instead of "Cylinder 0", or the inverse. This could make the collision more effective. If the bug persists, I will consider to disable the player/ragdolls collisions (but this would mean say goodbye to ragdoll materials).
After the change of my computer (I've taken the "old" pc of my dad. now I have a real Graphics card! Sapphire X1950 pro), development continues. Julio Jerez - the main Newton developper -graciously gave me a beta of the upcoming release of Newton, which I integrated yesterday. The lag is now minimized and if if happens doesn't lead anymore to a complete stop of the simulation. Tough the valve skeleton doesn't work anymore.
I've started adding the last features of my release: new pawn script commands to control and create physics objects. Tonight I added a pawn command to create physics object that is the corrispective of the PhysicsRigidbody entity. Works perfectly...
I've started adding the last features of my release: new pawn script commands to control and create physics objects. Tonight I added a pawn command to create physics object that is the corrispective of the PhysicsRigidbody entity. Works perfectly...
- fps
- Posts: 504
- Joined: Mon Sep 26, 2005 9:54 pm
- Location: in a magical land devoid of hope, happiness, and sanity.
i am glad to hear some news about the physics system.
are you still working on a file for custom skeletons?
i have a question though.
I want to have features in my game that are similar to half life two.
here are some examples of things i want to add to my game.
are they possible.
"door" blown off hinges by explosive generates a damage value based on the speed it is traveling, its weight, and possibly its material. pawn will then read the damage value and determine the outcome (if < 40 then stumble and take damage/2, if > 40 and < 60 get "knocked back" (pawn is ragdollised but gets back up if not out of health) and take damage, if > 60 pawn automatically dies and ragdoll gets force applied).
thats a lot but theres more.
ragdollised pawn falls onto glass and glass is destroyed without pawn loosing too much momentum from collision /w solid object.
are any of these things possible? if not, could you make this a feature request?
thanks,
fps
are you still working on a file for custom skeletons?
i have a question though.
I want to have features in my game that are similar to half life two.
here are some examples of things i want to add to my game.
are they possible.
"door" blown off hinges by explosive generates a damage value based on the speed it is traveling, its weight, and possibly its material. pawn will then read the damage value and determine the outcome (if < 40 then stumble and take damage/2, if > 40 and < 60 get "knocked back" (pawn is ragdollised but gets back up if not out of health) and take damage, if > 60 pawn automatically dies and ragdoll gets force applied).
thats a lot but theres more.
ragdollised pawn falls onto glass and glass is destroyed without pawn loosing too much momentum from collision /w solid object.
are any of these things possible? if not, could you make this a feature request?
thanks,
fps
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.
Right now, if you make the doors using newton bodies connected by joints (as in my demo5) you can make one joint unbreakable (it's the door pivot) and the other one breakable, so it reacts and breaks if the door is subject to a defined force.
All the other features you suggest cannot be made by my simple implementation. Consider if you want to make an HL2 mod...
About the ragdolls I don't know how to behave right now. First I want to release the code. Next QoD will integrate it in the main code, then we can see if that feature is really needed.
All the other features you suggest cannot be made by my simple implementation. Consider if you want to make an HL2 mod...
About the ragdolls I don't know how to behave right now. First I want to release the code. Next QoD will integrate it in the main code, then we can see if that feature is really needed.
- fps
- Posts: 504
- Joined: Mon Sep 26, 2005 9:54 pm
- Location: in a magical land devoid of hope, happiness, and sanity.
I think i could make a trigger above the glass pane that causes the glass to break when impacted.
=+o
---------------
__________
---------------
__ =+o ___
. . . . . .
can ragdolls activate triggers like the player does. on impact?
=+o
---------------
__________
---------------
__ =+o ___
. . . . . .
can ragdolls activate triggers like the player does. on impact?
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.
You don't need physics to set a trigger. You would need physics to make the glass breaking simulation. I state it again: no breakable objects in this or future releases. You can fake it tough, jointing different objects together and then breaking the joints using forces or a trigger. This is not the same thing than having a breakable object: you have to create several objects and then find a way to pack them together using the joints. Really, i don't thnk it's a good idea. Why instead of asking expensive features to develop you game, don't you try to deal with the tool as it is right now and think about solutions to create what you have in your mind?
Ragdolls are applied to pawns or staticentityproxies so I think yes.
Have you tried the physics entities yet? Try the PhysicsJoint entity, try to replicate the door in my demo5 in your game. Let's see how it works, then we can think about alteranative solutions. We have to see if they are really needed, after all.
Ragdolls are applied to pawns or staticentityproxies so I think yes.
Have you tried the physics entities yet? Try the PhysicsJoint entity, try to replicate the door in my demo5 in your game. Let's see how it works, then we can think about alteranative solutions. We have to see if they are really needed, after all.
Every brush is copied in his initial position and transformed in the background collision geometry for the physics engine. So my answer is No, unless you make something tricky. That's what I made for my water implementation:
I created the model of the water brush in his correct position and then I placed down the floor (i could have moved it behind a wall: it's the same). Then I added an animation for it that moves the model again in his correct position at 0.1 seconds and I triggered it to begin at levelstart. When the level starts, the geometry stored by the physics engine for the water brush is under the floor, then at the time 0.1 seconds the model animation is played once positioning the water again in his correct position. Result: the physics actor can fall through the water brush when seconds > 0.1 (pratically you can't notice the brush animation).
I hope this can inspire you to find a solution for the effect you want to achieve.
I ask you again: have you tried to build something with the latest physics release? I think you should to understand your needs and the limitations of my implementation. In this way we can find a way to use the features at their best and eventually fake what can't be done.
I created the model of the water brush in his correct position and then I placed down the floor (i could have moved it behind a wall: it's the same). Then I added an animation for it that moves the model again in his correct position at 0.1 seconds and I triggered it to begin at levelstart. When the level starts, the geometry stored by the physics engine for the water brush is under the floor, then at the time 0.1 seconds the model animation is played once positioning the water again in his correct position. Result: the physics actor can fall through the water brush when seconds > 0.1 (pratically you can't notice the brush animation).
I hope this can inspire you to find a solution for the effect you want to achieve.
I ask you again: have you tried to build something with the latest physics release? I think you should to understand your needs and the limitations of my implementation. In this way we can find a way to use the features at their best and eventually fake what can't be done.
Hm. It would still be good to have model support - also for thinghs like liquids (which could then be managed by the physics system...). You could write some meta-brush-collsion technique. I mean, you have a structure like this:
//PSEUDO CODE!!!!
struct MetaGeometry
{
WorldGeometry* theWorld;
Models* theModels;
int numModels;
}
and then you do the collision for the world geometry and for all models with their current bounding boxes/position seperately. Of course the problem is then to decide which geometry is models and which not, i believe. Or, wait, are you sure the model geomtry is copied with all the other geomtry? I think genesis handles models different from normal level geometry to ensure that you can collide with them properly.
Otherwise good work, when are you going to release the source code? Or am i missing something?
//PSEUDO CODE!!!!
struct MetaGeometry
{
WorldGeometry* theWorld;
Models* theModels;
int numModels;
}
and then you do the collision for the world geometry and for all models with their current bounding boxes/position seperately. Of course the problem is then to decide which geometry is models and which not, i believe. Or, wait, are you sure the model geomtry is copied with all the other geomtry? I think genesis handles models different from normal level geometry to ensure that you can collide with them properly.
Otherwise good work, when are you going to release the source code? Or am i missing something?
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
- fps
- Posts: 504
- Joined: Mon Sep 26, 2005 9:54 pm
- Location: in a magical land devoid of hope, happiness, and sanity.
Yes, i have tried working with a few of the features of the physics engine in a seperate installation of the rf engine. i dont want to implement it inot my game untill it has been combined with jays release because last time i tried to change my rf source (the last physics engine), the program rotated all my weapon view models and disabled half of my scripts.
am i right in thinking that because of this there is no way i could make things like trapdoors and collaping bridges. or a part of the enviroment that works like a catapult for the physics objects. i wanted to throw rocks in a demo. then they could hit triggerd parts of a far away building and destroy it. they wouldent need to go through. I think jay is right. but i dought that if you havent already done it that it would be easy to do.
I could do that for the windows, but can you destry a door model. i tried that in a level and it messed my trigger system up so bad that i couldent get it working again.
thanks,
fps
am i right in thinking that because of this there is no way i could make things like trapdoors and collaping bridges. or a part of the enviroment that works like a catapult for the physics objects. i wanted to throw rocks in a demo. then they could hit triggerd parts of a far away building and destroy it. they wouldent need to go through. I think jay is right. but i dought that if you havent already done it that it would be easy to do.
I could do that for the windows, but can you destry a door model. i tried that in a level and it messed my trigger system up so bad that i couldent get it working again.
thanks,
fps
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.
2 wrote:
You say that like it's a bad thing.
1 wrote:
You are a bad thing.