News:

 

Topic: Spline Tangents on "line list"  (Read 16912 times)

0 Members and 5 Guests are viewing this topic.

  • No avatar
  • Posts: 2103
  • Polygon
July 13, 2014, 06:27:40 pm
Another major point with this issue. With the options to disable "Auto Naturalize", why is it that the flow/tangent directions(of spline vertex) still changes regardless of setting the options to disable auto naturalize?

I can spend quite a lot of time setting up a path with correct flow/tangents, but if I move even slightly a spline vertex with all "Auto naturalize" disabled, the flow/tangents of the spline vertex just change/flips to whatever it wants to.

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
July 18, 2014, 08:07:06 am
Try this
http://www.digitalfossils.com/Download/NVil-Jul-18-14.rar

If a spline bitangent is twisted, the bitangent will be fixed so the program won't perform auto operation on it.
A new button "Set As Twisted" is added to Tangent tool. It makes it possible to set bitangent state without twisted.
If a spline vertex is created from vertex/edge/polygon, the mesh normal of that point will be used to set the spline vertex's bitagent.

  • No avatar
  • Posts: 2103
  • Polygon
July 18, 2014, 04:14:44 pm
Hi IStonia,

Try this
Giving more consistent results, but only on contiguous edge selections for the "[edge tools] Create spline".


Quote
If a spline bitangent is twisted, the bitangent will be fixed so the program won't perform auto operation on it.
A new button "Set As Twisted" is added to Tangent tool. It makes it possible to set bitangent state without twisted.
Would a better description for that (for the end user) not be "Lock Flow" or "Lock Tangent flow"?
Having an option "Set as twisted" is, IMHO for an end user, ambiguous.


Quote
If a spline vertex is created from vertex/edge/polygon, the mesh normal of that point will be used to set the spline vertex's bitagent.
With your description, I was expected that when manually creating a spline using geometry snap points, that the spline vertex normal direction would be created from that underlying geometry, but that does not appear to be the case, or at least, not all the time.

I will take some screen shots of examples and post them when done.


  • No avatar
  • Posts: 2103
  • Polygon
July 18, 2014, 05:45:01 pm
Hi IStonia,

Simple example:-

I have a face loop from a sphere(rest of sphere deleted), have added an edge loop, from which I want to create a spline that is created with its vertex normals the same as the underlying geometry.



With that [contiguous] edge loop selected, using the "Edge tools> Create closed spline", the result is as what is wanted (as expected from new implementation). To show results, I have added an "Instance > Spline Array" using that created spline.


I have performed testing on different geometry, and the result are good, I cannot fault that at the moment, when using a contiguous edge selection with the "edge tools > Create closed spline" as shown above

I am seeing problems from manually creating the spline from snap points. The reason I am making such tests and posting the problem is that you specifically stated:-
Quote
If a spline vertex is created from vertex/edge/polygon, the mesh normal of that point will be used to set the spline vertex's bitagent.
and as the only tools available to create a spline from vertex or faces is via the manual spline creation method via snap points, I am testing that method.

Here I created a closed spline using the visual tools "Spline" using the vertex snaps of the above edge selection.
The results are not as expected(again, an instance array as been added to show results)


I also see problems if a preselected edges are not contiguous, for the "Edge tools > Create spline".

Same example as above, but with only 4 edge preselected, then "Edge tools > Create closed spline" used:-


If you look at the spline vertex normals, you will see they are not correct to underlying geometry normals.

If you need more info or examples, I can post them.







  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
July 19, 2014, 02:22:41 pm
Hi IStonia,

On initial testing:-

The use of "Edge tools > Create spline" on contiguous or non-contiguous edge selections is now producing spline with vertex normals from underlying geometry. Also, manually creating smooth splines to snap points is giving correct results. (Although I am not convinced the breaking of the relationship(tangency) between the flow tangent and tangent handles is good to do. But that may be the only way to make implementation?)

Where I am seeing issues, is with "Line list" splines.

Simple example.

Again, using a face loop from a sphere with edge loop added:-

"Edge tools > Create closed spline" and OK



