Glossy direct render pass deliver texture information. #53984

Closed
opened 2018-02-02 15:08:18 +01:00 by Kamil Adamski · 10 comments

System Information
Windows 10 Pro, GTX 970

Blender Version
Broken: Official 2.79
Worked: none

Short description of error

When an object is textured, and render passes are used to do final composite from render passes, glossy direct render pass deliver texture information from diffuse.
There are no other textures, only albedo. also environment isn't present. Solid color.

In this case, We are unable to use Blender UV pass, to change texture in compositor (for example product renderings, where We need studio lighting, and the object is floating in space). This is a huge problem.

Exact steps for others to reproduce the error
I'm attaching simple blend file. Just hit render, go to composite nodes and take a look at glossy direct pass, but look closely (if needed brighten this pass to see it better).
GlossyTest.blend

**System Information** Windows 10 Pro, GTX 970 **Blender Version** Broken: Official 2.79 Worked: none **Short description of error** When an object is textured, and render passes are used to do final composite from render passes, glossy direct render pass deliver texture information from diffuse. There are no other textures, only albedo. also environment isn't present. Solid color. In this case, We are unable to use Blender UV pass, to change texture in compositor (for example product renderings, where We need studio lighting, and the object is floating in space). This is a huge problem. **Exact steps for others to reproduce the error** I'm attaching simple blend file. Just hit render, go to composite nodes and take a look at glossy direct pass, but look closely (if needed brighten this pass to see it better). [GlossyTest.blend](https://archive.blender.org/developer/F2092290/GlossyTest.blend)
Author

Added subscriber: @adrian2608

Added subscriber: @adrian2608

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2018-02-03 10:08:36 +01:00

I'm afraid there's no good way to fix this. In the Principled / Disney shader design, the base color affects Fresnel, which causes this variation in the Glossy Direct pass. If we move the Fresnel influence to the Glossy Color pass, that doesn't help either to replace the texture. If we leave it out, the original render can't be recovered.

In general once you do more advanced shading and global illumination, some of the assumptions you need to make to do texture replacement in compositing break down. I don't think we'd want to change the Principled Shader to be a bit less realistic to try to compensate for this.

Why are you rendering with a base color texture instead of an even color though? Or do you just want to replace the specular texture, and in that case, maybe this Fresnel factor is not actually a bad thing?

I'm afraid there's no good way to fix this. In the Principled / Disney shader design, the base color affects Fresnel, which causes this variation in the Glossy Direct pass. If we move the Fresnel influence to the Glossy Color pass, that doesn't help either to replace the texture. If we leave it out, the original render can't be recovered. In general once you do more advanced shading and global illumination, some of the assumptions you need to make to do texture replacement in compositing break down. I don't think we'd want to change the Principled Shader to be a bit less realistic to try to compensate for this. Why are you rendering with a base color texture instead of an even color though? Or do you just want to replace the specular texture, and in that case, maybe this Fresnel factor is not actually a bad thing?
Author

Hi Brecht,

I'm doing product renderings, where sometimes are 10 different textures, but fitting the same model, and the same UV space. So then if I want to save time (and to be honest, this is a lot time saved), I do it in compositor as I describe in the topic. To replace Direct Color pass in compositor with UV pass. Specular texture isn't present here at all. Just a little overall reflection.

Also this isn't "Principled" shader issue, it works like this with any other shader with glossiness (CynicatPro shader, or just glossy diffuse mix).

Another thing is, that on other project, direct pass isn't delivering anything from albedo texture. The same technique, to replace label from a Peanut Butter product.
Attaching renders. Principled shader.
Beauty.jpg

Glossy direct.jpg

Hi Brecht, I'm doing product renderings, where sometimes are 10 different textures, but fitting the same model, and the same UV space. So then if I want to save time (and to be honest, this is a lot time saved), I do it in compositor as I describe in the topic. To replace Direct Color pass in compositor with UV pass. Specular texture isn't present here at all. Just a little overall reflection. Also this isn't "Principled" shader issue, it works like this with any other shader with glossiness (CynicatPro shader, or just glossy diffuse mix). Another thing is, that on other project, direct pass isn't delivering anything from albedo texture. The same technique, to replace label from a Peanut Butter product. Attaching renders. Principled shader. ![Beauty.jpg](https://archive.blender.org/developer/F2130174/Beauty.jpg) ![Glossy direct.jpg](https://archive.blender.org/developer/F2130178/Glossy_direct.jpg)
Author

Hi again,

I see this task is closed, but there is something wrong. Why in one case this is good, and in another not? With the same shader, without any other textures except albedo?
On the jar We can clearly see that everything is good. So maybe this is a bug?

Please explain it better if You can Brecht, because I don't understand.

Regards,
Kamil.

Hi again, I see this task is closed, but there is something wrong. Why in one case this is good, and in another not? With the same shader, without any other textures except albedo? On the jar We can clearly see that everything is good. So maybe this is a bug? Please explain it better if You can Brecht, because I don't understand. Regards, Kamil.

How much the albedo influence the glossy passes depends on the Principled BSDF settings and light setup. I just verified that in the attached .blend it was due to the way the Principled BSDF handles Fresnel, and that this does not appear to be a bug. Why it does or does not happen in other specific files I can't guess, but in general the fact that it changes by file is not indicative of a bug. This file for example uses specular tint and clearcoat, others might not.

From what I understand though, for your case it should be possible to render with a fixed base color to avoid any variation in the glossy passes?

How much the albedo influence the glossy passes depends on the Principled BSDF settings and light setup. I just verified that in the attached .blend it was due to the way the Principled BSDF handles Fresnel, and that this does not appear to be a bug. Why it does or does not happen in other specific files I can't guess, but in general the fact that it changes by file is not indicative of a bug. This file for example uses specular tint and clearcoat, others might not. From what I understand though, for your case it should be possible to render with a fixed base color to avoid any variation in the glossy passes?
Author

Apologize, it occurs also on the jar. Very subtle but it's there.

So basically there is no way to somehow get around it?

Apologize, it occurs also on the jar. Very subtle but it's there. So basically there is no way to somehow get around it?

I guess the only workaround is to not use the Principled BSDF, or render with a fixed base color as I suggested.

I guess the only workaround is to not use the Principled BSDF, or render with a fixed base color as I suggested.
Author

This isn't in Principled, this is always when glossy shader is used. I've tested it with only glossy with diffuse, and it's the same.
I also tested it with CynicatPro shaders and the same. Fixed base color should work well in this scenario. Thank You for pointing this out.

Best Regards,
Kamil.

This isn't in Principled, this is always when glossy shader is used. I've tested it with only glossy with diffuse, and it's the same. I also tested it with CynicatPro shaders and the same. Fixed base color should work well in this scenario. Thank You for pointing this out. Best Regards, Kamil.
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
2 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#53984
No description provided.