Skinned Mesh Stretching Causing Unwanted Gaps! (Bezier Curve Roads)

Hello, everybody! :smile: I’ve recently started working on a Bézier curves road system that creates smooth curves in roads using Bézier curves! So far it’s been going absolutely fantastic but I’ve ran into a bit of a problem!

Here are some videos of the system working:

https://i.gyazo.com/8b3bdc59fa12199100965fd00be87415.mp4
https://i.gyazo.com/aa388714c1b6d8956fa27772a4bec28b.mp4

The problem I’m having is that the skinned meshes I’m using for the road segments aren’t lining up properly! I’ve checked multiple times and the bone at the end of one segment will always be in the same position as the the first bone in the next segment which should create a seamless gap. This is what I want to happen. However, the mesh does not seem to want to stretch the whole way, giving gaps as you can see below.

I’ve had a mess around with the mesh and this does seem to be the problem, as you can see in the video below.

https://i.gyazo.com/5f83210f098054afe531c65bcb163b36.mp4

If anyone knows anyway of fixing this and making a skinned mesh stretch to the exact position and rotation of it’s bones please let me know!

Thank you for reading! :grin:

3 Likes

1 - If your road should have proper collisions - don’t use skinned meshes, beacause it changes mesh only visually.
2 - try manipulate with mesh’s weights. 0 - not affecting verticle, 1 - fully affecting verticle.

2 Likes

At the moment, I’m not very bothered with collisions. It’s mostly aesthetic for now. Thanks! I’ll take a look at that. Is that something done in studio or in Blender?

1 Like

It’s in Blender. When you select mesh, go to Weights paint mode.

1 Like

When setting the parent do I just do With Automatic Weights like usual?

2 Likes

Nope, you need correct your weight manually in 90% cases.

So sorry to bother you again but how do I do that?

1 Like

image


Red = 1 weight,
Blue = 0 weight,
Green = 0.5 weight.

What is the script you are using to set the end point?
Maybe print the start point and end point if there are calculations involved to make sure it is the same spot.

Yes, thank you, I have already done that and they are in the correct points. I think it’s something to do with the way the mesh is stretching which COZIDATEL is helping me with

Thank you so much for your time! I tried it and it did in fact change the amount by which the bones stretched but sadly I could only make it worse.

You never stopped being talented… all of this looks like gibberish to me :joy: :blue_heart:

1 Like

Hey!! Long time, no see! Don’t worry… it’s gibberish to me too :joy:

1 Like

If 2 vertices at the same location have the exact same bone weights, a gap cannot occur. They must be exact for all bones though.

Bone A = 1.0
Bone B = 0.5

is not the same as

Bone A = 1.0
Bone B = 0.4

Because these are then normalized so that all weights add to 1. Bone A gets final values of .666 and .714 respectively.

I have tried with bone weights of 1 and it didn’t seem to work though sadly. Thank you for trying though! :slight_smile:

How many rigs do you have? All parts should be under the same rig.

I recently solved a problem exactly like this, turning an avatar into a seamless one.

Each part is under one rig. The problem I have is connecting two rigged parts together to make what looks like one continuous object.

My armature is only 3 bones, but that’s not the important part. The edge is weighted 100% to only the respective edge bone (the rest auto-weighted). This will keep it a uniform width and position when you move it around.

I then aligned the bones of 2 separate parts and then pivoted those bones on the z axis (Y axis in roblox).

There will be some fun math in Roblox to do that automatically, but you’ve already done more than I thought possible!

Ohhh, that’s really interesting! The way I was doing it before is one long chain of bones going throughout the road segment but I guess having the bones separately works differently! Thanks for the help! I’ll take a look into this :slight_smile:

Sadly it still does not seem to stretch the whole way in Roblox studio. Thank you so much for your help though :slight_smile: