Cycles: Different result when a procedural noise map used as displacement versus a material blend map. #61171

Closed
opened 2019-02-04 07:14:15 +01:00 by Paul · 8 comments

System Information
Operating system:
Windows 10 1809
Graphics card:
GTX 980 Ti

Blender Version
Broken:
2.80, 4ef09cf937, blender2.8, 2019-02-02

Short description of error

I'm trying to use a Cycles procedural noise to drive both the displacement and blending between two shaders on an object, with the goal of the displaced areas having one shader, and the undisplaced areas another shader. However,the displacement does not match up 1:1 with the mixed shaders, despite using the same noise to drive both.

displacmentError.png

You can see the shader blend is close to matching the displacement, but is off in several places.

Example file and render uses a standard subdivision modifier on the sphere, the same mismatch error is present when using adaptive displacement as well.

Edit:

I figured out what is happening. Despite being driven from the same noise, the noise seems to be generated/sampled twice - Once on the undisplaced mesh to generate the displacement, then again once the geometry is displaced. Because the displaced geometry now occupies a different location than the undisplaced geometry, the noise generates differently.

Increasing the amount of the displacement increases the amount of mismatch-

displacmentError2.png

So now I wonder if this is expected behavior, or if it would be desired to "freeze" the generated noise before displacement and use that result through the whole shader chain?

Exact steps for others to reproduce the error
Open the attached .blend file, and render.
displacmentBug.blend

**System Information** Operating system: Windows 10 1809 Graphics card: GTX 980 Ti **Blender Version** Broken: 2.80, 4ef09cf937f2, blender2.8, 2019-02-02 **Short description of error** I'm trying to use a Cycles procedural noise to drive both the displacement and blending between two shaders on an object, with the goal of the displaced areas having one shader, and the undisplaced areas another shader. However,the displacement does not match up 1:1 with the mixed shaders, despite using the same noise to drive both. ![displacmentError.png](https://archive.blender.org/developer/F6502895/displacmentError.png) You can see the shader blend is close to matching the displacement, but is off in several places. Example file and render uses a standard subdivision modifier on the sphere, the same mismatch error is present when using adaptive displacement as well. Edit: I figured out what is happening. Despite being driven from the same noise, the noise seems to be generated/sampled twice - Once on the undisplaced mesh to generate the displacement, then again once the geometry is displaced. Because the displaced geometry now occupies a different location than the undisplaced geometry, the noise generates differently. Increasing the amount of the displacement increases the amount of mismatch- ![displacmentError2.png](https://archive.blender.org/developer/F6503093/displacmentError2.png) So now I wonder if this is expected behavior, or if it would be desired to "freeze" the generated noise before displacement and use that result through the whole shader chain? **Exact steps for others to reproduce the error** Open the attached .blend file, and render. [displacmentBug.blend](https://archive.blender.org/developer/F6502924/displacmentBug.blend)
Author

Added subscriber: @rocketwrench

Added subscriber: @rocketwrench
Member

Added subscribers: @brecht, @JacquesLucke

Added subscribers: @brecht, @JacquesLucke
Member

I'm not sure if this should be considered a bug or more a feature request.
Sometimes you might want to evaluate the noise twice.

In any case, could you please create an as-simple-as-possible .blend file to reproduce the issue?

@brecht, is this a bug or feature request?

I'm not sure if this should be considered a bug or more a feature request. Sometimes you might want to evaluate the noise twice. In any case, could you please create an as-simple-as-possible .blend file to reproduce the issue? @brecht, is this a bug or feature request?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2019-02-04 12:17:25 +01:00

Not a bug, generated or uv texture coordinates should be used instead.

Not a bug, generated or uv texture coordinates should be used instead.

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

Yeah, this is due to the textures being 3D and the coordinates used. This doesn't happen with UV coordinates which are 2D or with Generated coordinates which stick to the surface, it's only when using Position or Object coordinates and the likes, the newly elevated surfaces intersect with the texture at a different point in space. I reccomend you using UV or Generated in the meantime.

Yeah, this is due to the textures being 3D and the coordinates used. This doesn't happen with UV coordinates which are 2D or with Generated coordinates which stick to the surface, it's only when using Position or Object coordinates and the likes, the newly elevated surfaces intersect with the texture at a different point in space. I reccomend you using UV or Generated in the meantime.

Note that the current behavior is also useful in other cases, so I don't intend to make changes here. Generated and UV are specifically intended to stick to the surface, while Object and World are not.

Note that the current behavior is also useful in other cases, so I don't intend to make changes here. Generated and UV are specifically intended to stick to the surface, while Object and World are not.
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
4 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#61171
No description provided.