(Hair)Curl Kink Flatness Setting Not Working #77925

Open
opened 2020-06-16 19:00:38 +02:00 by Michael Berhanu · 7 comments

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.83.0, branch: master, commit date: 2020-06-03 14:38, hash: 211b6c29f7
Last Worked: 2.69.0 r60995 (from 2013)

Curl Kink Flatness Setting not working as expected

  • The purpose of Flatness setting is to give the particles a ribbon-like flatness when "kinking" particularly in the “Curl” option.
  • For comparison the "Wave” option works as expected
  • This bug however collapses the children strands to the guide/parent hair.
  • I only found this to work on an older Blender 2.69.0, it doesn't work as expected on 2.83 LTS or even Stable 2.79

Exact steps for others to reproduce the error

  1. Use "Simple" mode of Children setting for strand hair
  2. Turn on "Curl" kink option
  3. Set the Flatness value to 1 for clearly seeing what happens
  4. Switching between “Curl” and “Wave” modes shows issue

Opening the file attached on 2.69 will show how it’s supposed to look. As opposed to 2.83 LTS.
Attached Screenshots should also help.

Blend file: Curl_Kink_Flatness_Setting.blend
Screenshots: 1.png

2.png

3.png

Thank you!

  • Michael
**System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87 **Blender Version** Broken: version: 2.83.0, branch: master, commit date: 2020-06-03 14:38, hash: `211b6c29f7` Last Worked: 2.69.0 r60995 (from 2013) **Curl Kink Flatness Setting not working as expected** - The purpose of Flatness setting is to give the particles a ribbon-like flatness when "kinking" particularly in the “Curl” option. - For comparison the "Wave” option works as expected - This bug however collapses the children strands to the guide/parent hair. - I only found this to work on an older Blender 2.69.0, it doesn't work as expected on 2.83 LTS or even Stable 2.79 **Exact steps for others to reproduce the error** 1. Use "Simple" mode of Children setting for strand hair 2. Turn on "Curl" kink option 3. Set the Flatness value to 1 for clearly seeing what happens 4. Switching between “Curl” and “Wave” modes shows issue Opening the file attached on 2.69 will show how it’s supposed to look. As opposed to 2.83 LTS. Attached Screenshots should also help. Blend file: [Curl_Kink_Flatness_Setting.blend](https://archive.blender.org/developer/F8625729/Curl_Kink_Flatness_Setting.blend) Screenshots: ![1.png](https://archive.blender.org/developer/F8625737/1.png) ![2.png](https://archive.blender.org/developer/F8625741/2.png) ![3.png](https://archive.blender.org/developer/F8625748/3.png) Thank you! - Michael

Added subscriber: @MichaelBerhanu

Added subscriber: @MichaelBerhanu

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

This option is currently undoing the radius effect, which in fact does not make much sense.

This option is currently undoing the radius effect, which in fact does not make much sense.

Problem introduced by acf45062

Problem introduced by acf45062

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne

I thought about this problem and found a solution that may be the middle ground between what was solved in acf45062 and the problem described in that report.
The idea is not to flatness in the direction of the strand, so other properties like the radius rougness for the child strands can be used to have a similar result:

diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index dcd2a0b8fae..1c2ec847949 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -483,8 +483,13 @@ void do_kink(ParticleKey *state,
       axis_angle_to_quat(q1, par_vel, t);
       mul_qt_v3(q1, curl_offset);
 
-      interp_v3_v3v3(par_vec, state->co, par_co, flat);
-      add_v3_v3v3(result, par_vec, curl_offset);
+      if (flat > 0.f) {
+        float proj[3];
+        project_v3_v3v3(proj, par_vec, par_vel);
+        sub_v3_v3(proj, par_vec);
+        madd_v3_v3fl(curl_offset, proj, -flat);
+      }
+      add_v3_v3v3(result, state->co, curl_offset);
       break;
     }
     case PART_KINK_RADIAL: {

@LukasTonne, can you take a look?

I thought about this problem and found a solution that may be the middle ground between what was solved in acf45062 and the problem described in that report. The idea is not to flatness in the direction of the strand, so other properties like the radius rougness for the child strands can be used to have a similar result: ``` diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index dcd2a0b8fae..1c2ec847949 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -483,8 +483,13 @@ void do_kink(ParticleKey *state, axis_angle_to_quat(q1, par_vel, t); mul_qt_v3(q1, curl_offset); - interp_v3_v3v3(par_vec, state->co, par_co, flat); - add_v3_v3v3(result, par_vec, curl_offset); + if (flat > 0.f) { + float proj[3]; + project_v3_v3v3(proj, par_vec, par_vel); + sub_v3_v3(proj, par_vec); + madd_v3_v3fl(curl_offset, proj, -flat); + } + add_v3_v3v3(result, state->co, curl_offset); break; } case PART_KINK_RADIAL: { ``` @LukasTonne, can you take a look?
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:46:46 +01:00
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
2 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#77925
No description provided.