Cycles-Bake shows black when Displament input is used #40068
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40068
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Trying to bake this file shows black:
displacement_height.blend
This also affects bump nodes (see #40060)
I tried @brecht's suggestion below, but it shows white, as if there was no displacement at all (instead of showing the checkers pattern expected from the file).
Now questions for @brecht:
Changed status to: 'Open'
Added subscriber: @dfelinto
Yes, that's what the du_dx, du_dy, dv_dx, dv_dy were for. Calculating them in Blender would be best I think since otherwise Cycles has to have some knowledge about what you're baking to (uv mapped image, vertex colors, ptex, ..), and that's currently nicely separated, so best keep it that way.
The formula to compute dP.dx and dP.dy is:
To compute dudx you take the difference between u at the pixel to the right of the current pixel and the current pixel, and similarly for the others values.
Added subscriber: @brecht
@brecht Cycles part is done - D510, I'm tackling Bake API part of it now. Feel free to review them separately.
In this example file you're using the (experimental, not supported yet) displacement and subdivision feature. Displacement does not actually need ray differentials to work, only bump mapping needs it. The problem here is with the subdivision which alters the mesh topology and so the mapping to the original mesh is lost. If this used a subdivision surface modifier instead it would work.
The subdivision code at the moment doesn't even support things like preserving UV maps on meshes, it's unfinished, so I would not consider that a bug, there's a reason it's hidden behind that experimental option.
A simpler test file: displacement.blend
Look at the result with latest D510:
It seems scaled up 2x. Now if I connect the checkers texture in the diffuse node too:
This issue was referenced by blender/blender-addons-contrib@31cb7e395e
This issue was referenced by
31cb7e395e
This issue was referenced by blender/blender-addons-contrib@672cebf19a
This issue was referenced by
672cebf19a
Changed status from 'Open' to: 'Resolved'
Closed by commit
31cb7e395e
.