Looking from Top view, the tangency of the flow is correct to the circular shape of the spline.



If I now change the spline to "Line list"(or if I had created a "line list" spline from snap points), the result is not usable, as the normal direction of the flow on the straight segments of the spline are not tangent to the spline.



Here I add a spline array to show problem more clearly:-



Also, if I change the spacing of the array to "Random", some of the arrayed objects flip 180 deg:-



It also appears that when "List list" is used, the normals of the spline vertex are broken/not used when setting array to "Use Spline Points":-



The latter problem is easily worked around, as the vertex normals of the spline are used when the spline is smooth. But with the normals being incorrect to spline line segments, that is a problem that cannot be worked around and makes it unusable for such as bolt/rivet heads etc.



  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
July 20, 2014, 10:25:20 am
Try this
http://www.digitalfossils.com/Download/NVil-Jul-20-14.rar

Also, Spline tool is improved. MMB/RMB can be used to create first/second control points. To control new segment's line/curve type, use the "Line" option in the tool's control panel.

  • No avatar
  • Posts: 2103
  • Polygon
July 20, 2014, 02:21:45 pm
Hi IStonia,

Try this

From very quick testing (I need to spend much more time with this to test/check fully).

It does appear there are now 3 types of spline. The "Smooth[Naturalized]", "Line" and "Line List"

The "Smooth" appears to be working as before.

For Line/Line list.

A "Line" Spline (as created from [visual tools]Create spline) is creating (using LMB) a spline with straight segments. The spline vertex are adopting the vertex normals from snap points, and the line segment normals are being smooth interpolated between the vertex normals. They are similar to if I had created the spline using "cusp" tangents, with the tangent handles aligning to previous/next spline vertex. That is good and very useful, but not good if being used for creating an array for bolt/rivet heads.

Spline created from "[visual tools > Create spline with "Line" option)


The Splines "Toggle Type", does toggle the "Line" into the "Line List" type of spline as seen before. The spline vertex are not aligned to underlying [snap] geometry, but the line segment normals do appear to be correct/usable for use to create an array for bolt/rivet heads.

"Line" spline toggled to "Line_List" spline


I presume that was your intention? Which IMHO is very good, as both those types of spline are very useful.

If I create a "Smooth" spline and then use the "Toggle Type", that changes the spline between being a "Smooth" spline to a "Line List" spline. But how about the ability to change from a "Smooth" spline to a "Line" spline? Would it be possible for the "Toggle type" to toggle through the 3 different spline types?, or have options to convert the spline to a specific type?(line, line_list or smooth), (of course, assuming the different types of spline I am seeing is intentional).
The reason I ask for that, is that when using "Edge tools> Create spline", the spline created is a smooth spline, so it can currently only be changed to a "Line_list" type of spline.

Hope you understand my explanation, I can post more info if required.


Quote
Also, Spline tool is improved. MMB/RMB can be used to create first/second control points. To control new segment's line/curve type, use the "Line" option in the tool's control panel.
Interesting, a good way to control the tangent handles while creating the splines. I need to test more before I can give better feedback/results of testing.

  • No avatar
  • Posts: 2103
  • Polygon
July 20, 2014, 03:13:46 pm
Also, Spline tool is improved. MMB/RMB can be used to create first/second control points. To control new segment's line/curve type, use the "Line" option in the tool's control panel.

I have been looking more into that. I do like it. The ability to control out/in tangent direction while creating the splines is a large step forward (IMHO).

--------------------

I am seeing a problem when attempting to close a spline after using LMB/MMB/RMB to create the spline

Example:-

Mouse clicks for creating the spline/tangent handle directions (last mouse click not yet made to close spline):-



I LMB on start of spline and the usual popup shows asking to close spline.



On pressing "Yes", the spline does not close, instead, the mouse cursor jumps back to last spline vertex, (with spline creation tool still active).



---------------------------------------------

When editing a spline to "Lock" or "reset" multiple or all the spline vertex on a spline, it appears you need to first select a single vertex to activate the tool, then select the rest of the selection. It would be better workflow (IMHO) to be able to select all the spline vertex then "Lock" or "Rest" without having to select a single spline vertex first.

