SSS direct/indirect turns out black in texture bake #40060
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40060
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?
System Information
openSUSE 12.3 64bits
NVIDIA 480GTX SC
Blender Version
Broken:
f300c15
Short description of error
Baking SSS Color works fine but Direct, Indirect or Combined results in black color
Exact steps for others to reproduce the error
SSSBake.blend
Changed status to: 'Open'
Added subscriber: @zanqdo
The patch above - D503 - seems to work for your file. At least for SSS Color and SSS Direct:
Top Left: rendered passes (SSS Direct), bottom left: baked SSS Direct; Right: baked SSS shown in the UI
I tried the patch with a more complex object (caterpillar from Gooseberry) and I got a good result for color, but a very strange result for SSS direct (image layout same as above):
Catterpilar SSS Color:
Catterpilar SSS Direct:
Added subscriber: @brecht
I think the problem in that file is with the bump mapping, which fails due to missing ray differentials (
sd.dP
).A quick way to solve that would be to add this after
shader_setup_from_sample
:That's not quite right, really this should take the UV map used for baking and the image resolution into account, for that you could look at
bake_set_vlr_dxyco
in Blender Internal if you want, to see how you can get those differentials from a UV map. Getting that right would mainly help for OSL image texture lookups and advanced procedural textures that do antialiasing.Hi Brecht, with the latest changes to D503 the baking seems correct (SSS Direct):
So I'm not sure what did you mean by the bump maps (this file has no node connected to the Displace Input). There is a different issue where materials with a node connected to the Displacement input would fail to bake. I'll see if your suggestion fix that, and if so I will report it separately (or ask someone to do it, with real files ;) and post a patch ... Anyways, I shouldn't drag the other issue in here ;)
This file is using a bump node to set the normal for SSS, and it seems to cause issues with SSS indirect.
But yes, this should fix the displacement input as well since that uses the same mechanism and ray differentials as the bump node.
This issue was referenced by blender/blender-addons-contrib@83cdd5887f
This issue was referenced by
83cdd5887f
Changed status from 'Open' to: 'Resolved'
Closed by commit
83cdd5887f
.Ah ok, I haven't tried SSS indirect. I tried your suggestion (sd.dP.dx, sd.dP.dy) and it works for displacement in the sense that it doesn't produce black. However it seems to simply bypass the displacement. I reported it here #40068 so we can discuss it there.