Maniphest T91953

Setting a curve to Cyclic causes the Geometry Nodes to evaluate the Normal direction of the curve incorrectly.
Closed, Archived

Assigned To
None
Authored By
Jason schleifer (jasonschleifer)
Oct 5 2021, 3:54 AM
Tags
  • BF Blender
  • Geometry Nodes
  • Modeling
Subscribers
Jacques Lucke (JacquesLucke)
Jason schleifer (jasonschleifer)
Orestis Konstantinidis (SimontheSorcerer)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: macOS-11.6-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 560X OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.6.20

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-10-04 07:43, hash: rB8c55333a8e80
Worked: (newest version of Blender that worked as expected)

Short description of error
If you turn a curve Cyclic, Geometry Nodes calculates the normal direction of the curve incorrectly. This is easiest to see if you use the Curve to Mesh node to create a mesh, display the normals of the curve in Edit mode, manipulate the curve to give it a unique shape, and then tweak the cyclic value.

Exact steps for others to reproduce the error

  1. Create a Bezier Circle
  2. Create a new Geometry Node for the circle.
  3. Add a Curve to Mesh Node.
  4. Add a Curve Line node.
  5. Set the Curve Line END values to 0.2, 0, 0.
  6. Connect the Curve line to the Profile Curve of the Curve to Mesh node.
  7. Connect the Group Input -> Geometry output to the Curve in the Curve to Mesh node.
  8. Connect the Curve to Mesh -> Mesh output to the Group Output Geometry input.

Now, select the curve and switch to *edit* mode.
In the Viewport Overlays, increase the display of the Normals until you can see them for the curve.
Adjust the curve until it's twisted.
Now in the Properties Panel for the curve, under Active Spline toggle on and off Cyclic. Notice that the mesh doesn't line up with the normals when Cyclic is on.


or

  • Open .blend file
  • Turn on Cyclic

Event Timeline

Jason schleifer (jasonschleifer) created this task.Oct 5 2021, 3:54 AM
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Oct 5 2021, 8:23 AM
Pratik Borhade (PratikPB2123) added projects: Geometry Nodes, Modeling.
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).
Pratik Borhade (PratikPB2123) updated the task description.Oct 5 2021, 8:25 AM
Orestis Konstantinidis (SimontheSorcerer) added a subscriber: Orestis Konstantinidis (SimontheSorcerer).Oct 5 2021, 10:08 AM
Jacques Lucke (JacquesLucke) closed this task as Archived.Oct 29 2021, 12:54 PM
Jacques Lucke (JacquesLucke) added a subscriber: Jacques Lucke (JacquesLucke).

Unfortunately, this is a limitation currently. The old code to compute normals did not work entirely correct on cyclic splines. We tried to keep the geometry nodes implementation close to the original implementation while still fixing the bug (didn't even know how to write the algorithm so that it has the same bug..). This is also mentioned in the original patch: D11621. In the long term the fixed implementation should be used all over Blender of course.

Here is an example where the old algorithm failed and geometry nodes does the correct thing on the same curve: