@fps
1) Ragdoll skeletons. I think I should make an .ini reader to get the skeleton parameters. Though right know I didn't understand why I have to ad those value as base rotation of the bone. In fact I've empirically found the values and they don't seem related at all to the joint base rotation you could read in the modeler. Even stranger: the rotation needed to place the physical objects that compose the ragdoll differs from the rotation needed to align the bones to the objects once the ragdool is activated. So, if you really want to have an ini definition for this you should wait more time, first I have to understand the issue. Right now you can have the farcry model (setup and alignment correct) and hl2 model (incorrect setup and correct alignment).
2) about the mounth animation, I don't know what to say. I suggest you to work with the smd format (in 3dsmax and milshape) because you can manage the animation in a easier way. I use the bdy and mot format as final step. Don't you know that in smd format you can export only the legs or torso animation (preserving the Bip01 root), deleting the bones you don't need, to import them in a complete animated skeleton to override ony the imported bones? I think that the bone commands can't help you.
3)
the offset matrix must be initialized completely, including the balck spot matrix[0][4], matrix[1][4], matrix[2][4], matrix[3][4], (or matrix[3],matrix[7], matrix[11], matrix[15]). That was my problem. So to have a compete initialization I let newton do the work for me, makung him computing a matrix from an euler triplet (NewtonSetEulerAngle). Then I add the offset translation (matrix[12],matrix[13],matrix[14]), calculating the translation as a fraction of the BBox. So OffsetY=0.5 will raise the collision box to the center of a standard Genesis actor (Y>0).You wrote:
Today I solved the pivot issue
Could you explain as it got it?
Code: Select all
geExtBox theBBox;
CCD->ActorManager()->GetBoundingBox(PhActor[Ph_rgNr], &theBBox);
float DeltaX = (theBBox.Max.X - theBBox.Min.X)*ActorScale.X;
float DeltaY = (theBBox.Max.Y - theBBox.Min.Y)*ActorScale.Y;
float DeltaZ = (theBBox.Max.Z - theBBox.Min.Z)*ActorScale.Z;
float offset_matrix[16];
geVec3d Rot_Zero;
geVec3d_Set(&Rot_Zero, 0.0f, 0.0f, 0.0f);
NewtonSetEulerAngle(&Rot_Zero.X, &offset_matrix[0]);
offset_matrix[12] = (float)DeltaX*Offset.X;
offset_matrix[13] = (float)DeltaY*Offset.Y;
offset_matrix[14] = (float)DeltaZ*Offset.Z;
// create the collision
collision = NewtonCreateBox (nWorld, DeltaX, DeltaY, , &offset_matrix[0]);
4) breakable joints are possible, I've tried but I get crashes and instability: not this release for sure, sorry.
5)
Yes, to enable the ragdoll you have to SetEventState("EntityName_Die", true);we just use like a script command to make the thing go ragdoll mode?
one more question.
will we be able to match the ragdoll to the pawns bone position like last time, so it flows smoothly?
and yes, as I said earlier the farcry skeleton correctly setup itself to match the actor bone rot and pos.
6) I didn't understand the question about dimension, kiko, sorry. If you are talking about scale, I don't have any scale, so 1 texel is 1 newton unit. The physics engine is supposed to be agnostic about the unit type. The genesis scale anyway is really large, and the newton update is capped to a defined framerate, so I changed the NewtonUpdate I posted before.
Same parameters as above:
Code: Select all
//Tick
float dwTicks = 0.0f;
dwTicks = (float)(TimeTicks)/IterationTime;
for (int p = 0; p <(1 + dwTicks); p++)
{
for(int s=0; s<UpdateLoop;s++)
{
NewtonUpdate (nWorld, dwTicks*AdvanceTime);
}
}
6) some update by me:
- Barrel physics using cylinder primitive.
- The physicsJoint entity is ready. Three joints: hinge, ballandsocket, slider. I'm testing.
- The PhysicsEntityCapsule is ready. This entity place a primitive around a genesis entity (a pawn for example) to simulate the collision for newton bodies. So when the pawn hits a newton body makes the object react and vice-versa. It's a way to integrate the two worlds, genesis and newton, without replacing all the collison system. This means that the two engines could run faster and that the equilibrium is quite fragile.
Theorically I completed my tasks, besides the needed bugfixing and testing.
I need an artist who creates an arena level for me, detailed and graphically optimized. Testers are also welcome but I'm willing to accept only people with Rf experience and with an existing and working project: we have to focus on physics and optimization, creating documentation and tutorials. If no one wants to help, I will release anyway but the doc and tut part will come later in the forum.
I always trust that QoD could have some interest in this release...
Bye.
Federico