Maniphest T55405

Interpolated hair curves sharp turns
Confirmed, NormalKNOWN ISSUE

Assigned To
None
Authored By
Adam Carrick (Pan)
Jun 8 2018, 3:12 PM
Tags
  • BF Blender
  • Physics
  • Nodes & Physics
Subscribers
Adam Carrick (Pan)
Germano Cavalcante (mano-wii)
Jacques Lucke (JacquesLucke)
Lukas Tönne (lukastoenne)
Philipp Oeser (lichtwerk)

Description

System Information
Windows 10
Geforce 970
32 Gigabytes ram

Blender Version
2.79

Short description of error
As shown in the screenshot below, some of the hairs seemingly at random have their curves restart mid stroke, leading to a perfectly straight line connecting from one side of the wave to the other where it continues as a curve.

This happens on hair systems using interpolated children and either braid or spiral kink.

Exact steps for others to reproduce the error
Add Hair system, Up the number of steps to 7
Display 7 steps
Set children to Interpolated
Set Kink to Braid
Amplitude 0.663
Frequency 1.507

The error occurs at any Amplitude/Frequency

Related Objects

Event Timeline

Adam Carrick (Pan) created this task.Jun 8 2018, 3:12 PM
Adam Carrick (Pan) updated the task description.Jun 8 2018, 3:15 PM
Philipp Oeser (lichtwerk) claimed this task.Jun 13 2018, 3:40 PM
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.
Philipp Oeser (lichtwerk) added subscribers: Lukas Tönne (lukastoenne), Philipp Oeser (lichtwerk).

Can confirm this.

Looking at this part of the code, there might be something to prevent the sudden jump, but needs further investigation. Claiming for now, but might end up passing this on to @Lukas Tönne (lukastoenne) if I fail...

Philipp Oeser (lichtwerk) added a project: Physics.Jun 13 2018, 3:41 PM
Philipp Oeser (lichtwerk) removed Philipp Oeser (lichtwerk) as the assignee of this task.Nov 6 2019, 4:48 PM
Dalai Felinto (dfelinto) added a project: Tracker Curfew.Dec 23 2019, 4:36 PM
Germano Cavalcante (mano-wii) edited projects, added Nodes & Physics; removed Tracker Curfew.Feb 1 2020, 4:19 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

I can confirm with the latest daily build.
In this file you can identify the problem better:

I think this problem should be considered after T68981

Jacques Lucke (JacquesLucke) changed the subtype of this task from "Bug" to "Known Issue".Sep 16 2020, 1:55 PM
Jacques Lucke (JacquesLucke) added a subscriber: Jacques Lucke (JacquesLucke).

I'm quite sure these issues are caused by hardcoded thresholds in particle_child.c. In the given example, the "jump" seems to happen when inp_y changes from >0.5 to <0.5 and vice versa.

inp_y = dot_v3v3(y_vec, vec_one);
inp_z = dot_v3v3(z_vec, vec_one);

if (inp_y > 0.5f) {
  copy_v3_v3(state_co, y_vec);

  mul_v3_fl(y_vec, amplitude * cosf(t));
  mul_v3_fl(z_vec, amplitude / 2.f * sinf(2.f * t));
}
else if (inp_z > 0.0f) {
  mul_v3_v3fl(state_co, z_vec, sinf((float)M_PI / 3.f));
  madd_v3_v3fl(state_co, y_vec, -0.5f);

  mul_v3_fl(y_vec, -amplitude * cosf(t + (float)M_PI / 3.f));
  mul_v3_fl(z_vec, amplitude / 2.f * cosf(2.f * t + (float)M_PI / 6.f));
}
else {
  mul_v3_v3fl(state_co, z_vec, -sinf((float)M_PI / 3.f));
  madd_v3_v3fl(state_co, y_vec, -0.5f);

  mul_v3_fl(y_vec, amplitude * -sinf(t + (float)M_PI / 6.f));
  mul_v3_fl(z_vec, amplitude / 2.f * -sinf(2.f * t + (float)M_PI / 3.f));
}

Unfortunately, I don't really know what this code is supposed to do exactly, so I cannot correct it.

It seems unlikely that someone will fix this before the new hair type is usable. Therefore, I'll reclassify this as known issue.

Sebastian Parborg (zeddb) moved this task from Backlog to Particles on the Physics board.Oct 15 2020, 1:33 PM
Dalai Felinto (dfelinto) moved this task from Backlog to Known Issues on the Nodes & Physics board.Mar 2 2021, 11:28 AM