Knots in 3D curves.

EDITED MAY 16th
OK, this thread has lead us as far as it could I guess. With all the discussions here and in other fori I feel that I gathered enough information to create a tutorial where to offer a fairly reliable technique that works around the knots problem to satisfaction.
Accordingly, I’ll transfer the discussion to the WIP forum for the time needed to come up with a complete tutorial : I’ll still need any good soul inputs to bring it to its conclusion.
Stay tuned.
/EDITED MAY 16th

Does anybody know what causes that kind of knot in the tilt of 3D curver.
Is it possible to avoid or correct them ?

Here’s an example of the problem. I’ve bevob a profile over the curve for demonstration purposes.

http://pages.infinit.net/bobois/012_noeud_dans_courbe_3_D.jpg

This is giving me a real headache and I’d appreciate even if I learned that there is nothing to help the case.

Thanks gang.

part of your curve is twisted…

rotate the curves on one side 180 degrees

I wish I knew what caused that also.

I do know that you can adjust the tilt of the curve at the knot, by selecting the main point and pressing [t]; Alt_t clears the tilt.

I tried to model a roller coaster a while ago which had a bent-over horse shoe shape to it, but there was no way that I could “roll out” the 2 twists that were in it. :frowning:

How would you do that ?
I tried to rotate the end control point itself, which has no effect, and rotate the tilt for that control point, which makes an even bigger mess as the change propagate beyond the knot up to the next control point but does nothing for the knot itself.

Here’s an example with a non symetric profile extrudes to show better.

JarellSmith already gave the solution.

If you view your curve in edit mode and set Nsize to maximum, you will see better that the twist is there where the normals are twisted.

Now you can select a singel point of the curve and with T-key rotate the normals. If they’re then all kind of paralell your beveled curve should be ok.

I think the problem results from negativ and positiv coordinates

(Wow, just learned something new; didn’t know the function of the T-key, very valuable. Thanks) :smiley:

I so wish it would : unfortunately you can see the result from usint T-key and rotating the tilt in the image in the message above.
Alt+t has no effect on my example either as if Blender was seeing the curve as having no tilt whatsoever.

I join an example .blend here : if you think that you can correct it give it a try… and tell me how you did.

http://pages.infinit.net/bobois/not_yet.blend

(Wow, just learned something new; didn’t know the function of the T-key. Thanks)

So do I, for the Nsize in this case : so thanks

:slight_smile:

Got it!

The twist comes from moving the vertex. This rotates the point when you move to an under 90 degree bend (go to edit mode, move it and watch those normals flip!!) To solve you need an angle >90 degrees in your bend (but only just). That should solve your immediate problem. The larger problem is howw to stop the normals flipping as you go past 90 degrees. Any ideas anyone?

Hope that works for you.

Alex

I don’t know how to solve the problem of the normals flipping, but I got rid of the twist by selecting that end vert and rotating it clockwise once. R+MMB type rotate so you don’t rotate about the ob center. Nice little teaser!

%<

That’s close to the workaround that I try to use reliably (in lieu of finding a rational explanation of the curves behavior.)
I just stay off 90° as you found out, way off indeed : 45°. Then I bring back the rest of the vertices (control point really) 45° also. Every rotation around the 3D cursor in top view. I could even get past the 90°. I staighten out the whole thing with a last rotation, 45° in the opposite direction out of edit mode.

See this image.

All is fine but my lack of understanding makes the method unreliable : getting a knot in the middle of a long modeling job is horrific and I keep getting them.

You’re giving me hope.

In which view ?

R+MMB type rotate so you don’t rotate about the ob center. Nice little teaser!
%<

This I don’t get. R+MMB here allows me to rotate around two axis at once, those parallel to the screen.

Maybe that’s just because I don’t know which view you refer to.

Could you sent me the corrected .blend I’d really like to have a look at it.
By mail if it is not asking too much.

Thanks. If we find a way to deal with this we’ll make many, many happy guys.

I used bezier curves and it worked, but don’t know if this is the general solution.

Had a try (several) with your nurbs blend file. Success :frowning:

Ok, playing with some settings gave an result but more by accident.

As long as one bends the curve in the plane of the normals (or how this is called for curves) no problems with angles over 90° but when you bent perpendicular to that plane … a mass. Switching direction with W-key just turns the twist the other way round. :frowning:

Hope that someone comes along with the magic hot key. :wink:

I used bezier curves and it worked, but don’t know if this is the general solution.

It just might ! I like to work preferably with nurbs for ‘free hand’ design and bezier for tracing. I tried some bezier but did not have more success. Do you have a sample file that you could mail or something, if it’s not too much trouble ?
[/quote]

Had a try (several) with your nurbs blend file. Success :frowning:

