Unexpected output from Musgrave Texture #75774

Closed
opened 2020-04-16 05:29:25 +02:00 by Russell · 20 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.74

Blender Version
Broken: version: 2.90 (sub 0), branch: master, commit date: 2020-04-15 15:46, hash: 4dc534aa04
Worked: (newest version of Blender that worked as expected)

Short description of error
I suspect that the Fac output from the Musgrave Texture Node is outputting values less than zero. This produces unexpected results when running its output through any number of mathematical operations.

Exact steps for others to reproduce the error

  1. Create a Musgrave Texture Node
  2. Run its output through a Map Range node and then to the Base Color input of the Principled BSDF shader.
  3. You must remove the Clamp checkbox on the Map Range node to see the full range of white to black that you expect. This indicates that values are outside the expected 0 to 1 range for a Fac output.

I don't know how to debug this further since we can't see the actual numerical output from any of these nodes.

Screenshot (81).png

Screenshot (80).png

What straight black produces:
Screenshot (82).png

What, uh, less than black produces:
Screenshot (83).png

Material 000.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.74 **Blender Version** Broken: version: 2.90 (sub 0), branch: master, commit date: 2020-04-15 15:46, hash: `4dc534aa04` Worked: (newest version of Blender that worked as expected) **Short description of error** I suspect that the Fac output from the Musgrave Texture Node is outputting values less than zero. This produces unexpected results when running its output through any number of mathematical operations. **Exact steps for others to reproduce the error** 1. Create a Musgrave Texture Node 2. Run its output through a Map Range node and then to the Base Color input of the Principled BSDF shader. 3. You must remove the Clamp checkbox on the Map Range node to see the full range of white to black that you expect. This indicates that values are outside the expected 0 to 1 range for a Fac output. I don't know how to debug this further since we can't see the actual numerical output from any of these nodes. ![Screenshot (81).png](https://archive.blender.org/developer/F8476226/Screenshot__81_.png) ![Screenshot (80).png](https://archive.blender.org/developer/F8476228/Screenshot__80_.png) What straight black produces: ![Screenshot (82).png](https://archive.blender.org/developer/F8476227/Screenshot__82_.png) What, uh, less than black produces: ![Screenshot (83).png](https://archive.blender.org/developer/F8476225/Screenshot__83_.png) [Material 000.blend](https://archive.blender.org/developer/F8476233/Material_000.blend)
Author

Added subscriber: @Russ1642

Added subscriber: @Russ1642

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

Changed status from 'Needs Triage' to: 'Archived'
Germano Cavalcante self-assigned this 2020-04-16 16:35:00 +02:00

I can confirm that there are values less than 0 (just use the match node with Less Than mode).
Although it does not seem conventional, this is not a bug and has been working since this node was implemented.

I can confirm that there are values less than 0 (just use the match node with Less Than mode). Although it does not seem conventional, this is not a bug and has been working since this node was implemented.
Author

Fac inputs and outputs are supposed to be limited to the range of 0 to 1. It's not 'unconventional', it breaks the workflow because it's completely unexpected. We're making assumptions about what our math will do based on the number not dropping below 0.

Tell us this please: What range of numbers does that node output? -1 to 1? -10000 to 1? -1 to 20000? We now have no idea. Are other Fac outputs not limited to the range of 0 to 1? What is the range we're supposed to expect. Seeing as Blender is moving towards a "nodes for EVERYTHING" design I'd think this is something that ought to be ironed out now.

Fac inputs and outputs are supposed to be limited to the range of 0 to 1. It's not 'unconventional', it breaks the workflow because it's completely unexpected. We're making assumptions about what our math will do based on the number not dropping below 0. Tell us this please: What range of numbers does that node output? -1 to 1? -10000 to 1? -1 to 20000? We now have no idea. Are other Fac outputs not limited to the range of 0 to 1? What is the range we're supposed to expect. Seeing as Blender is moving towards a "nodes for EVERYTHING" design I'd think this is something that ought to be ironed out now.

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

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

Added subscriber: @brecht

Added subscriber: @brecht

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

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

Ideally these would be in the range 0..1 and we may work on that in the future. But changing this is outside the scope of the bug tracker.
https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

Ideally these would be in the range 0..1 and we may work on that in the future. But changing this is outside the scope of the bug tracker. https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests
Author

We can't do proper math using the output from the Musgrave Texture node. For example, when you multiply two numbers together and the lowest value you're expecting is a zero, a negative number really messes things up. Which would be perfectly fine if the software wasn't LYING to you by telling you that the numbers were strictly in the 0 to 1 range. That's what "Fac" output means. That's its purpose.

We can't do proper math using the output from the Musgrave Texture node. For example, when you multiply two numbers together and the lowest value you're expecting is a zero, a negative number really messes things up. Which would be perfectly fine if the software wasn't LYING to you by telling you that the numbers were strictly in the 0 to 1 range. That's what "Fac" output means. That's its purpose.
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Thank you for the report. You are correct. The range of the Musgrave node when set to fBM is [-1,1]. Kenton Musgrave wrote

The version of the noise function I prefer to use has zero crossings (i.e., its value is zero) at latticepoints, and a range of [-1,1]. Note at the bottom of page 3

The example in the manual shows the use of a map range node to normalize the [-1,1] range to [0,1] if that is the look you are going for.

That being said, I think you are confusing this with another issue. The reason you aren't seeing a "true black" in your 1st and 3rd images is because you are using the principled shader. The surface is reflecting the surrounding light. If you use an emission shader, or if you set the specular slider to 0, you will get results that match picture 2 and 4.

Thank you for the report. You are correct. The range of the Musgrave node when set to fBM is [-1,1]. Kenton Musgrave wrote > The version of the noise function I prefer to use has zero crossings (i.e., its value is zero) at latticepoints, and a range of [-1,1]. [Note at the bottom of page 3](https://www.classes.cs.uchicago.edu/archive/2015/fall/23700-1/final-project/MusgraveTerrain00.pdf) The [example in the manual](https://docs.blender.org/manual/en/latest/render/shader_nodes/textures/musgrave.html#examples) shows the use of a map range node to normalize the [-1,1] range to [0,1] if that is the look you are going for. That being said, I think you are confusing this with another issue. The reason you aren't seeing a "true black" in your 1st and 3rd images is because you are using the principled shader. The surface is reflecting the surrounding light. If you use an emission shader, or if you set the specular slider to 0, you will get results that match picture 2 and 4.
Author

The issue I have isn't the range of the Musgrave Node or the shader. It's really the labelling of the Fac output. We're led to believe that ALL Fac outputs have a range of 0 to 1. Blender is moving towards having more and more nodes. If this assumption isn't correct then it should be addressed. I think it's a bad idea to have a hundred Fac outputs limited to 0-1 and then suddenly this one node is different. I was trying to do some math with the output of the node and was scratching my head trying to figure out what wasn't working. So the bug is that the output from the node is labelled Fac. Call it something else if it doesn't behave like every other Fac. Thank you.

The issue I have isn't the range of the Musgrave Node or the shader. It's really the labelling of the Fac output. We're led to believe that ALL Fac outputs have a range of 0 to 1. Blender is moving towards having more and more nodes. If this assumption isn't correct then it should be addressed. I think it's a bad idea to have a hundred Fac outputs limited to 0-1 and then suddenly this one node is different. I was trying to do some math with the output of the node and was scratching my head trying to figure out what wasn't working. So the bug is that the output from the node is labelled Fac. Call it something else if it doesn't behave like every other Fac. Thank you.
Member

Note: there were no other responses when I started researching and writing my above response. =)

You also have to remember why Kenton Musgrave created these noises in the first place: to create realistic procedural generated synthetic terrain models. The places where the output is less than zero are lakes.

Edit: Better render of my example

Lakes_v2.jpg

Note: there were no other responses when I started researching and writing my above response. =) You also have to remember why Kenton Musgrave created these noises in the first place: to create realistic procedural generated synthetic terrain models. The places where the output is less than zero are lakes. Edit: Better render of my example ![Lakes_v2.jpg](https://archive.blender.org/developer/F8479141/Lakes_v2.jpg)
Author

This has NOTHING to do with the Musgrave Texture node in particular. Either Fac outputs are supposed to be in the 0 to 1 range or they're not. Blender nodes have been designed to have a common interface and that was one of the decisions. So if you want to keep the range -1 to 1 then at least call it something other than a Fac output so it's not so damn confusing. If every Fac output had a different range it'd be a mess. This is about consistency and predictability.

This has NOTHING to do with the Musgrave Texture node in particular. Either Fac outputs are supposed to be in the 0 to 1 range or they're not. Blender nodes have been designed to have a common interface and that was one of the decisions. So if you want to keep the range -1 to 1 then at least call it something other than a Fac output so it's not so damn confusing. If every Fac output had a different range it'd be a mess. This is about consistency and predictability.
Member

Again, I wrote my above comment before seeing your comment. It was an effort to describe why the range is what it is, and not intended to dismiss your point.

In #75774#911502, @Russ1642 wrote:
The issue I have isn't the range of the Musgrave Node or the shader. It's really the labelling of the Fac output. We're led to believe that ALL Fac outputs have a range of 0 to 1. Blender is moving towards having more and more nodes. If this assumption isn't correct then it should be addressed. I think it's a bad idea to have a hundred Fac outputs limited to 0-1 and then suddenly this one node is different. I was trying to do some math with the output of the node and was scratching my head trying to figure out what wasn't working. So the bug is that the output from the node is labelled Fac. Call it something else if it doesn't behave like every other Fac. Thank you.

I can get behind the output being changed from Fac to Value. But as Brecht said, that is outside the scoop of the bug tracker.

Again, I wrote my above comment before seeing your comment. It was an effort to describe why the range is what it is, and not intended to dismiss your point. > In #75774#911502, @Russ1642 wrote: > The issue I have isn't the range of the Musgrave Node or the shader. It's really the labelling of the Fac output. We're led to believe that ALL Fac outputs have a range of 0 to 1. Blender is moving towards having more and more nodes. If this assumption isn't correct then it should be addressed. I think it's a bad idea to have a hundred Fac outputs limited to 0-1 and then suddenly this one node is different. I was trying to do some math with the output of the node and was scratching my head trying to figure out what wasn't working. So the bug is that the output from the node is labelled Fac. Call it something else if it doesn't behave like every other Fac. Thank you. I can get behind the output being changed from `Fac` to `Value`. But as Brecht said, that is outside the scoop of the bug tracker.
Author

Changing the range might be outside the scope of the bug tracker, especially since it'll break existing materials. However, the label is most certainly a bug and is easy to change.

Changing the range might be outside the scope of the bug tracker, especially since it'll break existing materials. However, the label is most certainly a bug and is easy to change.

This issue was referenced by c87dd76937

This issue was referenced by c87dd76937f026c4a154dc4073063959f3e5a87e

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'
Author

Thank you. :)

Thank you. :)
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
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#75774
No description provided.