[OLD] SmartBone - An optimized module for Dynamically Simulated Bones

No I do not, but since the documentation under the Github has the WindSettings in Lighting Service implementation is easy for scripters.

To instantly replicate across all clients use a server script. Or, if you want more control per client, create a LocalScript within StarterPlayerScripts or any container that will run LocalScripts. Use my code implementation and you’re done. :slight_smile:

Has someone figured out actually working collissions? I really need them for my game.

You could try approximation for your collisions

What do you mean by “aprroximation for your collissions”?

That does depend on what you mean by collisions, I assume full collisions? Ex: Interacting with parts, non-jittery, maybe even cloth-like physics with enough armature.

But more importantly, it does depend on what you mean by “need”? I assume you only have an idea for a game that relies on collisions with smart bones, and so it would help if you said what kind of game your making.

I need full collisions, here is what I’m using smart bone for currently.
https://gyazo.com/a7562126469b918568deb46ea2415d03

Use a hinge-constraint, it will simulate collision.

I did and it didn’t work at all.

For me it works, you need to use it right tho.

2 Likes

Can you show me your setup is possible?

1 Like

I’m working on re-creating smart bone but with collisions. This is where I am at the moment:

Soon™

18 Likes

Bro, right when I was nearly done with mine LOL. Would you mind sharing your findings? You can reach out to me on Discord, my username is celnak.

Sent the friend request mincharlim

Is there a way to prevent models clipping through clothes when walking in certain directions.

I.e

image (Walking backwards)

2 Likes

Not yet, They’re adding collision checks in the future

1 Like

hoping to see a link to this once its finished it looks awesome so far, wouldn’t mind throwing a coin or 2 aswell :smile:

1 Like

I suggest using IKControls for collisions if you haven’t already considered that. I use them with skinned mesh rigs to create physics based ragdolls that support bones. You can easily attach a bone to a collideable part and the IKControl will move it directly to said part’s CFrame.

1 Like

Im not sure this would work with how smart bone currently works. With the variable update speed and roblox physics updating at 120hz we would either need to have 2 objects per bone or have bones update at 120hz and remove the ability to control this frame rate.

It would also be hard to extract information from these collisions used for collision response, collision point and normal. Raycasts / Shapecasts wouldnt suffice for this either due to the amount we would have to cast.

At the moment the current collision solver is quite fast. There are always improvements to be made but I believe its in a state where most people wont have any issues with it. And in the cases you do we will likely add the ability to toggle certain colliders or ignore them at certain distances etc.

Heres how fast our current solver runs:

Collision Constraint is where we do all our collision checks and response.
It takes 36μs on average to solve 29 colliders.
This means its about 1.2μs per collider.

All together a bone tree update takes about 0.2ms this is without parallelization, it is yet to be implemented but when it is we can expect a huge performance increase.

Thanks for taking the time to read this!

3 Likes

I’m not sure if I am completely missing your point but IKControls automatically CFrame the set bone at the CFrame of the target (which can be an attachment, BasePart, or any instance with a CFrame) with a setting for SmoothingTime, and Weight. IKControls also allow you to add an Offset CFrame which can be used to apply your modules previously calculated CFrames for things like wind. There is no need to retrieve the IKControl information, or update it’s properties (aside from maybe Offset).

However, your solver is extremely impressive. Those are beautiful stats and I give you the utmost respect for that. After seeing that, I don’t think anything I suggest would improve your module. I am biased towards IKControls because their usage extends past bones permitting me to create systems that are functional for my NPCs and Players without edge cases.

Thank you for making such a useful resource free!

1 Like

This has been optomized further, it now takes ~10μs to solve 29 colliders which is ~0.3μs per collider.
image

5 Likes