changing curve handles type to "vector" makes weird rotations for dupliframes #44393

Closed
opened 2015-04-14 22:41:19 +02:00 by mathieu menuet · 14 comments

System Information
all

Blender Version
Broken: 2.74

Short description of error
when an object is duplicated with dupliframes onto a curve, changing the handles type in the curve makes a mess on rotations. Giving the handles a translation of 0 resolves the problem.

Exact steps for others to reproduce the error
Open attached blend. The edited curve is the same curve as the one on the left, but with handles type as "vector". Note how the rotation of the dupliframes' object breaks compared to the original curve. Now press G and click without moving the mouse, the rotation are again right.
Awaited behavior: the step with null translation should not be required, the rotation should always follow the curve.
bug_dupliframes_curve_vector.blend

**System Information** all **Blender Version** Broken: 2.74 **Short description of error** when an object is duplicated with dupliframes onto a curve, changing the handles type in the curve makes a mess on rotations. Giving the handles a translation of 0 resolves the problem. **Exact steps for others to reproduce the error** Open attached blend. The edited curve is the same curve as the one on the left, but with handles type as "vector". Note how the rotation of the dupliframes' object breaks compared to the original curve. Now press G and click without moving the mouse, the rotation are again right. Awaited behavior: the step with null translation should not be required, the rotation should always follow the curve. [bug_dupliframes_curve_vector.blend](https://archive.blender.org/developer/F162038/bug_dupliframes_curve_vector.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli

Added subscriber: @mont29

Added subscriber: @mont29

Can confirm the issue…

Can confirm the issue…
Bastien Montagne self-assigned this 2015-04-17 10:22:26 +02:00

Ok, so far, I understood why fake-translating things fixes the issue - because this switch handles from 'Vector' to 'Free' type.

DevNote: Segments between two vector handles get an optimization in curve handling, since they generate perfect straight lines, no need to subdivide them in 'Resolution U' number of sub-segments. Something is going wrong here, and breaks part of curve path it seems…

Ok, so far, I understood why fake-translating things fixes the issue - because this switch handles from 'Vector' to 'Free' type. DevNote: Segments between two vector handles get an optimization in curve handling, since they generate perfect straight lines, no need to subdivide them in 'Resolution U' number of sub-segments. Something is going wrong here, and breaks part of curve path it seems…
Author

thank you Bastien, switching to 'free' type solves the problem in the simple case file of the report, sadly for some reason, it doesn't work in the original file where the bug was first triggered. Here is a simple part of the file from original scene: bug_dupliframes_curve_vector_v2.blend . I hope it can help.

thank you Bastien, switching to 'free' type solves the problem in the simple case file of the report, sadly for some reason, it doesn't work in the original file where the bug was first triggered. Here is a simple part of the file from original scene: [bug_dupliframes_curve_vector_v2.blend](https://archive.blender.org/developer/F163472/bug_dupliframes_curve_vector_v2.blend) . I hope it can help.
Bastien Montagne removed their assignment 2015-04-17 13:25:23 +02:00
Sergey Sharybin was assigned by Bastien Montagne 2015-04-17 13:25:23 +02:00

Bah… Spent the whole morning on this nightmare… and only good news is, I understand exactly what’s going on: Rotation (orientation) is represented by a quaternion at every BevPoint of the bevel list (the way those quats are generated is rather complex btw), and then when generating curve’s path from that BevelList, each PathPoint gets an interpolattion of its nearest BevPoints' quats.

Now, this is perfect for 'smooth' BevPoints, but not for 'sharp' ones!

Note that this issue is especially visible with vector handles, but actually affects any non-aligned control point (you should get an abrupt rotation in those cases, not a smooth interpolated one).

For 'sharp' points, we'd probably need two quats actually, one for each side. Then, if a BevPoint is tagged as sharp (split_tag), we can use its second quat when on its second 'side', in calc_curvepath… Tried to compute those second quats directly in calc_curvepath, but this seems pretty much impossible (at least for my level of quat knowledge :| ).

Before spending more time on this, Sergey, would love to have your feedback?

Bah… Spent the whole morning on this nightmare… and only good news is, I understand exactly what’s going on: Rotation (orientation) is represented by a quaternion at every BevPoint of the bevel list (the way those quats are generated is rather complex btw), and then when generating curve’s path from that BevelList, each PathPoint gets an interpolattion of its nearest BevPoints' quats. Now, this is perfect for 'smooth' BevPoints, but not for 'sharp' ones! Note that this issue is especially visible with vector handles, but actually affects any non-aligned control point (you should get an abrupt rotation in those cases, not a smooth interpolated one). For 'sharp' points, we'd probably need two quats actually, one for each side. Then, if a BevPoint is tagged as sharp (`split_tag`), we can use its second quat when on its second 'side', in `calc_curvepath`… Tried to compute those second quats directly in `calc_curvepath`, but this seems pretty much impossible (at least for my level of quat knowledge :| ). Before spending more time on this, Sergey, would love to have your feedback?
Sergey Sharybin was unassigned by Bastien Montagne 2015-04-17 13:25:45 +02:00
Bastien Montagne self-assigned this 2015-04-17 13:25:45 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

eeek, wanted to CC, not reassign :|

eeek, wanted to CC, not reassign :|

@mont29, not sure what kind of feedback you're expecting here, you pretty much nailed what's happening in there. It's not perfect, but that's how it was intended to be implemented. Improvements are always possible, but IMO it belongs to a bigger project of curves renewal.

@mont29, not sure what kind of feedback you're expecting here, you pretty much nailed what's happening in there. It's not perfect, but that's how it was intended to be implemented. Improvements are always possible, but IMO it belongs to a bigger project of curves renewal.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Yeah, wanted more or less that kind of advice. :)

Thought about it a bit more, and there is not only the rotation that is an issue here in 'sharp' points case… Fixing this correctly is beyond scope of bugreport, so closing as TODO for now.

@bliblubli about your other issue, workaround is actually always the same:

  • do not use vector handles (convert them to free ones).
  • increase U resolution of the curve until you have enough sub-segments to prevent any artifact.
Yeah, wanted more or less that kind of advice. :) Thought about it a bit more, and there is not only the rotation that is an issue here in 'sharp' points case… Fixing this correctly is beyond scope of bugreport, so closing [as TODO](http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Tools#Curves) for now. @bliblubli about your other issue, workaround is actually always the same: * do not use vector handles (convert them to free ones). * increase U resolution of the curve until you have enough sub-segments to prevent any artifact.
Author

well, I tried on the second file I uploaded here, it doesn't work even with the maximum of 64. Please help.

well, I tried on the second file I uploaded here, it doesn't work even with the maximum of 64. Please help.
Author

The bug also trigger with free handles and with an increased U (64 is max). Please have a look again.

The bug also trigger with free handles and with an increased U (64 is max). Please have a look again.
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
3 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#44393
No description provided.