Skinned MeshParts are live!

By the way never really posted a demo of what I’m doing here, so here’s a short recording. Going to be some sort of a fighting game demo since I don’t have much free time, but I have plans to make some kind of an RPG later on. Although the whole idea of mesh deformation characters might not be that groundbreaking of an idea on Roblox by that time.

Also learned scripting just for this, or more like while messing around with it, pretty fun so far.

Cool stuff that it has, as of now:

  • All the movement stuff visible in the video, which includes animations I made relatively easily since the rig has IK constraints (in Blender), mixed with procedural movement like the head and torso following the camera direction, as well as a leaning/tilting of the body depending on turning velocity.
  • The camera wobble follows the head bone, just tweened a little. This will allow me to make other animations without having to tweak a premade wobble script to follow the movement, since it’s all automatic.
  • SurfaceAppearance textures (although not used on the base model rn, that’s just default plastic),
  • Two different eye meshes. Just planning for future customization where it would allow to have different combinations of eye textures (for a sharingan or something cool like that lol).
  • Layered clothing which does have SurfaceAppearance on (might not be visible on the video tho). There’s still rarely some clipping in it but that’s because the clothes are really thin, aka close to the body mesh. I also made armor before and since those are thicker there isn’t any clipping there.

(Also besides other stuff but these are what are mainly related to skinned meshes and I’m gonna keep this related to the topic)

So yeah if anyone needs some help then feel free to ask, I have gone through a lot of trial and error to figure these out and now I have some experience.

One main thing that is still a problem is hitboxes, since they don’t really move with animations. But I do have some things in mind, so I will report back when I get to messing around with them.


Edit: Since I still see people stumbling into this post once in a while, I’d like to note that I attempted doing this again in favor of using layered clothing and for that I remade the whole thing. Basically you still need a character that follows the r15 schema (15 separate limbs) but you can skin it so that it bends all the same. If you average the normals along the cuts then there won’t be visible seams between the bodyparts either.

14 Likes


@RobieTheCat
Hey Robie, is there a status update on the bone to meshpart welds? Anticipating it for these next-gen avatars that blend the old faces/clothing assets with a revolutionized avatar look utilizing skinned meshes.

4 Likes

Is there a way to make skinned mesh ragdoll?

1 Like

Is it still not possible for Implemented IK? wouldn’t mind animating in roblox but without the option to add my IK, I can’t, Seems the only workaround rn is just animating in blender?

1 Like

I’ve ran into an issue with the skinned meshes not rendering or their animations not playing on the client when there’s around 50+ of them in the world. This seems like a bug since the memory stays almost the same regardless of whether there are 50 meshes or 500.

Video: Meshes don’t render in viewports. When the menu is closed, the meshes in the bottom icons don’t render back in

Video: Spawning a bunch of meshes at once stops the animations of meshes that were already in the world and new meshes don’t become visible until after a while

3 Likes

Do you have a repro file you can share privately? Or repro instructions if this happens in a live experience? Thanks.

1 Like

More flickering happening, but this one is interesting…

My character model, when viewed through studio, is jittery. I assumed this was because I had some collision issues. However, when published and played, it is clear that the jitters are due to returning to the T pose for a split second, for what feels like every single frame. The T pose is never visible on studio.

I caught it on camera. Idle animation is running. I don’t know how to capture video while playing with a published game. It looks awful, and is absolutely the cause of the jitters.

2 Likes

anyone know how I’d predetermine the location of the humanoidrootpart? Whenever I import a mesh as r15 into roblox, the humanoid root part is always at the feet, no matter what, which brings issues because we can’t move it as it also moves the rig. I use blender.

The HRP is at 0,0,0 I believe. So move your model down, so that the HRP is created at the torso.

1 Like

Ill test that out and let you know.

Worked like a charm. To be honest, it does make sense now that you’ve mentioned it, and it’d make sense to why it was constantly spawning at the feet lol. Thanks man!

1 Like

I now have very specific information on my version of the flicker bug…

The flicker only begins when this function from my torch code successfully runs, and only when run from roblox.com:

	meshweld.C0 = C1:Inverse() * partCFrame2

Where “meshweld” is the weld between my unskinned HRP and my unskinned mesh holding my flame particles. The rest is just math and variables. The line only works when a disabled Motor6D is present.

flameSwitch(Character.Parent, Character, "LeftHand")
meshweld.C1 = CFrame.new()
mesh.Motor6D.Enabled = false
RunService.Stepped:Connect(function(time, step)
if Character and Character.Humanoid.Health > 0 then
local partCFrame2 = torchLoc.TransformedWorldCFrame * handToPartCenter
local C1 = meshweld.Part0.CFrame:ToWorldSpace(meshweld.C1)
meshweld.C0 = C1:Inverse() * partCFrame2
end

end)

2 Likes

This jittering can happen if there are changes to the Model that causes the geometry to rebuild.
It’s a known issue - that will hopefully have a fix soon.

Anytime there are changes to C0/C1 of Motor or Weld, it will cause the Model to rebuild - which although it should not flicker, is still a slow process that should be avoided.
Consider using a Motor6D, and change motor.Transform in client script, as this will animate the character without causing this costly rebuild.
Otherwise you’d need to play an animation to get the desired pose.

1 Like

No adding, no removing, and no transparency of a part in the section of the code causing the flicker, just the manipulation of that weld which does not affect a skinned mesh part. I can trigger the flicker at will with commenting out this line of code.

Edited to add: in the meantime, I will just disable this function. I’m so far out from publishing anything and I know how to fix it. It’s all good!

1 Like

I know it’s actively being worked on, behind FFlagSimConstraintsWorkWithBones.

@ContextLost Can you comment?

2 Likes

A fix is coming that will remove the flicker - it’s still going to be a costly process to change C0 in script.
However, there is also a fix in the works to remove the need to rebuild skinned mesh on C0/C1 changes.

2 Likes

In this case, the code is to have the flame particle follow the end of a torch on server side, so that it is visible on all clients. On studio, there is no flicker.

I am looking forward to the fix. I will have a tool heavy game!

There is also a change coming that will let you attach directly to Bone Instances - which is what I think is happening here.
This is the ’ bone to meshpart welds’ that @AlexAstral is asking about above.

4 Likes

Aye, willbobdie has been very generous helping us play with our toys while we patiently wait. :slight_smile:

Hi all, I have been trying for days unsuccessfully to get accessories to skin alongside my weighted/skinned rig from blender. The rig itself works fine, I have skinned limbs and the armature works perfectly and so do animations. But when I add an accessory mesh, no matter how I pair or weight it or anything it moves with the bone that it’s paired to as an accessory but won’t utilize the skinning/weighting.

I attached pics of my blender setup and how it is imported in studio. The mesh is named RightShoulder and it has bones RightUpperArm and RightLowerArm both with skinning data/ vertex groups and it ignores it completely.

Am I naming something wrong?
I copy my existing armature, delete the bones I don’t need (so I am left with rightupperarm and rightlowerarm) pair the mini armature to the RightShoulder mesh using option “armature deform” (not automatic weights since I want to keep what weights I’ve got already from the armature I copied) and then export the mesh with the armature as fbx, import to studio, attach as accessory and yet no weighting.

I CANNOT figure this out. ANYTHING helps please!
In the attached video you can see that the pink RightShoulder mesh does not deform at all with the movement of the arm and is just stagnant while the arm clips through it.


1 Like