Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

BezierCurve component isn't actually a Bézier curve... (I think) #3814

Open JackTheFoxOtter opened 1 year ago

JackTheFoxOtter commented 1 year ago

Describe the bug?

I noticed that the curves created by the CurveTip that use the BezierCurve component with the procedural BezierTubeMesh don't actually look like cubic bezier curves. I was assuming they are, considering they spawn with two control handles per curve segment and the naming of the components. When drawn above a Bezier Curve plotted with LogiX, it doesn't even remotely line up. See example below, where I drew over the point used by my custom curve plotter with the CurveTip: image

There is also the possibility that I'm simply using it wrong, but the screenshot shows the state literally after being drawn by the CurveTip, without any modifications.

Relevant issues

N/A

To Reproduce

Take a CurveTip and draw some curves, inspect how they look.

Expected behavior

The CurveTip (or at the very least the Bezier-compoents) should resemble cubic bezier curves.

Log Files

No response

Screenshots

No response

How often does it happen?

Always

Does the bug persist after restarting Neos?

Yes

Neos Version Number

2022.1.28.1310

What Platforms does this occur on?

Windows

Link to Reproduction Item/World

No response

Did this work before?

I Don't Know

If it worked before, on which build?

No response

Additional context

No response

Reporters

No response

JackTheFoxOtter commented 1 year ago

Update on this after talking to Ukilop:

So, turns out the BezierCurve component defines quadratic bezier curves instead of cubic ones. This was not apparent to me, considering each curve segment had two handles, but apparently the position of both handles are averaged out to define the position of the actual control point for the quadratic curve.

So not actually a bug, but turning this into a feature request, it would be nice to have adjusted visuals and perhaps even the option to choose wether to specify a quadratic or cubic bezier curve with the components / curve tip.