The TubeGenerator class currently uses CurveUtils.GetTangent to calculate the frame / plane when generating the ring vertex orientation along the path vertices.
This works fine for paths that follow a uniform pattern and have almost equal segment lengths such as a ring. It leads to ugly results if one segment is followed by a much longer segment, however.
The following image shows a tube generated from 4 vertices. The fourth one is way of the screen and leeds to a tangent that has almost the same angle as the bottom tube segment:
If an additional vertex is added (the green one) the result looks much better:
In case this is intended behavior that's fine, as it is fairly easy to add artificial segments to style the tube the way you want to. However in case this is unintended it would be nice to turn this behavior on or off and modify the code so that it calculates the tangent based on the actual angle of the turn without taking the length relation into account.
A related second issue: You may notice in the screenshots that the diameter of the tube changes during these turns. I have yet to find out what in the code exactly causes this.
The
TubeGenerator
class currently usesCurveUtils.GetTangent
to calculate the frame / plane when generating the ring vertex orientation along the path vertices. This works fine for paths that follow a uniform pattern and have almost equal segment lengths such as a ring. It leads to ugly results if one segment is followed by a much longer segment, however.The following image shows a tube generated from 4 vertices. The fourth one is way of the screen and leeds to a tangent that has almost the same angle as the bottom tube segment:
If an additional vertex is added (the green one) the result looks much better:
In case this is intended behavior that's fine, as it is fairly easy to add artificial segments to style the tube the way you want to. However in case this is unintended it would be nice to turn this behavior on or off and modify the code so that it calculates the tangent based on the actual angle of the turn without taking the length relation into account.
Example vertex coordinates:
A related second issue: You may notice in the screenshots that the diameter of the tube changes during these turns. I have yet to find out what in the code exactly causes this.