Jump to content

When switching from cubic to spline ...


NatXotic

Recommended Posts

The spline() function in graphics terminology implements a "natural cubic spline" (lots of hits on google). It is designed to fit through all the keys globally across the entire _channel_ while ensuring smooth conditions. The typical use of spline() is convert all the keys in the whole channel to spline().

Using natural cubic splines, we can very easily fit a set of data points smoothly. However, it's generally not very desirable for animation since it can easily overshoot. If you're using H6.0, then one thing we added was an easy way to smooth slopes on cubic() keys without overshoot. Simply select all the slopes and hit the 9 key to smooth them.

Link to comment
Share on other sites

ok, i know what splines are (wrote a paper on genetic algorithms for splines) and thanks for the tip with the "9".

But why do the handles jump back to the default state, if i keyed them previously and just change the curve in the grapheditor to spline? You should be able, even with an overshoot to keep the set keys.

I use 6.1.83.

Well what i did now was going in there and manualy change every single slope to what ever i like it, tedious but was necesary to get rid of some jaggy character movements.

The spline would have been nice, even with an overshoot for my characters tail. But thanks anyhow.

Link to comment
Share on other sites

I still don't understand. How are the handles jumping "back to the default state"? Slope has no meaning to spline(). Please provide a concrete example.

I'll start.

- create new channel with key at frame 1

- scope it in the channel editor

- change time to frame 10, hit k to set a key

- do the same at frames 20, 30, and 40

- hit h to home the entire channel

- change the keys to these values:

frame 10: 1

frame 20: 2

frame 30: -1

- hit h again to home

- select all the slopes and hit 9 to smooth them

- change the segment between frames 10 and 20 from cubic() to spline()

- this gives you a straight line because it is only fitting two data values. notice that no slopes have changed. For the slopes belonging to the spline(), they're hidden because they no longer have any meaning.

- change the segment between frames 20 and 30 to spline()

- this now gives you a smooth curve fitting 3 data points

- again, no slopes have changed but ones that are not used anymore are hidden

Link to comment
Share on other sites

oki,

i attached a file so that you can see what happens.

If you try to move one of the persistant handles you will notice, that they do not influence the bones. Once you go into the channeleditor and change the type from spline to cubic, they change will appear.

I don't need the spline anymore, so that's fine for me, but should houdini react like that?

It really confused me, till i noticed what was going on.

example.rar

Link to comment
Share on other sites

Ah, you mean the *viewport handles*. I always assumed you meant something in the graph editor.

There seems to be some unexplained bad interaction between the viewport handles and the spline() function. If you move the handles after loading the file you will note that all the bone tiles in the network editor show warning messages. If you then dive down into the curve geometry object, you will see red errors.

Link to comment
Share on other sites

Unexplained, that means you still don't know where the error comes from, or what causes the error?

Well, as i did the animation in another way, it's not that important to me anymore. Just wanted to know if there is an explanation for that. So it seems that that's a bug?

Cheers and thx for your kind help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. 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...