Simple example:
I have a spline with multiple vertex. Change to Spline vertex mode. Enable "Spline Tangent" tool:-

[Currently], I need to select a single spline vertex, I can then MMB drag to select all the spline vertex(or part selection of). Then "Lock" or "Reset"

[Preferred], Select spline vertex with MMB drag, "Lock" or "reset" (which does not currently work)

Another point to that. If I have a spline vertex selected, then bring up the "Spline Tangent" tool, I need to select that spline vertex again to activate the tool. Should it not activate with the preselection?




« Last Edit: July 20, 2014, 11:48:46 pm by steve »

  • No avatar
  • Posts: 2103
  • Polygon
July 23, 2014, 11:37:42 am
Hi IStonia,

I was looking more at the issue I mentioned earlier:-

Although I am not convinced the breaking of the relationship(tangency) between the flow tangent and tangent handles is good to do.........

It appears that when using "Instance Spline array", the array objects are aligned to the orientation of the flow normals, but when using "Slide" the slide is aligned to the underlying tangent handle directions. So we now have 2 different ways the tangency(the "Use tangent" options in the tools) is being implemented, which of course is inconsistent and leads to problems.

Here I will show you an example of attempting to use "Slide"

Although this is just an example, this is the kind of geometry I build a lot of the time with "Slide", where there is a need to create the slide tangent to underlying geometry. (think of building the supports of a race or big dipper type of track, then adding the track to the supports)

Here I have 4 simple box primitives, the track(slide) being added, so the slide is tangent to the normals of the box faces. (the box are not evenly spaced)



Using "Face" snap (snapping to those 4 box faces), I create a 4 point spline.


If I zoom into one of the box, you can see that the spline "Flow" normal is correct to underlying geometry, however, the underlying tangent handles are not tangent to the "Flow"(therefore not tangent to the underlying geometry)


I create a simple spline to use for the slide, which I will be aligning to the path.


On using "Rotation snap selection" for the spline to slide to the spline vertex tangent of the path, the alignment is made to the tangent handles, which of course is no good, as it is not tangent to the box face.


So instead, I align the "Slide" spline to the box face. But on creating the slide, the slide is controlled by the tangency of the tangent handles (not the flow tangent), and as the tangent handles are not tangent to the geometry, the result is not usable (even if option to use tangent for the slide is disabled, the result is still not usable, as it is not tangent to geometry and the slide cuts through the box faces).


So I have to edit the tangent handles as I did before the current change, to get them tangent to underlying geometry.


Once done, I can make "Slide" with result I want.


So from that, I hope you can see there is a need for not only the flow normals to be tangent to underlying geometry, but also for the tangent handles to be tangent to the flow normals/geometry, otherwise there is still a lot of editing (as before) and prone to problems.



  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
July 26, 2014, 03:36:30 pm
HI IStonia,

I have made some quick tests.

The spline vertex snap to geometry is now making both the spline vertex flow and tangent handles align correctly to underlying normals.

The problems I mentioned (with "Close spline" and preselection/selection for tangent handles for editing) are now fixed.

Excellent work!

I need to go through the various other tools/functions to check for any possible issues arising from change.(I will do that later today)



One issue to mention at this time.
The workflow when using "Toggle Type" and the new option in the "Tangent" tool > "Toggle Line List Flow Style" may be confusing (it appears to be a slightly broken process).

