Curve modifier issue need assistance

Spend almost 2 hr Googling, BA and stack exchange and yet i have no solution for this, i need the cobra to follow the curve but without getting squash as you can see in the picture bellow.

In max i was able to do this easily with the path deform modifier but with blender curve i am scratching my head! I have tried resetting all transform and align both the curve and the cobra on the same origin but it still deform oddly.

With a simple cylinder it is working perfectly but not with the snake that is a single mesh so does anyone have a better way of doing this or is my only solution is to rig the cobra with bones?

I cannot provide the file since it is a game asset.

Is the curve scaled? If so apply the scale and it should work.

Hi lumppengnom,

The transform are reset on both curve and cobra but like i have mention it is working fine on a simple cylinder.

The current cobra mesh have 600,000,00 faces so i donā€™t know if that could be the problem.

Is the curve twisted? Also, are there any control points on the curve that have a radius other than 1? (can happen esp. if you applied scale to the curve)

Hi Stan,

Curve is not twisted but i use the flexi bezier addon to make curve so maybe i should try with the default Blender curve but they are such a pain to work with.

No scale or any transform was applied to the curve and i always use reset transform before any operations in Blender.

Still, try checking the mean radius on the points. Or select all points and do a search for ā€œSet Curve Radiusā€, and forcibly set it to 1.

Maybe if you share the blend file I can take a look

I would love to but it is a game asset that i cannot share online yet but thank for trying to help.

OK i managed to repeat the same issue with a simple cylinder in 2.81 official release so if someone can be kind enough to check the scene and explain to me why this is not working?

curve_modifier_issue.blend (2.0 MB)

God damn it i lost at least 4 hr trying to make this modifier to work correctly and i just figure it out!

Thatā€™s the kind of situation i hate since it is not intuitive and it is not mention anywhere, you have to switch direction for the curve the procedure is ;

1-go to edit mode

2-select all points (A)

3-right click and select switch direction in contextual menu

Still doesnā€™t work with the snake and i am not going to waste any more time with that and will do an armature for it.

If any dev stumble upon this thread then have a look at how easy it should be ;

In your example file one control point is completely squashed to 0 which causes the cylinder to squash as well. Can you upload just the curve that youā€™re trying to modify your snake with?

EDIT: in other news, your example file looks to have uncovered a strange bug with navigation when auto-depth is turned on :slight_smile:

2 Likes

It has to do with the handles of the first point in your curve. This is why it appeared to work when you flipped the curve direction.

2019-11-22_23-46-33

With that said I do feel the modifier is not very intuitive. For example I really dislike having to animate the object I want to deform instead of having an option to do that in the modifier itself. But alas, sometimes you canā€™t have your cake and eat it too. :wink:

PS
Looks like @Stan_Pancakes beat me to it. :slight_smile:

2 Likes

Can you please test this as well: remove the curve and the modifier from the cylinder, turn on Auto-Depth in user prefs/Navigation, and try zooming in or panning the view while having mouse pointer over that cylinder. For me, it sends the view into oblivion, on 2.80, 2.81 and on recent 2.82 build. If it does same for you, Iā€™ll send it to devs.

@polynut, how did you create that cylinder?

Hi Stan,

I did a curve radius and it show 1.0 for all curves point or maybe i didnā€™t use the tool correctly.

What i did is selecting all curve points and did set curve radius at 1.0 so you mean i should have selected one curve point at the time?

100% agree with you and i am going to put this in bold ā€˜ā€˜NOT INTUITIVE AT ALLā€™ā€™!

Nono, itā€™s not about the radius this time, look at @3diootā€™s gif above: the first point on this curve has its handles merged with the point itself, making the curveā€™s twist indeterminate, and that causes squashing.

Please can you upload the curve from your snake, without the snake? Perhaps thereā€™s also something of that nature in there. EDIT: and I would really like to know exactly how this cylinder was created :slight_smile:

Hi Stan,

Yes i notice that view weird behavior and the cylinder was created with the bsmax addon but i have convert it to mesh to make sure and prior i did a test with blender default cylinder and my result was the same.

Here the original curve is you still want to have a look at it ;

S-curve.blend (1.9 MB)

Yep, looks like same deal on the snake curve: one point is completely squashed.

Ok, and the view issue seems to be due to the view clipping range cranked up way too high. Still, probably shouldnā€™t send the view into Nowheresville. Iā€™ll report it.

1 Like

So to fix those curve points is simply to pick the handle and set them apart right or is there a magic tool fixing them automatically?