Maniphest T102000

Spline radius doesn't work proerly
Closed, ResolvedBUG

Assigned To
Germano Cavalcante (mano-wii)
Authored By
CHET (cheteron)
Oct 22 2022, 8:32 PM
Tags
  • BF Blender
  • Modeling
Subscribers
Antonio Vazquez (antoniov)
CHET (cheteron)
Edward (edward88)
Germano Cavalcante (mano-wii)

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 950M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15

Blender Version
Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: rBb292cfe5a936

Short description of error
If the radius is 0, then when you try to change with hotkeys, the radius does not change

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rBb70bbfadfece: Fix T102000: Curve Shrink Fatten doesn't work for zero radius
T96238: shrinking to zero doesn't actually scales the radius to zero
rB2d1fe736fabd: Fix T96238: shrinking to zero doesn't actually scales the radius to zero

Event Timeline

CHET (cheteron) created this task.Oct 22 2022, 8:32 PM
CHET (cheteron) updated the task description.
Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Oct 22 2022, 11:10 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
Germano Cavalcante (mano-wii) added a project: Modeling.
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

This used to work before rB2d1fe736fabd: Fix T96238: shrinking to zero doesn't actually scales the radius to zero, but due to issues like T96238: shrinking to zero doesn't actually scales the radius to zero it seemed better to follow the convention seen in other operators (which keep the value zero).

Zero multiplied by any value is zero, so it doesn't change.

But I recognize that such changes may not please in some cases. Therefore, I will add the same threshold as before for points with zero radius.

Edward (edward88) added a subscriber: Edward (edward88).Oct 22 2022, 11:45 PM

@Germano Cavalcante (mano-wii) GP strokes have the same problem. It is less likely to run into it, but once this happens it's actually worse because there is seemingly no easy way to change the radius anymore.

Germano Cavalcante (mano-wii) closed this task as Resolved by committing rBb70bbfadfece: Fix T102000: Curve Shrink Fatten doesn't work for zero radius.Oct 23 2022, 12:33 AM
Germano Cavalcante (mano-wii) claimed this task.
Germano Cavalcante (mano-wii) added a commit: rBb70bbfadfece: Fix T102000: Curve Shrink Fatten doesn't work for zero radius.
Germano Cavalcante (mano-wii) added a subscriber: Antonio Vazquez (antoniov).Oct 23 2022, 12:43 AM

@Edward (edward88), I don't feel safe making changes to Grease Pencil's Shrink/Fatten.
Maybe @Antonio Vazquez (antoniov) or someone else on the Grease Pencil team can take a look and come up with a similar solution.

Antonio Vazquez (antoniov) added a comment.EditedOct 23 2022, 12:36 PM

@Germano Cavalcante (mano-wii) If I have understood properly the bug report, the problem is when you Shrink to 0.0 a point. In GPencil there is already a check to avoid this.... I cannot reproduce the problem and I can expand the point again...just need apply a bigger value.

These are the actual lines of the code:

if (td->val) {
       *td->val = td->ival * ratio;
       /* apply PET */
       *td->val = interpf(*td->val, td->ival, td->factor);
       if (*td->val <= 0.0f) {
         *td->val = 0.001f;
       }
     }

As you can see there is a check to avoid 0 value, adding a small bias of 0.001.

Am I missing something?

Edward (edward88) added a comment.EditedOct 23 2022, 3:54 PM

@Germano Cavalcante (mano-wii) @Antonio Vazquez (antoniov) Ah my bad, I'm sorry! It's just so small that i thought it would'nt expand anymore.

Edward (edward88) added a comment.Oct 23 2022, 4:26 PM
This comment was removed by Edward (edward88).
Germano Cavalcante (mano-wii) added a comment.Oct 23 2022, 5:03 PM

@Antonio Vazquez (antoniov), for GP's shrink/fatten operator this would basically be the same changes seen in rB2d1fe736fabd and rBb70bbfadfece but now for transform_mode_gpshrinkfatten.c.

  • rB2d1fe736fabd Remove the radius limitation
  • rBb70bbfadfece Allows zero radius scaling

While I can see why limiting radius scaling on curves can be an issue, I'm not sure if it's a problem for Grease Pencil.

Edward (edward88) added a comment.Oct 23 2022, 6:59 PM
This comment was removed by Edward (edward88).
Edward (edward88) added a comment.EditedOct 23 2022, 7:27 PM

I wish the comment deletion wouldn't leave traces of my stupid ideas x')