Skinned MeshPart Studio Beta

We gotta do what we gotta do :sunglasses:
I was actually more interested to know if something changed here:

3 Likes

Ah right, I remember this now. I did remap this character to use R15 format of 4 separate textures for Head, Torso, Arms and Legs. The earliest version of her had a single texture atlas for the whole character, which was set on all 5 of the key R15 body parts, such that the Humanoid compositor was baking tiny copies of her whole atlas into each region of it’s composite (e.g a copy of her whole character texture in the leg area, arm area, head area, etc… of the Humanoid composite). If the figure on the right is this old version of her, then she’s not a good example of what a skinned R15 will look like, and the character on the left is standard avatar resolution.

4 Likes

Thank you for all the work you guys put into giving developers the tools to make some incredible creations, can’t wait to see what’s in store now. :smiley:

4 Likes

@Maximum_ADHD the difference is that in the Studio Beta each MeshPart has a flag bit to say if it has skinned mesh. This assists in quickly determining how it will be rendered even before the mesh data is fetched from the server. The MeshPart instance in the DataModel is updated - not the mesh data (verts/faces etc.)

4 Likes

Ah yes, I did notice that. Makes sense!

5 Likes

Hey @FilteredDev, just to expand on @RobieTheCat’s answer:

Motor6Ds define a relationship between two parts. Bones don’t. To have thousands of animated joints with Motor6Ds you need thousands of parts. For bones that don’t have any meaningful affect on physics, like face bones, that’s excessive.

However, with Bones you can have thousands of animated bones on a single part.

The C0 and C1 properties of a Motor6D are for defining the reference position and orientation of the joint pivot relative to each part. Part0 and C0 are considered the “parent” part for animation, but since we also have a child part we also need to define the same pivot on the child part too. You could also think of these as defining the offset of the part’s center relative to the joint itself.

For Bone, the Parent and CFrame properties inherited from Attachment fill the same role as Part0 and C0. Unlike normal Attachments (currently), Bones can also be parented to other Bones, and will transform relative to their parent Bone. For these we don’t need a C1, the child Bone’s CFrame does the job. The “bind pose” data in the mesh itself handles the offset of the vertices of the “parts” inside the mesh relative to the bones.

Inheriting from Motor6D just doesn’t make sense. Attachment was 90% of we needed, something that defines an offset relative to a parent. We just needed to add support for deeper parent relative nesting and Transform for animation.

The math for the Transform property works the same way as it does for Motor6D. A single mesh with the same hierarchy of correctly oriented Bones as an R15 can play standard R15 animations as is. If you have procedural animation code for Motor6Ds that just works with Transform, it might even work on Bones as is.

Also tentative future plans

Another reason we decided to use Attachment, is we wanted to have the option to attach things to Bones that don’t have a part of their own.

Although it doesn’t right now, we want to make physics use the animated, transformed position of Bones for simulation in the near future.

Like if we added a RigidConstraint weld-like joint that used Attachments, we’d want you to be able to weld a shield to the animated hand bone even with a custom single part, single mesh “S15” character.

10 Likes

Every day we stray further from this game’s blocky origins.

5 Likes

A good quality of life update to be honest.

2 Likes


Tried this on a cat model. Proof that I suck at Blender.

9 Likes

This update is one that I and a ton of folks have been undoubtedly waiting for - I’m absolutely stoked for what folks will make with this!

I have no idea why nostalgia pandering seems to be the common theme whenever good updates pop up - it’s either “this wasn’t wanted” or “where is the blocky style” being touted. For goodness’ sake, Roblox has made far more possible today than before and a ton of us want to get more expressive with what we do - nostalgia can’t be used for the sake of preventing any sort of progress on the platform. We’ve come a long way with the API updates and now this, far more power lay in the hands of the developer than ever before - it is incredibly saddening that all this good stuff will always have someone muddling it with cries of old Roblox.

8 Likes

I personally haven’t seen anyone ask for this, but I could be wrong. In general I’m referring to everything Roblox has recently put out that we haven’t asked for

Anyone that liked that comment, along with the people that didn’t ask for it.

I don’t really see how my comment is indicative of not being experienced in professional game development.

