News:

 

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

0 Members and 3 Guests are viewing this topic.

  • No avatar
  • Posts: 2103
  • Polygon
June 28, 2014, 01:42:44 pm
Hi IStonia,

This is a problem I have seen for a long time, but usually attempt to work around the issue, but due to forum post concerning this, I thought it time to report.

Quick, simple example.

There are various times when objects, such as bolts/rivet heads, need to be placed along an object. The easiest way should be to create a path(spline) and use the "Instance > Array > Spline"

So here is an object, I have created an inset to define the path/placement for the objects(edge highlighted).



I use "Create Closed Spline" to create the spline(path) from the selected edges. Change the spline(path) to a "Line List"(as I want it to follow the sharp corners), then use the "Instance > Array > Spline" to create the objects(I am using an object shaped as a 3d arrow so you can see the direction of each object)

As you can see from the result, the direction of the objects(normal directions) change/flip by 90/180 degrees along the spline(path). The only way to attempt to fix the issue is by changing back to a "naturalize" spline, then spend time editing the tangents to vectors (cusp tangents making alignments to previous/next vertex), and then spending more time using "Tangent Twist" to rotate the normals to correct orientation. That is not really workable when you have a spline with many segments.

Could you please take a look at this issue when you can find time?

Thanks.



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

To add:-

If I go back to "Voidworld jul-10-12". in that build it was a simple matter of creating the "line list" spline and using "array" without all the need for a lot of manual editing.








  • No avatar
  • Posts: 130
  • Spline
June 30, 2014, 10:28:19 am
+1 to this, for sure.  To use Steve's exact  example, I'm constantly adding bolts/rivet heads to models (I usually do this in CAD software at the moment)... so having the spline vectors working correctly on paths created from an inset, etc. would be very useful in NVIL.

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
July 03, 2014, 09:17:46 am
Try this
http://www.digitalfossils.com/Download/NVil-Jul-03-14.rar

Also I've made it possible to modify tangent flow in "Tangent" tool while the spline is in linelist style.

  • No avatar
  • Posts: 2103
  • Polygon
July 03, 2014, 02:58:37 pm
Hi IStonia,

The conversion to line_list appears to of improved. But it does not get around an issue that I have put forward various times before, which is the initial creation of the splines normal directions/tangent vectors.

To expand slightly on the above example.

Here is the simple model from above example, apart from me adding 2 extra edge loops, which will add 4 extra vertex to the created spline, but this time, the distance between the spline vertex are not evenly spaced.

Model with edge selection:-


Created spline from edge (you can see a problem top right)


Zoom to that problem area, and you can see the spline is looping back on itself. That problem may not be seen by user and simply change the spline to line_list.


As line_list spline, use the "array> spline" to array object, and result would not be as wanted/expected.


Of course now you could start to edit the normal twist direction of the line_list vertex, but again if the spline as many vertex it could take quite a while, but you also have the added problem of not knowing what angle the spline_vertex_normals direction actually are, and a need to start aligning by eye, as there is no value given as to what the normal direction is, and no tools/functions to set the normal direction to a specific object/world angle.

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

  • No avatar
  • Posts: 2103
  • Polygon
July 04, 2014, 06:39:44 pm
Hi IStonia,

Certainly an improvement.

The main problem now appears to be coming from the automatic creation of closed splines, or, where you manually start the creation of the spline.

As example:-

I have an object and want to add rivet heads along the 4 edge loops shown.


Of course, I could create one spline from one edge loop, then copy the created array(from spline) to the other 3 edge loops, however, the resulting normal directions of the created splines differs depending on which edge loop I used, as the start/direction of the spline changes (possibly due to underlying vertex order/numbering).
The 4 splines as line_list


With that example, 2 splines give good usable result(all normal directions as expected), and 2 splines give normals that flip normals direction(not usable).

I could post images of the resulting spline arrays, but I do not see the point, it would be better for you to check yourself. I have attached the simple example geometry.



« Last Edit: July 04, 2014, 06:41:28 pm by steve »

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

  • No avatar
  • Posts: 2103
  • Polygon
July 04, 2014, 10:38:57 pm
Hi IStonia,

Up to now, all testing is giving usable results, with spline vertex normals consistent. Excellent work.

The calculations you are using to create the asymmetric tangents, will those now be used for all naturalized spline calculations?, as the result are far better with that.

Many thanks for taking the time to look at and fix this issue.


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

  • No avatar
  • Posts: 2103
  • Polygon
July 05, 2014, 02:04:20 pm
Hi IStonia,

On first quick checks,

If using "Edit > options > Spline transform options > Auto Naturalize Selected Points" or "SplineVertex Shortcut tools > Naturalize Spine selected",  unselected spline vertex on each side of the selected spline vertex are also naturalized when moving selected vertex with manipulator.(that did not happen previously).

If using scale manipulator to flatten spline vertex, the movement(scaling) of the vertex is very choppy(not smooth). Probably due to new calculations for auto naturalize.(not a major problem).