Well, my misery maybe loves company but I don’t : hopefully we’ll get to the bottom of all this fussy buiseness.

Ok, playing with some settings gave an result but more by accident.

Isn’t that just madening ?

As long as one bends the curve in the plane of the normals (or how this is called for curves) no problems with angles over 90° but when you bent perpendicular to that plane … a mass. Switching direction with W-key just turns the twist the other way round. :frowning:

That is a very good observation and I take note.

Hope that someone comes along with the magic hot key. :wink:

I’m preparing a roller coaster with my (well much of it is ours now) workarounds : better than nothing. Yet I keep hoping for a more straightforward (I never used that word so much until today) approach.

Thank you sir.

As a thank you card.

It is quite crude as it is and could use a lot of tweaking of the speed but the essential is there to understand that at least it is possible to create a believable roller coaster out of a bag of tricks.

http://pages.infinit.net/bobois/roller_coaster05_compresse.blend

Tell me what you think, play with it (but come back tell us your findings) : it’s so GPLd !

Hi IamInnocent. Thanks for the present. :wink:

<EDIT> Woo Hoo, just checked out your roller coaster blend file, very nice - that baby really hugs the rails :wink:
</EDIT>

I was playing with the first file you posted and found out something interesting:

Switch to top view,
Edit mode, select the top control point ( at the end of the pipe ),
Zoom in a bit,
Start Grab mode, and press your right cursor arrow key once to move the cursor slightly to the right. Hit Enter

Now when you look at the pipe in object mode, no twisted pipe. (I’ve moved the control point as little as 0.0004 which doesn’t even show up in the N’umber’ entry for the control point for LocX) In most cases I had to move the control point a little more to reliably get rid of the “kink”.
Though if you try to extrude the end point again, the kinks come back in greater numbers :frowning:
<EDIT> I guess basically I’m doing the same as alicopey158 described and making the angle at the bend greater than 90 degrees. </EDIT>

Strange, it seems like this is causing some kind of discontinuity in the math for this feature.

With regards to your technique to avoid this, I just wanted to be sure that I understand you:

You add a path,
snap the 3d cursor to one of the control points,
and then rotate the rest of the control points a maximum of 45 degrees, then snap to the next control point and rotate the first control point 45 degrees to obtain the 90 degree bend?

<EDIT> Arrrg, I’m still doing something wrong; still getting kinks - when you express the angle did you mean between the control points or relative to the the normals/ hash marks?
</EDIT>

Also I was thinking that one could use the procedural modeling technique to avoid this situation perhaps.

http://www.ingiebee.com/tutorials/Digital-Mark.htm

Though it’s not quite as intuitive a procedure as just using BevOb, it does enable you to vary the scale throughout the “extrusion”.

There are even three babies, one for each segment of rails, that I had to hide at the end and before the beginning of their run by changing layers.

Now when you look at the pipe in object mode, no twisted pipe. (I’ve moved the control point as little as 0.0004

Yep, that’s how close it gets.

hough if you try to extrude the end point again, the kinks come back in greater numbers :frowning:

And yet so far.

With regards to your technique to avoid this, I just wanted to be sure that I understand you:

<EDIT> Arrrg, I’m still doing something wrong; still getting kinks - when you express the angle did you mean between the control points or relative to the the normals/ hash marks?
</EDIT>

It’ll need some picture to make it clear. I should have that much ready by tomorow evening.

Also I was thinking that one could use the procedural modeling technique to avoid this situation perhaps.

For a roller coaster there mustn’t be any kink since ‘Curve Follow’ is used : the car would do some quite strange figures at the time it would pass over one of those kinks. I wonder if procedural extrusions are affected by kinks though : I haven’t used complicated 3D curves for that purpose yet.

I really should sleep now.

Night.

I messed with this some more and found that if I add more knots it helps. But it seems the deform resolution (default 6) can iron out all the kinks, at a price. I took it all the way up to 70 when it slowed things down noticably. Now I’m also hitting the sack!

%<

Just do a ctrl-a on the curve.

The technique JMS suggest is working up to that point but if I keep extruding, it doesn’t solve all problems. Yet it has to be useful and at least it is simple and elegant for the cases it applies, which may be many.

Thanks for the coaster.
It’s really a nice one. :smiley: :smiley: :smiley:

Had some further experiments but didn’t get closer to the solution. :frowning:
(My bezier curve exp. goes to the category: accident, no general solution)

My only finding is that the twist is seems to be always paralel to the curve’s internal XY-plane.

Maybe someone can make something out of it.
:-?

I am testing a very promissing avenue right now (enhancing the curve to the 6th order )

Let you know if it is the end of the monkey buiseness.