2 Likes

Here is a test file that I know will export a working, importable character, a version of Roblox avatar that has skinning–very crude skinning. There is joint blending only on the left elbow, right knee, and right ankle (robot limbs are “rigidly skinned”,meaning the parts vertices are weighted to a single bone), and because I didn’t add extra geometry to make it able to bend smoothly, it looks terrible. This model has my character’s hair and glasses merged into the head mesh. This is to keep this example simple, as importing accessories is normally a separate process.

Also, I used the already-humanoid-composited version of the mesh parts, so they are all referencing the same composite texture for simplicity. This means that if you import this character, the resulting images will be doubly-composited and very low resolution, like on the right test model in the original post. You wouldn’t make an actual avatar with an already composited texture like this, normally your source would have a full 1024x1024 image for the Head, each arm (or one for both arms if they’re symmetrical), the two Torso parts combined, and each leg (again, they can share if symmetrical). So normally 4 to 6 textures, depending on character symmetry.

This Zip file contains the composite texture map, Blender 2.8 source file, and my exported FBX. It should import correctly, using the R15 preset in the Avatar Import, giving you a character that can be renamed “StarterCharacter”, put into StarterPlayer and it should just work, albeit with very low-res texturing for the reasons noted above.

example

File: BendyAllYourBlox.zip (896.4 KB)

Export settings you need when exporting from the blender file to FBX are:
export1 export2 export3

16 Likes

What am I doing wrong?
I wanted to see if I can add bones “on the fly”, but I have never done mesh skinning before, so I’m a bit clueless on what to do & how I can get it to work :confused:

image

image

wire.rbxm (4.3 KB)

2 Likes

Your meshIds are for version 3.01 meshes, meaning they either didn’t get imported using the Avatar Importer, or the importer didn’t find any vertices with bone weights.

Also, the Bone instances have to have names that match the bones in the source file that the vertices were weighted to, all the association is done by matching names (strings).

6 Likes

Oh thank you. Yeah, I didn’t use Avatar Importer at first, but then did and it still didn’t work (probably because I didn’t set any bone weight to vertices).

I’m trying to make a wire with smooth bends.
Ideally, I’d have just one MeshPart, and then control the bends with bones. But I also want to give players the ability to make as many bends as they want—which creates a few questions:

  • Do I have to up the resolution of the geometry for it to bend nicely multiple times?
    I currently have it like this:
  • Is it possible to add/remove/manage bones in Studio, so I can have as many as is currently needed (2 bends-2 bones, 15 bends-15 bones), without having a predetermined amount of bones? For example, it would be a bit pointless to have 20 bones if the wire is all straight, without actual bends. I also don’t want there to be some limit to how many bends there can be, say a player wants to bend the wire 21 times, but there are only 20 bones.
    Is it even possible to do it with just one MeshPart?
2 Likes

Yes, you’ll have to subdivide that tube along its length, otherwise the “bending” will just be the end discs rotating. Our skinning is linear blend skinning also (not dual quaternion), so a wire will not bend in a way that preserves volume if there are just bones at the end, it will crimp. You need a short chain of bones from end to end to make it look like a flexible wire or hose.

2 Likes

Regardless if anyone asked for this or not there is only good that can come from this you will see most developers using this from now on but im pretty sure this has been asked for many times.

1 Like

Thank you :slight_smile:

What about this?

Would it be possible, or would I have to use one MeshPart per bend, and just add a new one when needed?

I didn’t catch that, haha woops.

1 Like

For a given skinned MeshPart, the number and names of bones the vertices are weighted to is all set up in your 3d modeling program and can’t be editing in Studio. You can remove Bone Instances from the MeshPart if you don’t need them on a particular copy of that MeshPart, but that’s all. I’m not sure exactly what you’re envisioning doing, but it does sound like a variable-length chain of short segments is the best option, where each segment is a copy of the same MeshPart. The other option is a long MeshPart with many bones and code (trig) to calculate how much each one has to move and rotate for the wire to take a specific shape. Which is best kind of depends on what the minimum and maximum runs are, and how it’s texture mapped (if it is).

3 Likes