Noise Texture Fac output fails when using exact unit inputs and exact scale values #87781

Open
opened 2021-04-24 19:28:06 +02:00 by Gorgious · 14 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.89

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab
Broken on the latest 2.90, 2.93 and 3.0.0 commits I could find.
Also broken on 2.80.75 but there was no W input back then.
Also broken on 2.79b

Short description of error
The Noise Texture Node exhibits weird values for its Fac output (and by extension*, the Red channel of it Color Output) when using default properties. The Green and Blue channels seem to work properly though.
The Fac output of the Noise Texture Node produces unexpected results on discrete unit inputs, and on exact unit scales. The W seed also has an effect when it's set to an increment of 0.5.

*As you may know the red channel of the color output of the noise texture contains the same values as the Fac output.

Exact steps for others to reproduce the error
Default Scene. Create a cube and scale it way up in edit mode.

Create a new material, Texture Coordinates node > Object Output > Separate XYZ > Z Output > Math node set to Ceil, Round, Floor, or Truncate > Noise Texture > Fac Output

Problem : If you keep the noise texture at the default scale of 5, the shader will produce a continuous value of 0.5 on the whole mesh

image.png

Expected result : Get a different value for each subsequent strata of the material, as exhibited if you plug in the color output or try out the green or blue channel of the color output.

image.png

Troubleshooting : If you change the scale of the noise texture node, the behaviour of the randomization seems to work again.

image.png

But, there is a band that consistently stays at exactly 0.5 value whatever the scale.
This may be intended behaviour since the input / output values at Z = 0 is the same whatever the scale. However the same behaviour isn't shown on the Green and Blue channels of the color output...

image.png

And, every time the scale is set to a precise unit, (1.000, 2.000, etc.) the continuous value of 0.5 appears again.

image.png

Also, there is a weird banding of exactly 0.5 output values when using scales of *.500, .250,.125, scale values :

image.png
image.png

Moreover, if the user chooses to use 4D input, and tweaks the W value to something other than 0 (I assume it is the default seed value even when using 1D), the random expected behaviours is again present.

But there are certain combinations that produces an unexpected number of values that are exactly 0.5. Example :

image.png

Also, if the W value is set to an increment of a half unit (0.5, 1.0, 1.5, etc.), this happens.

For Pair scale unit size (eg 46), continuous grey (0.5) value

image.png

For odd scale unit size (eg 45), unexpected number of exactly 0.5 value bands.

image.png

Maybe this is intended behaviour but it seems odd that the Fac outputs returns a single value when the Green and Blue channels act "truely" randomly in this case.