I will check/test more later today.

Thanks,


  • No avatar
  • Posts: 2103
  • Polygon
July 05, 2014, 03:33:50 pm
"Bridge holes > Curved" is causing Nvil to crash. (win7 -64)

(Note: It actually looks like the problem is due to the creation of a 2 point(vertex) spline. Creating simple 2 vertex spline also causes same crash/report. So unable to make checks/tests on various functions that require 2 vertex spline)

Windows error report:-

Code: [Select]
Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: nvil 1.0.exe
  Problem Signature 02: 2.3.5300.536
  Problem Signature 03: 53b7dee1
  Problem Signature 04: CharacterClasses
  Problem Signature 05: 2.3.5300.521
  Problem Signature 06: 53b7dec3
  Problem Signature 07: 463
  Problem Signature 08: 0
  Problem Signature 09: System.StackOverflowException
  OS Version: 6.1.7600.2.0.0.256.1
  Locale ID: 2057
« Last Edit: July 05, 2014, 03:43:16 pm by steve »

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

Also a new option
Edit > options > Spline transform Options > Auto Naturalize Selected Point's Adj Points Too. Auto naturalize at selected point's adjacent points too on spline vertex transforming.

  • No avatar
  • Posts: 2103
  • Polygon
July 06, 2014, 11:20:09 am
Hi IStonia,

On quick tests, all issues reported on thread have been fixed.

This:-
Also a new option
Edit > options > Spline transform Options > Auto Naturalize Selected Point's Adj Points Too. Auto naturalize at selected point's adjacent points too on spline vertex transforming.
I do not see functioning.
It appears that function works in conjunction with "Auto Naturalize Selected Points". IMHO, the naming/use of that new function could lead to confusion (certainly did with me).
Would it not be possible to make that new function work so it actually auto naturalize the adj to selected(without the need for "Auto Naturalize selected" to be enabled)? If not, then that function should really be grayed out until the "Auto Naturalize Selected Points" is enabled. But of course, that can also cause issue, due to the fact when you select an option from one of the drop down menus, the menu automatically closes.

---------------------------
Note:
When testing splines > Line_list conversion, I have been testing with known limitation due to underlying twist method >Tangent calculations. So it is certainly possible for users to get unexpected results.
I think the only way to get line_list splines correct from any/all geometry, would be for Nvil to copy the vertex normal direction information from geometry and use that for spline_tangent direction.


« Last Edit: July 07, 2014, 12:10:52 am by steve »

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

*  Edit > options > Spline transform Options > Auto Naturalize Selected Points And Adj Points. Auto naturalize at selected points and adjacent points as well on spline vertex transforming.
*  "Affect all selected points" option is added to Tangent > Twist tool.

Note:
When testing splines > Line_list conversion, I have been testing with known limitation due to underlying twist method >Tangent calculations. So it is certainly possible for users to get unexpected results.
I think the only way to get line_list splines correct from any/all geometry, would be for Nvil to copy the vertex normal direction information from geometry and use that for spline_tangent direction.

Not sure what you mean. Can you give illustration pictures?

  • No avatar
  • Posts: 2103
  • Polygon
July 12, 2014, 01:37:49 pm
Hi IStonia,

Not sure what you mean. Can you give illustration pictures?

Currently, when you create a spline from edges, the spline is created from the vertex positions of the selection, but the normal directions of the spline vertex are based on what?

If I put forward another example of wanting to place rivets around an object, an object that is not as planer as the examples shown before. For example, a sphere.

Here I have a sphere(wire_frame), with an edge selection for the positioning of the rivets.



Create closed spline from selection.(changed to line_list)


Here I have created an instance array using that spline, with option "Snap points > Use spline points"


You can see from the result, the arrayed objects flip, and if shown with object(sphere), it is not usable, and as mentioned, there is no way to quickly/accurately make alignment of spline vertex normals to object normals.


Change array option to "Snap points > Use Input", and the result is better, as at least the arrayed object point in similar direction, but still not correct for the usage wanted. At best, only 7 out of 24 instances point in correct(usable) normal direction



Now of course, as mentioned, the user could try and manually edit the spline, but would probably give up on a spline with many vertex, due to the fact alignment would need to be made by eye, as there are no tools/functions that will align the spline vertex normals to a target.
Of course, you could now sit down and make new algorithms to try and get around the issue shown in this example, but would any new algorithm work for ever possible situation?
So rather than the user fighting with this, or you possibly pulling you hair out trying different algorithms, why not have an option/function that will create the splines(from geometry) based on the underlying geometry vertex positions and normal directions?
That would save the user possibly a lot of work, and save you keep trying to make adjustments to algorithms based on more examples I could post, showing how the new algorithms do not work in a different example.

---------------------------
With Nvil, there are various, quite advanced tools/function where splines are used, but actually creating splines can be a complete PITA




« Last Edit: July 12, 2014, 01:48:42 pm by steve »