NURBS subdivision wrong. #44332

Open
opened 2015-04-10 00:18:23 +02:00 by humphries boyce · 10 comments

Curve>>segments>>Subdivide

  for NURBS circle changes the shape to a rounded rectangle.

This seems to be wrong for all NURBS.

The Bohm algorithm for dividing a single interval is (this is for a cubic NURBS)

Q_i = P_i for i <= j-3
Q_i = (1-a_i) P_i-1 + a_i P_i for j-2 <= i <= j
Q_i+1 = P_i for j+1 <= i

a_i=(t' - t_i)/(t_i+3 - t_i)
The interval being divided is between t_j and t_j+1, and is split at t'.
Q_i are the new control points.
P_i are the old control points.

This is taken from Computer Graphics: Principles and Practice
by Foley, van Dam, Feiner and Hughes, page 509.

The Oslo algorithm for multiple divisions can be found in
"Discrete B-Splines and Subdivision Techniques in Computer-Aided Geometric Design and Computer Graphics" by Cohen, E.T. Lyche and R. Riesenfeld
CGIP 14(2), October 1980 87-111.

Blender Version
Broken: (example: 2.69.7 4b206af, see splash screen)
Worked: (optional)

Short description of error

Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

Curve>>segments>>Subdivide ``` for NURBS circle changes the shape to a rounded rectangle. ``` This seems to be wrong for all NURBS. The Bohm algorithm for dividing a single interval is (this is for a cubic NURBS) Q_i = P_i for i <= j-3 Q_i = (1-a_i) P_i-1 + a_i P_i for j-2 <= i <= j Q_i+1 = P_i for j+1 <= i a_i=(t' - t_i)/(t_i+3 - t_i) The interval being divided is between t_j and t_j+1, and is split at t'. Q_i are the new control points. P_i are the old control points. This is taken from Computer Graphics: Principles and Practice by Foley, van Dam, Feiner and Hughes, page 509. The Oslo algorithm for multiple divisions can be found in "Discrete B-Splines and Subdivision Techniques in Computer-Aided Geometric Design and Computer Graphics" by Cohen, E.T. Lyche and R. Riesenfeld CGIP 14(2), October 1980 87-111. **Blender Version** Broken: (example: 2.69.7 4b206af, see splash screen) Worked: (optional) **Short description of error** **Exact steps for others to reproduce the error** Based on a (as simple as possible) attached .blend file with minimum amount of steps

Changed status to: 'Open'

Changed status to: 'Open'
humphries boyce self-assigned this 2015-04-10 00:18:23 +02:00

Added subscriber: @humphries

Added subscriber: @humphries

Added subscriber: @mont29

Added subscriber: @mont29

Not quite sure what you are referring to? Do you have an actual example of this failure (like a .blend file showing it)? If you are referring to our code, adding a precise reference to it (file and lines) would help too…

Just throwing another algo like that does not help much without context…

Not quite sure what you are referring to? Do you have an actual example of this failure (like a .blend file showing it)? If you are referring to our code, adding a precise reference to it (file and lines) would help too… Just throwing another algo like that does not help much without context…

HOW to test

  1. Run blender
  2. Create a NURBS circle
  3. Select it
  4. Change mode to edit
  5. Subdivide it with Curve>>Segments>>Subdivide /* This should only increase the number of control points */

The NURBS object is no longer a circle!

All NURBS objects have there shape change by Curve>>Segments>>Subdivide.

HOW to test 1. Run blender 2. Create a NURBS circle 3. Select it 4. Change mode to edit 5. Subdivide it with Curve>>Segments>>Subdivide /* This should only increase the number of control points */ The NURBS object is no longer a circle! All NURBS objects have there shape change by Curve>>Segments>>Subdivide.

Added subscriber: @Sergey

Added subscriber: @Sergey

OK, see what you means now… This sounds more like a TODO than a bug, though. Sergey might be interested too?

OK, see what you means now… This sounds more like a TODO than a bug, though. Sergey might be interested too?

A circle should stay a circle.
A sphere should stay a sphere.
etc.
That NURBS surface you work so hard to get right should keep its shape.
This is a bug!

A circle should stay a circle. A sphere should stay a sphere. etc. That NURBS surface you work so hard to get right should keep its shape. This is a bug!

@humphries, technically it is a TODO since current subdivision algorithm is working as it was designed to. Doesn't mean it should not be improved tho, but improvements are a part of TODO/ongoing development.

P.S. Seems you're familiar with the curves, maybe you'll be interested in preparing patch for the subdiv operator in blender? :)

@humphries, technically it is a TODO since current subdivision algorithm is working as it was designed to. Doesn't mean it should not be improved tho, but improvements are a part of TODO/ongoing development. P.S. Seems you're familiar with the curves, maybe you'll be interested in preparing patch for the subdiv operator in blender? :)

Added subscriber: @ckohl_art

Added subscriber: @ckohl_art
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#44332
No description provided.