If I create a "Smooth" spline, then all appears to work as I would expect due to changes and new option. But after creating a "Line" spline, those 2 options ("toggle type" and Toggle line list flow style") do not work as I would expect.

For example.
I create a "Smooth spline" snapping to geometry. I use "Toggle type" and the spline toggles between "Smooth" and "Line". While the spline is "Line" the Tangent tool "Toggle Line List Flow Style" changes flow style. At any time, which ever "Flow" type I have set, I can always "toggle type" and the spline will toggle back to smooth. So that works well.

If I create a "Line" spline (visual tools > "Spline" with "Line" option enabled), the "Tangent" > "Toggle Line List Flow Style" does not work at all on that default spline. If I instead use the "Toggle type", the only change to the spline is that the spline vertex normal direction changes. After using "Toggle type", the "Toggle Line List Flow Style" does then change the "Flow type".

Should the "Toggle Line List Flow Style" not work on a default "Line" spline?
Should the "Toggle Type" not change the "line" spline to a "Smooth" spline?



  • No avatar
  • Posts: 2103
  • Polygon
July 26, 2014, 04:45:58 pm
Hi IStonia,

Creating splines with MMB/RMB in multi_views.

If I have Viewport layout of more than one view, there are some problems when creating a spline with added function of MMB/RMB. For example. In first view, LMB for start of spline...RMB(in same view) to create out_tangent_handle direction, move mouse over different view and the out_tangent_handle is lost.
That also appear to happen at other stages of spline construction, depending on what is being created (in or out handle direction).

------------------------------------------

When creating an open spline to non-planer snap points, the tangent handles on the open vertex are broken(not aligned).


Not a major problem. but....

If that was not intentional and can be changed so that the handles are aligned(both tangent handles aligned correctly to underlying geometry), would it also be possible for:- when creating a spline, if snapping to spline vertex, the created spline vertex flow normal and tangent handles adopt the underlying flow normal/handle direction from the spline vertex snap target? (well, I had to ask). Currently, when using Spline > "Add" or "Joint", the vertex tangent directions (on the open ends)are naturalized, which can be a pain, so was looking for a way to extend splines/blend splines without naturalize being applied to splines current vertex.


« Last Edit: July 26, 2014, 04:48:00 pm by steve »

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
July 27, 2014, 03:00:44 pm
Hi IStonia,

On quick tests, I am just currently seeing some minor behavior issues.

I will try to explain:-

When creating a spline, with the first vertex of that new spline being a snap point to spline vertex, the new vertex flow/tangent is being adopted from the snap target, which is what I put forward, so that is good. However, the "In" tangent to next spline vertex(that is currently floating under cursor) has its "in" tangent also locked, which is not so good.

Here I have a spline, I will be creating a new spline with its first vertex snapping to that splines end vertex.



The "Out tangent" of the new spline is locked to snap target flow/tangency, which is good, but the "In tangent" to next vertex to be created(currently floating under cursor) is also currently locked(not so good).



When the LMB is used to create that new vertex, the vertex tangency does naturalize, but that makes it difficult to know what the result will be, as the "In tangent" of that new vertex cannot be predefined/controlled(unless snapping to other snap point), as when creating a spline with LMB/MMB/RMB, there is a specific order needed to be used, so in that example, I LMB to spline vertex snap point(which locks "out" tangent direction), but the next mouse button click must either be a LMB(to create new vertex) or RMB(to create out tangent for last vertex, which will removed the locked tangency already in place). The MMB to create "In tangent" to next vertex cannot be used, unless I have used RMB to manually created the "Out tangency" for last spline vertex). I hope that is understandable?

So in the case of snapping to a spline vertex I will make a suggestion, in that when snapping to a spline vertex, the "out" tangency is created/locked as if I have used the RMB to set the out tangency, that way the floating vertex under cursor is more controllable, and if needed I can used MMB to set "In tangent" for that next spline vertex.
A pic to try to better explain:-

From above example spline.


1: I create spline, with first point snapping to underlying spline vertex.
2: The "Out" tangency is created automatically as if I had used RMB (no actually mouse click made)
3: The next spline vertex(point) can now have MMB used if manual "In" tangent control is wanted, or snapping to a target will auto create that in tangent.

------------------------------------
I see you have changed the behavior of "Joint", so that auto naturalize is no longer used. That is good, many thanks. Is it possible to be able to "Joint" the 2 open ends of a single spline?(so it can also be used to smoothly close an open spline)

------------------------------------
The "Add" I see you have also changed. Currently it is not possible to use MMB/RMB while using "Add", also, if closing the spline, the spline auto naturalize.

-------------------------------------

The issue with multi views I mentioned in earlier post. The tangency created (with MMB/RMB) is no longer lost when moving across views, but all views do not update during construction of spline(only after next mouse click). (I do not used multi views, but test anyway).