Setting a curve to Cyclic causes the Geometry Nodes to evaluate the Normal direction of the curve incorrectly. #91953

Closed
opened 2021-10-05 03:54:34 +02:00 by Jason schleifer · 7 comments

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: 8c55333a8e
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.
cyclic_offset.gif

Exact steps for others to reproduce the error

  • Create a Bezier Circle
  • Create a new Geometry Node for the circle.
  • Add a Curve to Mesh Node.
  • Add a Curve Line node.
  • Set the Curve Line END values to 0.2, 0, 0.
  • Connect the Curve line to the Profile Curve of the Curve to Mesh node.
  • Connect the Group Input -> Geometry output to the Curve in the Curve to Mesh node.
  • Connect the Curve to Mesh -> Mesh output to the Group Output Geometry input.

image.png

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

cyclicOffset.blend

**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: `8c55333a8e` 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. ![cyclic_offset.gif](https://archive.blender.org/developer/F10771266/cyclic_offset.gif) **Exact steps for others to reproduce the error** - Create a Bezier Circle - Create a new Geometry Node for the circle. - Add a Curve to Mesh Node. - Add a Curve Line node. - Set the Curve Line END values to 0.2, 0, 0. - Connect the Curve line to the Profile Curve of the Curve to Mesh node. - Connect the Group Input -> Geometry output to the Curve in the Curve to Mesh node. - Connect the Curve to Mesh -> Mesh output to the Group Output Geometry input. ![image.png](https://archive.blender.org/developer/F10771255/image.png) 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 [cyclicOffset.blend](https://archive.blender.org/developer/F10771290/cyclicOffset.blend)
Author
Member

Added subscriber: @JasonSchleifer

Added subscriber: @JasonSchleifer
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Added subscriber: @OrestisKonstantinidis

Added subscriber: @OrestisKonstantinidis
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Member

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:
old_normal_calculation_buggy.blend

image.png

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](https://archive.blender.org/developer/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: [old_normal_calculation_buggy.blend](https://archive.blender.org/developer/F11595590/old_normal_calculation_buggy.blend) ![image.png](https://archive.blender.org/developer/F11595595/image.png)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#91953
No description provided.