Simple Car Demo!

Topics regarding Scripting with Reality Factory
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Nice work indeed. :D

I got one little question too: Do the physics work on bsp geometry also? Or only actors?
Pain is only psychological.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

All i think it needs is the ability to define several impact sounds for when the boxes hit the ground and land in warer and stuff, that would rock!
sound management on physics implementation is one of the next goals. It isn't so difficult, we are only working on some other basic stuff.
1 question though, can the physics of the boxes being hit with the car work with the regular player charector and other pawns instead of the HL buggy?
Now your player isn't completely a physics entity, but this is another feature quite easy to add in the future. Naturally you can approximate this, attaching the player to a physics entity and then move it in the phyics world. Nout is planning to add this in some better way.
Do the physics work on bsp geometry also? Or only actors?
the actors can have physic properties like mass and buoyancy, they fall and bounce on the floor and on the walls. The bsp level is "translated" from genesis to tokamak world to be a staticbody, that is a body that can't fall or rotate, or something else, in the physics world and has only the collision (with friction and restitution) attribute (the physics objects bounce colliding with it).
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 »

In looking under the docs file i also noticed a "ragdoll" feature. is that currently functional?
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

probaly ragdoll works. But it is a group of different bodies jointed together and not a skinned character that can be activated as a ragdoll. This has to come in the future (and I don't mind how this can be done). Currently ragdolls are "puppets" composed of different bodies. Skinned ragdoll are far to come (or am I wrong nout?)...
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 »

Ive seen ragdolls used in other video games by way of making the ragdoll invisible and inactive attached to the charector, when the charector dies it activates the ragdoll, makes the pawn invisible, then makes the ragdoll visible.
Would you be able to do this for the RF?
either that or spawn the ragdoll and teleport it to the proper point in the level.

By the way, what do you mean by not skinned? wouldent skinning be the easy part?

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

Post by federico »

ok, yes. Teleport the ragdoll and make the pawn invisible is a solution but with a limitation. What I mean with "skined ragdoll" is this: with the ragdoll entity currently you can create a combination of bodies jointed togheter. This would mean that the body parts have to be separated mesh joined togheter. In this way we don't have a ragdoll with a unique "skin" but several skinned parts. This can be done in a good way to make the tricky effects invisible and make the ragdoll look as a unique body.
To have a skinned ragdoll instead we would have to attach the actor bones to the ragdoll joints and make them move togheter following the tokamak physics. But a question arises: Is it possible to manage directly the bones of an actor? I don't see any genesis command for this in the api. Can QoD analyze this question? Is it possible to freely move and rotate an actor bones, so we can attach the skeleton actor to an invisible tokamak ragdoll?
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 not sure about that last part, but i would really like to at least mess around with this. it would be perfect for damage models (different skins with added blood, missing body parts, nuked skeletons ect...), if if we could use that break/glue joint command it would be really cool.

Just as a test i want to try that teleport system to make a charector that can be killed to activate a ragdoll (and blown apart then reglued and respawned with full health at the point of the ragdoll.)(optional at this point).

I am fine with the ragdolls beeing made up of different parts and i would be relitivly easy to find a bunch of parts i could use.

The only problems that I really see is that if i wanted multiple charecters they would each need their own individual script to activat their own individual ragdoll, also meaning that I would need a hidden room full of ragdolls. also to avoid frame rate issues after a few secconds i would need to freeze the pawn and make it inactive again.
Apart from that and the fact that i suck at scripting and know next to nothing about physics i am good to go.

For test limbs parts i would be fine just useing square sections.

Do you think that you could help me do this? I would have to use your executable, would you be alright with that?


Just for the test we could use a virgil pawn that, when killed spawns the ragdoll. then (for testing) a key like numpad5 respawns virgil and hides the ragdoll.

can you let me know how i would go about setting this whole thing up?

Thank you very much,
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 »

How do you set up a rag doll?
I want to just try standing one up in a basic box level and shooting at it for now.

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

Post by federico »

Due to the development stage of the physics, setting up a ragdoll entity isn't so simple right now. You don't need only the executable, you also need the gamedataentitytypes.h that is located in the source folder of the physics archive. Without this you can't see the physics entity. you have to place it in the source folder of you working directory. in this way you can set up the ragdoll entity. I haven't test it deeply but Nouts said that it works. There are different way to make the ragdoll work with the standard RF pawn but they have to be scripted from scratch and definively they aren't a good way to reach the goal. Teleport the entity is a good solution but how can we force the ragdoll to take the position and the rotation of the killed pawn? there are different solutions but all are difficult and not so orthodox.
Now we are working on vehicle physics so ragdolls aren't in development at this moment so it could be a nice idea if you can begin some test. The first step is to see if the ragdoll entity really works or if there are some issues. then you could break ( :twisted: )the virgil's body and use it as ragdoll.
Good work ! 8)

POST SCRIPTUM: the question is the same to wxb1 or QoD or osome one else.
Is it possible to update by command a bone rotation and position inside the engine?
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 will give it a shot but I can promise nothing because I am hardly competent as a scripter. but I will like I said give it a shot.

What would be nice in the final version would be the ability to just load an actor into the phyisics engine and under its pawn entity be able to name which bones/joints are to preform under ragdoll physics and under what restrictions.

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

Post by federico »

two notes:
1) currently you don't need to script anything. If you put the correct (the physics one) gameentitydatattypes.h in the source folder of your working directory, you will see the new entities in the editor. There is a physicsragdoll entity. Use it first.

2)
What would be nice in the final version would be the ability to just load an actor into the phyisics engine and under its pawn entity be able to name which bones/joints are to preform under ragdoll physics and under what restrictions.
the problem is exactly this: i don't see any problem to test the ragdoll untl we can have a good behaviour of this feature but i the same time I don't see how we can move the bones of an actor so make them fit the ragdoll's joints position and rotation. Currently the actor substitutin is the only solution

P.S. use RF073withPhysics7Jan2006.zip that you find here: http://realityfactory.altervista.org/download/
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 »

what about how we make the weapons bones match the players animation?
Is there some way to create a ragdoll that is just a skeleton and snap a pawns body to them by making their skeletons the same?
Then all we would have to do is make it so we could use different shaped skeleton by defining what bones there are and were they are.


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 »

I have a question about using the physics source for my own levels.
I add the physics ragdoll to my level and compile, when I play the level there is no ragdoll. what do I need to do to get physics objects to show up?

Thanks,
Fps
User avatar
Spyrewolf
Posts: 450
Joined: Tue Jul 05, 2005 4:53 am
Location: Wellington::New Zealand

Post by Spyrewolf »

i think that there was some code written a while back for specific bone management, i think gekido was messing with some setting for animation blending in the actor viewer? i can't quite remember, i think Pickles also was toying with bones, to create a scripted physics

there may be some code floating around, but whether it is implemented or not i am unsure, maybe some of the coding guru's can give you a bit more insight to this, all i know is that other have played with scripting for bones in the past...
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

@fps

I apologize 'cause I missed yourpost. Are you using the RFwithPhysics release of the 7 january?

Make sure to fill all the fields of the physicsragdoll entity. Give me more details or post a t3d level so I can see if there's something wrong. I tried that entity some time ago and I found his behaviour quite strange. I'll look at that part of code soon.
____

@Spyrewolf
yes pickles was toying with bones. He has added the GetBone script commands but they seems to use only genesis commands that "read" the position rotation of the bones. We need some command to put a bone in a defined position and orientation. But has Genesis3d this capability?
Post Reply