noise_fac_test.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.89 **Blender Version** Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab` Broken on the latest 2.90, 2.93 and 3.0.0 commits I could find. Also broken on 2.80.75 but there was no W input back then. Also broken on 2.79b **Short description of error** The Noise Texture Node exhibits weird values for its Fac output (and by extension*, the Red channel of it Color Output) when using default properties. The Green and Blue channels seem to work properly though. The Fac output of the Noise Texture Node produces unexpected results on discrete unit inputs, and on exact unit scales. The W seed also has an effect when it's set to an increment of 0.5. *As you may know the red channel of the color output of the noise texture contains the same values as the Fac output. **Exact steps for others to reproduce the error** Default Scene. Create a cube and scale it way up in edit mode. Create a new material, Texture Coordinates node > Object Output > Separate XYZ > Z Output > Math node set to Ceil, Round, Floor, or Truncate > Noise Texture > Fac Output Problem : If you keep the noise texture at the default scale of 5, the shader will produce a continuous value of 0.5 on the whole mesh ![image.png](https://archive.blender.org/developer/F10035633/image.png) Expected result : Get a different value for each subsequent strata of the material, as exhibited if you plug in the color output or try out the green or blue channel of the color output. ![image.png](https://archive.blender.org/developer/F10035635/image.png) Troubleshooting : If you change the scale of the noise texture node, the behaviour of the randomization seems to work again. ![image.png](https://archive.blender.org/developer/F10035638/image.png) But, there is a band that consistently stays at exactly 0.5 value whatever the scale. This may be intended behaviour since the input / output values at Z = 0 is the same whatever the scale. However the same behaviour isn't shown on the Green and Blue channels of the color output... ![image.png](https://archive.blender.org/developer/F10035640/image.png) And, every time the scale is set to a precise unit, (1.000, 2.000, etc.) the continuous value of 0.5 appears again. ![image.png](https://archive.blender.org/developer/F10035642/image.png) Also, there is a weird banding of exactly 0.5 output values when using scales of *.500, *.250,*.125, scale values : ![image.png](https://archive.blender.org/developer/F10035729/image.png) ![image.png](https://archive.blender.org/developer/F10035720/image.png) Moreover, if the user chooses to use 4D input, and tweaks the W value to something other than 0 (I assume it is the default seed value even when using 1D), the random expected behaviours is again present. But there are certain combinations that produces an unexpected number of values that are exactly 0.5. Example : ![image.png](https://archive.blender.org/developer/F10035673/image.png) Also, if the W value is set to an increment of a half unit (0.5, 1.0, 1.5, etc.), this happens. For Pair scale unit size (eg 46), continuous grey (0.5) value ![image.png](https://archive.blender.org/developer/F10035676/image.png) For odd scale unit size (eg 45), unexpected number of exactly 0.5 value bands. ![image.png](https://archive.blender.org/developer/F10035678/image.png) Maybe this is intended behaviour but it seems odd that the Fac outputs returns a single value when the Green and Blue channels act "truely" randomly in this case. [noise_fac_test.blend](https://archive.blender.org/developer/F10035702/noise_fac_test.blend)
Author

Added subscriber: @nathan.hild

Added subscriber: @nathan.hild

Added subscriber: @bcoconni

Added subscriber: @bcoconni

I encountered this exact same problem. It took me an awful lot of time before realizing that only the green and blue components of the noise texture are "noisy", unlike the red component which holds a constant value. So I had to add a node "Separate RGB" after "Noise Texture" just to get random values using the texture green component rather than normally using "Fac". Thanks to @nathan.hild, I now know that setting the scale to a non integer value restores the "noisy" output from the "Fac".

Please fix that bug. Thanks.

I encountered this exact same problem. It took me an awful lot of time before realizing that only the green and blue components of the noise texture are "noisy", unlike the red component which holds a constant value. So I had to add a node "Separate RGB" after "Noise Texture" just to get random values using the texture green component rather than normally using "Fac". Thanks to @nathan.hild, I now know that setting the scale to a non integer value restores the "noisy" output from the "Fac". Please fix that bug. Thanks.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm the behavior.
(havent checked code if there is a deeper reason for this, but will confirm for now)

Can confirm the behavior. (havent checked code if there is a deeper reason for this, but will confirm for now)
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

@CharlieJolly : do you know more?

@CharlieJolly : do you know more?
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

This is similar to #83144, the noise is generated procedurally using cells, when the inputs are set to certain values (normally whole numbers), this can result in zero noise at the cell boundaries. It can be mitigated by offsetting the values. It is not ideal but I think should be regarded as a known issue.

Tagging @OmarEmaraDev in case he has any comments to add.

This is similar to #83144, the noise is generated procedurally using cells, when the inputs are set to certain values (normally whole numbers), this can result in zero noise at the cell boundaries. It can be mitigated by offsetting the values. It is not ideal but I think should be regarded as a known issue. Tagging @OmarEmaraDev in case he has any comments to add.
Member

Charlie's assessment is correct. The reason why the green and blue channels seem "more random" is that we add a random offset to their coordinates as a form of seed already. I will update the documentation of the noise node to note that behavior.

Charlie's assessment is correct. The reason why the green and blue channels seem "more random" is that we add a random offset to their coordinates as a form of seed already. I will update the documentation of the noise node to note that behavior.
Member

I will update the documentation of the noise node to note that behavior.

Thx. I think once this is properly documented, this report could be closed then.

> I will update the documentation of the noise node to note that behavior. Thx. I think once this is properly documented, this report could be closed then.
Author

Thanks for your time and all the clarification, I agree it's absolutely okay to have this kind of limitation if it's properly documented.

Thanks for your time and all the clarification, I agree it's absolutely okay to have this kind of limitation if it's properly documented.
Member

Added documentation in rBM8331.

Added documentation in rBM8331.
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:02:28 +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
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#87781
No description provided.