Jump to content
Hash, Inc. Forums

Why does the spline curve?


robcat2075

Recommended Posts

  • Hash Fellow

Does anyone have insight into this?

 

Here is the outline of an X I have made. All the corners are Peaked CPs.

 

X_outline.mdl

 

SplineCurved.JPG

 

If I use the Y key to add a CP on a spline, that should be a default CP with zero bias.

 

If I add a CP on one of the short splines ( see A) and smOoth it with the O key it behaves as I expect, the two new spline segments are as straight as the old one.

 

If I add a CP to one of the long legs of the X and smOoth it, it gets a twist to it (see B )

 

The default behaviour for a CP with zero bias is that its bias handle should be parallel to a line drawn between its two neighboring CPs but that is not happening in case B.

 

Any ideas?

 

I have noticed this previously on things that come out of the Font Wizard

Link to comment
Share on other sites

  • Admin

I'm seeing something a bit different than you describe, but I follow what you are saying.

 

From what I see when two peaked corners have the spline dissected via the Y key this results in a CP that is peaked in the middle with 100% Mag In and 100% Mag Out.

It is only upon making that CP smooth (via O key) that we get the curvature you describe.

It may be worth noting that adjusting the Gamma at this point to 10 will return it to (I assume) proper orientation.

 

While certainly not ideal for our purposes, I think the difference is that 100% magnitude going into a CP from both sides (while peaked) doesn't equate to 100% magnitude of the curvature of a (non-peaked) spline.

 

How to rectify?

Outside of adjusting the Alpha or Gamma to refine the axis I'm not sure.

 

I'll guess that we'll see better results when the splines are perpendicular... and test that out to see if a hunch there is right.

Edit: My hunch was incorrect. The orientation of the inserted CP adjusts the same on the perpendicular as well.

In the case I tested it is corrected via a -10 adjustment of Gamma.

 

Added: From appearances it looks like everything on the right side of the Y axis line is losing 10 percent of Gamma orientation while everything on the left of the Y axis line is gaining 10 percent. It may be worth restating that when working from smoothed splines at the start the new CP's spline properly aligns. It is when it is then peaked that they aren't. What is a bit odd about this is that nothing is seen to change in the settings of the Biases.

 

As I recall, way back in the day Emilio LeRoux created his Set Bias plugin to account for some of this; namely that the Ins and Outs of Magnatudes weren't entirely covered by the settings available via the properties panel.

Link to comment
Share on other sites

  • Admin
I'll note that magnitude shouldn't be an issue in the direction of the bias.

 

That sounds right although for some reason I feel the term angle might be more appropriate than direction?

If you had said direction of the spline I'm not sure that'd be right as magnitude, alpha and gamma all contribute to the orientation/direction of the spline.

 

I've long ago exceeded my level of understanding here so will defer to the experts and gladly learn from them.

Link to comment
Share on other sites

  • Admin

I found the posts where Martin asks Emilio what the difference between the regular properties for Bias and his plugin are.

While Martin acknowledges the differences none were ever incorporated into A:M's interface (that I know of!).

 

LINK

 

It's long gone from Emilio's site but the link in Emilio's post where he explains a bit further (about why he created the SetBias plugin) is available via wayback machine:

 

https://web.archive.org/web/20040825015756/http://www.moscafilms.com.br/emilioleroux/amplugins_setbias.html

Link to comment
Share on other sites

  • Admin
The bias is a vector, so direction is the correct word. An angle is what's between vectors.

 

If you can further relate how that applies to Gamma and Alpha (in A:M) we might see a breakthrough in my understanding.

 

I can probably just read Martin's paper on it but that doesn't mean I'd understand it. ;)

 

 

REF: Martin's paper: Spline Mesh Character Modeling Note that Bias Control is covered (briefly) in para 2.2.1

 

 

 

It sure looks to me that Gamma is off by plus or minus 10 percent when using the Y key to dissect splines in half (from peaked splines which are subsequently unpeaked).

Link to comment
Share on other sites

  • Hash Fellow

Gamma and Alpha are different planes of rotation for the bias.

 

An Airforce veteran like yourself probably knows "pitch" and "yaw"

 

If you were a CP airplane flying on a spline on the surface of a mesh, then changing Gamma would be like changing pitch and changing Alpha is like changing Yaw.

 

That is ususally true, there are some times the two adjustments trade places amd I'm not sure how the plane of rotation for Gamma and Alpha are chosen on a single spline that is not on a mesh surface.

Link to comment
Share on other sites

  • Admin

Try this and see what happens...

 

Do the same thing you are doing but when you get to the step of using the O key select the entire X shape (the entire spline) instead of the individual CP.

If you are seeing the same thing I am you should note that the orientation of the bias handles at that new insertion point (CP created with Y key) is aligned as desired.

 

I'm not smart enough to know why but it seems to me that this has something to do with the 'end condition tangents' spoken of in the paper I linked to above.

The document is old and tweaks in the code have very likely changed some behavior in how Bias is computed but it seems to me that the Bias produced is a product of the collective biases of what is selected at the time of 'smoothing' of the selected CPs and/or splines.

 

Try this also with selecting anything other than the individual CP at the insertion point you've created and when you hit the O key to smooth the curvature, the Biases should likewise (correctly) align.

Added: Interestingly enough! if as soon as you create the new CP with the Y key you hit the space key and then O key to smooth you should see that the curvature appears correct but the bias handles themselves have adjusted and are (from a user's perspective) ever so slightly mis-alinged. Interesting. (This reads as 0 gamma in the properties panel but when adjusted to be fully flush appears to be somewhere between 8 and 10 degrees off of traveling straight through the CP to match with the other (mirrored) side)

 

Assuming all this is true (and I'm not seeing something odd) it may be that isolating that individual CP is the root of the (originally) observed problem.

 

Apologies for where my terminology and understanding is woefully inadequate.

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...