Skip to content

Handle degenerate coloring #3399

Description

@Meakk

Describe the bug
When coloring by scalar, the range is automatically computed by default.
However, in the case of vertex normal magnitude coloring, the range is degenerate since all values are approximately equal to 1, resulting in coloring noise:

Image

To Reproduce
Steps to reproduce the behavior:

  1. Open the file using f3d --no-config suzanne.ply -sb
  2. Observe noisy coloring and bar range from 1 to 1

Expected behavior
When the range is degenerate (abs(range[0] - range[1]) < epsilon), slightly expand the range by adding a safe margin so the result is a solid color corresponding to the middle of the colormap.

System Information:
N/A

F3D Information
All versions

Additional context
Once fixed, all affected test baselines must be updated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedPlease help with this issue!

Type

Projects

  • Status
    In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions