Cycles normal map baking issue with subdivided UVs - Margin #45606

Closed
opened 2015-07-29 16:19:29 +02:00 by Pierrick PICAUT · 16 comments

Hi,

This is the very first time I report something here so I really hope it is the good place.

I make a lot of character developement and now work nearly exclusively with cycles.
Since map baking is available with Cycles, normal maps look way better with this engine, more contrasted and accurate but...

whenever you try to bake a normal map from a multiresolution mesh with subdivide UVs option checked in the multires modifier.
Assuming you'll use margin to cover the UVs islands corners, Cycles is not able to interpolate these pixel correctly and create darken or transparent area on the bleeding pixels.

This generate seems when you then use these normal maps on your object.

If subdive UVs is desactivated, the margin works just fine.

Please let me know if you have any needs of exemples for this and if this is an already reported problem.

In anycase, thanks for your interest.

Hi, This is the very first time I report something here so I really hope it is the good place. I make a lot of character developement and now work nearly exclusively with cycles. Since map baking is available with Cycles, normal maps look way better with this engine, more contrasted and accurate but... whenever you try to bake a normal map from a multiresolution mesh with subdivide UVs option checked in the multires modifier. Assuming you'll use margin to cover the UVs islands corners, Cycles is not able to interpolate these pixel correctly and create darken or transparent area on the bleeding pixels. This generate seems when you then use these normal maps on your object. If subdive UVs is desactivated, the margin works just fine. Please let me know if you have any needs of exemples for this and if this is an already reported problem. In anycase, thanks for your interest.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @P2design

Added subscriber: @P2design
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Hey @P2design, yeah, a sample .blend file is always useful for us to recreate the issue. Would be good if you can give us one :)

Hey @P2design, yeah, a sample .blend file is always useful for us to recreate the issue. Would be good if you can give us one :)
Author
Member

NORMAL-BAKER.zip

NORMAL BAKER.jpg

Hi Julian,

So you'll find attached a simple blend file to test the normal baking with cycles.
Enable or disable subdivide UVs in the multires modifier and select the corresponding texture in the material nodes then click bake
(FYI, baking is on GPU, please double check rendering setup. CPU baking lead to the same result).

I've also attached a screenshot pointing the artifacts.
With subdivide UVS enabled, margin generate dark areas among the bleeding aread with variating alphas. This means you can't really use these baked texture for your model as normal map will show large seems problem.

I hope it will be clear enough to help.

Thanks for your interest
Pierrick

[NORMAL-BAKER.zip](https://archive.blender.org/developer/F216276/NORMAL-BAKER.zip) ![NORMAL BAKER.jpg](https://archive.blender.org/developer/F216277/NORMAL_BAKER.jpg) Hi Julian, So you'll find attached a simple blend file to test the normal baking with cycles. Enable or disable *subdivide UVs* in the multires modifier and select the corresponding texture in the material nodes then click bake (FYI, baking is on GPU, please double check rendering setup. CPU baking lead to the same result). I've also attached a screenshot pointing the artifacts. With **subdivide UVS enabled, margin generate dark areas among the bleeding aread with variating alphas**. This means you can't really use these baked texture for your model as normal map will show large seems problem. I hope it will be clear enough to help. Thanks for your interest Pierrick
Dalai Felinto was assigned by Julian Eisel 2015-08-03 22:13:03 +02:00
Member

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Member

@dfelinto, would you mind to take over now? :)

@dfelinto, would you mind to take over now? :)
Author
Member

Hi Guies,

Did you have any time to have alook and identify the problem?

I don't know if you've ever tested substance painter but the way it generated bleeding is pretty amazing.
Extrapoling the pixels perpendiculary to the seem border till it cross another pixel.
Making totaly filled normals.

Hope you'll find your way around.
thanks for your care an dyour work.

Hi Guies, Did you have any time to have alook and identify the problem? I don't know if you've ever tested substance painter but the way it generated bleeding is pretty amazing. Extrapoling the pixels perpendiculary to the seem border till it cross another pixel. Making totaly filled normals. Hope you'll find your way around. thanks for your care an dyour work.

This issue was referenced by 3143ec29d0

This issue was referenced by 3143ec29d0577948f2f7750c47a6a84ab33f39d7

Added subscriber: @brecht

Added subscriber: @brecht
Dalai Felinto was unassigned by Brecht Van Lommel 2016-02-14 03:55:48 +01:00
Brecht Van Lommel self-assigned this 2016-02-14 03:55:48 +01:00

For this case the solution seems to be to just bake with smooth subdivided UVs disabled, since a normal map is intended to be applied to the low res mesh and as such should be baked to the linear subdivided UVs. We can do that automatically.

The background should also be filled in neutral purple but it's not working due to a bug in the code, will fix that too.

For this case the solution seems to be to just bake with smooth subdivided UVs disabled, since a normal map is intended to be applied to the low res mesh and as such should be baked to the linear subdivided UVs. We can do that automatically. The background should also be filled in neutral purple but it's not working due to a bug in the code, will fix that too.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

Hi,

I may not have open this if it was that simple. Baking normal is not exclusively for lowpoly object. If you make hd character for animation you may not keep a 5 level multires modifier and convert it to displacement and normal map with a lower subdiv level.

If you don't subdivide UVs during baking you'll get distorsions on your map when applied to your subdivided model.

But there is a solution. You have to use a cage to bake your normals and it fixes the problem. It turns to be relevent for both hard and organic surfaces.

Hi, I may not have open this if it was that simple. Baking normal is not exclusively for lowpoly object. If you make hd character for animation you may not keep a 5 level multires modifier and convert it to displacement and normal map with a lower subdiv level. If you don't subdivide UVs during baking you'll get distorsions on your map when applied to your subdivided model. But there is a solution. You have to use a cage to bake your normals and it fixes the problem. It turns to be relevent for both hard and organic surfaces.

If you are baking a displacement map to apply to a subdivided model, then indeed it's not so simple. But tangent space normal maps are different in my opinion, they are tied to a particular mesh resolution with particular tangents. You bake it for either a low res or a high res mesh, a single normal map will not work without artifacts for both.

We don't currently support baking multires as a displacement map with Cycles baking, and probably need some other options as well. For that you have to switch to Blender Internal still. If we work on that then there will be some changes needed, but for the limited thing that this feature currently does, I think linear subdivided UVs are correct.

If you are baking a displacement map to apply to a subdivided model, then indeed it's not so simple. But tangent space normal maps are different in my opinion, they are tied to a particular mesh resolution with particular tangents. You bake it for either a low res or a high res mesh, a single normal map will not work without artifacts for both. We don't currently support baking multires as a displacement map with Cycles baking, and probably need some other options as well. For that you have to switch to Blender Internal still. If we work on that then there will be some changes needed, but for the limited thing that this feature currently does, I think linear subdivided UVs are correct.
Author
Member

Hi Brecht,

I know that :) , I've been trying to find solution for a loong while.
Even for displacement, It's better to subdivide UVs to get a smoother result once applied.
It's a pretty subtle difference and blender internal deal with it pretty nicely. also with the normals map, but they are less contrasted than in cycles.

That's why I'm always trying to bake normals in cycles instead of internal.

It's difficult to get a perfect result from a simple baking, I can not agree more with you. I just wanted to point that without a cage, cycles normal baking turn to be buggy :)

Thanks for your consideration and thanks for all the work you and the team put into developping this software !

Hi Brecht, I know that :) , I've been trying to find solution for a loong while. Even for displacement, It's better to subdivide UVs to get a smoother result once applied. It's a pretty subtle difference and blender internal deal with it pretty nicely. also with the normals map, but they are less contrasted than in cycles. That's why I'm always trying to bake normals in cycles instead of internal. It's difficult to get a perfect result from a simple baking, I can not agree more with you. I just wanted to point that without a cage, cycles normal baking turn to be buggy :) Thanks for your consideration and thanks for all the work you and the team put into developping this software !
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
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#45606
No description provided.