Jump to content

[Continue Work ]Radgoll progress


Yue
 Share

Recommended Posts

Quote

When I run the ragdoll with SetParen, assigning as parent of the bone the rigid body. The ragdoll looks decent. The thing is that when I finish the ragdoll, I can't use animations like standing up. The skeleton is already related to the rigid body. 

Ok. Did you try to unparent with SetParent(nil) ?

 

 

Link to comment
Share on other sites

7 hours ago, Marcousik said:

Ok. Did you try to unparent with SetParent(nil) ?

Yes, I have tried to use SetParent, nil, but it happens that the skeleton seems to be unhooked from the mesh, and from the character controller.

The most viable would be to use SetPosition and GetPosition, but in what I have tried it is impossible.

 

 

Link to comment
Share on other sites

Looking at the hierarchy of the bones, when we use SetParent(nil), what happens is that those bones are orphaned. In the hierarchy some of them are related and that is what breaks the skeleton. 

For that reason the most viable is to use SetPosition, GetRotation, but for some reason the update is imperfect, and you have death cramps which is not natural for the ragdoll effect. More likely for a horror scene, yes.

Translated with www.DeepL.com/Translator (free version)

 

 

Link to comment
Share on other sites

Another drawback I have is that the joints rotate around the global coordinates, so no matter how much care I put into setting up the joints, the character in one direction executes the joints correctly, but if it is facing the other way, we have problems with one leg rotating in the opposite direction than normal.  

Perfect.


image.thumb.png.6eaaf4fdba8a272f697d72616181a581.png
 

Error.

 

image.thumb.png.c96176ef3d9ed3ce756f31b3cee69d1a.png

 

 

Link to comment
Share on other sites

On 2/21/2021 at 6:32 AM, Dark Yue said:

The war with the ragdoll goes as follows: it is impossible to restore an animation when the character is hit by a vehicle and gets back on its feet. This is because the commands SetPosition, GetRotation in LE 4.6 produce a death shudder, like a déjà vu in the best style of the matrix, I do not know if to say that it convulses, or is possessed. For that reason it is better to use SetParent, this implies not being able to make the restoration in the best style of GTA V.

This cannot be done.
https://thumbs.gfycat.com/FlickeringOrderlyAplomadofalcon-size_restricted.gif

 

https://thumbs.gfycat.com/HeartyMistyIberianmole-max-1mb.gif

 

Then, the ragdoll, it will only be possible to unleash the death of the character. And you can reset the character without problems, to return it to a checkpoint to continue the game.

 

Is this video meent to demonstrate a problem? It looks quite stable to me.

Why would you not just create a new model when the player is reset? Why bother trying to restore it when you can just create another one and delete the old one?

I think it is probably best to first create a ragdoll with visible boxes for testing, rather than trying to show the animated model use the physics before the physics are finished. Right now it is confusing because you are still trying to test the physics and make a skinned model match the physics model. Those are two separate problems that are being mixed together, which makes it hard to solve.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

While physics are still in development, I would expect to see this:

  • The animated model moves around.
  • When the ragdoll is activated, the animated model is hidden or deleted, and a ragdoll made out of boxes is visible.
  • When the player is reset, the ragdoll is deleted and a new copy of the model is loaded / created.
  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

When you execute the ragdoll with the initial orientation it is executed correctly, its joints work correctly, the knee bends at the correct angle, but if you change the orientation of the model, to the right for example, the leg bends in the opposite position, because the joints have global rotations. 

 

 

Link to comment
Share on other sites

41 minutes ago, Dark Yue said:

When you execute the ragdoll with the initial orientation it is executed correctly, its joints work correctly, the knee bends at the correct angle, but if you change the orientation of the model, to the right for example, the leg bends in the opposite position, because the joints have global rotations. 

Right, but when we try to improve this it is confusing to have multiple layers of stuff to deal with. I think we need to separate the visible mesh and the physics ragdoll next so we can debug it more easily. When I try to change your code it behaves in unpredictable ways and I can't tell what is happening.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The first video refers to when I use SetParent, this second one I am using SetPosition and SetRotation, because that would provide the possibility to run an animation after the ragdoll effect, but it does not work correctly.

Regarding what you mention, I think I could make a simple example of a hinge joint doing the ragdoll effect on a worm. I think me without knowing that possibly the joints are missing a rotation value if it is global or local. And the position and rotation updates I have no idea.

Translated with www.DeepL.com/Translator (free version)

 

I will make a simple example of a union.
 

 

 

 

 

Link to comment
Share on other sites

I will spend some more time on it tomorrow and see what I find. For some reason, if I move the SetRotation() / SetPosition() calls after the joint creation, the program crashes. That is the way I would expect to implement this, because you want to create the joints in the starting orientation to get the right angles.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Making progress. I am going to run it from the Leadwerks source code next and see if we can make the positioning work after the joints are created...

  • Like 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Yue changed the title to [Continue Work ]Radgoll progress

The decision to use Vulkan means I have to spend today working on some weird obscure error messages instead of helping you. That's just part of the deal when people said I had to use Vulkan.

  • Sad 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I am now able to examine your project in the debugger and there is some kind of floating point error occurring. I am checking with Julio about this.

BTW, it is possible to report bugs directly to the developer of Newton since the physics library is an external DLL that can be debugged or replaced.

  • Like 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

23 minutes ago, Josh said:

I am updating the engine to the latest version of Newton first...

You give me a lot of encouragement, it's been a nice long road with Leadwerks, since the Blitz community disappeared, then I'm getting closer and closer to create a video game. And this ragdoll effect is very nice to implement the character death and standing up after the ragdoll effect.

And my daughter is happy and gives me a lot of encouragement to make her video game where the character is her.

Translated with www.DeepL.com/Translator (free version)

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...