Precision of 'Unit Scale' and 'Grid Scale' are mismatched #75998

Closed
opened 2020-04-22 14:51:56 +02:00 by Christopher Gearhart · 14 comments

System Information
Operating system: Windows 10
Graphics card:

Blender Version
Broken: 2.80-2.82
Worked: Issue irrelevant starting at 2.79

Short description of error

The precision of 'Unit Scale' does not match the precision of the overlay's 'Grid Scale'. Although 'Unit Scale' displays 6 digits, it only seems to accept 5, and the trailing zero cannot be changed. The overlay's 'Grid Scale' is accepts precision to 6 digits. Given that 'Micrometers' is an option for Length units, the 'Unit Scale' should maintain a precision to 6 digits, with the ability to choose a scale of '0.000001'.

Exact steps for others to reproduce the error

  • Open the default startup file
  • Type '0.000001' into the 'Unit Scale' in the Scene Properties panel (note that it changes to 0.000010)
  • Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value)
**System Information** Operating system: Windows 10 Graphics card: <irrelevant> **Blender Version** Broken: 2.80-2.82 Worked: Issue irrelevant starting at 2.79 **Short description of error** The precision of 'Unit Scale' does not match the precision of the overlay's 'Grid Scale'. Although 'Unit Scale' displays 6 digits, it only seems to accept 5, and the trailing zero cannot be changed. The overlay's 'Grid Scale' is accepts precision to 6 digits. Given that 'Micrometers' is an option for Length units, the 'Unit Scale' should maintain a precision to 6 digits, with the ability to choose a scale of '0.000001'. **Exact steps for others to reproduce the error** - Open the default startup file - Type '0.000001' into the 'Unit Scale' in the Scene Properties panel (note that it changes to 0.000010) - Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value)

Added subscriber: @bblanimation

Added subscriber: @bblanimation
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value)

It does accept that, but note that after increasing one using > button, it goes to .001 & reducing it doesn't change it.

> Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value) It does accept that, but note that after increasing one using `>` button, it goes to .001 & reducing it doesn't change it.

Added subscriber: @iss

Added subscriber: @iss

Unit Scale property has limited range
RNA_def_property_range(prop, 0.00001, 100000.0);

Grid Scale property goes all the way to 0
RNA_def_property_range(prop, 0.0f, FLT_MAX);

I am not quite sure why this doesn't go down to 10^-6 or in general 10^-(n*3)

`Unit Scale` property has limited range `RNA_def_property_range(prop, 0.00001, 100000.0);` `Grid Scale` property goes all the way to 0 `RNA_def_property_range(prop, 0.0f, FLT_MAX);` I am not quite sure why this doesn't go down to 10^-6 or in general 10^-(n*3)
Member

For "scale_length",

0.0010000000f, 100.0f, 0.0000100000f, 100000.0f, 0.1000000015f, 6
float softmin, softmax;  float hardmin, hardmax;  float step;  int precision;

For "grid_scale",
0.0010000000f, 1000.0f, 0.0f, FLT_MAX, 0.1000000015f, 3

So

Type '0.000001' into the 'Unit Scale' in the Scene Properties panel (note that it changes to 0.000010)

yes since it's hard min.

Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value)

since it's hard min is 0.

I am not quite sure why this doesn't go down to 10^-6 or in general 10^-(n*3)

precision is 3.

There can be only so much floating point precision..

For "scale_length", ``` 0.0010000000f, 100.0f, 0.0000100000f, 100000.0f, 0.1000000015f, 6 float softmin, softmax; float hardmin, hardmax; float step; int precision; ``` For "grid_scale", 0.0010000000f, 1000.0f, 0.0f, FLT_MAX, 0.1000000015f, 3 So >Type '0.000001' into the 'Unit Scale' in the Scene Properties panel (note that it changes to 0.000010) yes since it's hard min. > Type '0.000001' into the 'Grid Scale' in the viewport overlay dropdown (note that it accepts this value) since it's hard min is 0. > I am not quite sure why this doesn't go down to 10^-6 or in general 10^-(n*3) precision is 3. There can be only so much floating point precision..
Member

The described events are working as designed I think. So should I close this as modified behaviour request ?

The described events are working as designed I think. So should I close this as modified behaviour request ?

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

I haven't closed this because 5 digits is such odd number especially for unit scale. Also engineer in me says that it's wrong.

Seems that @JacquesLucke was involved in units, not sure if he knows if there is technical limitation for scale_length current minimum value.

If there is limitation, I would close this, otherwise it makes sense to me to change scale_length to 0.000001.

I haven't closed this because 5 digits is such odd number especially for unit scale. Also engineer in me says that it's wrong. Seems that @JacquesLucke was involved in units, not sure if he knows if there is technical limitation for `scale_length` current minimum value. If there is limitation, I would close this, otherwise it makes sense to me to change `scale_length` to 0.000001.

Added subscriber: @brecht

Added subscriber: @brecht

@iss, I suggest to change the minimum to 1e-9. The current 1e-5 indeed is a strange choice given typical metric units, I don't think there's a particular reason behind it.

@iss, I suggest to change the minimum to 1e-9. The current 1e-5 indeed is a strange choice given typical metric units, I don't think there's a particular reason behind it.
Member

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

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

This issue was referenced by 0461727553

This issue was referenced by 0461727553135f4dee29e5888b904835716565c2

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Richard Antalik self-assigned this 2020-05-11 07:29:49 +02: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
5 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#75998
No description provided.