Pointiness mask disappears/leaves artifacts on baked textures. #97641

Closed
opened 2022-04-27 03:03:52 +02:00 by William Sebastian Rudi · 9 comments

System Information
Operating system: Windows 10 Home, version 21H1, build 19043.1645
Graphics card: NVIDIA 3090 ASUS TUF GAMING

Blender Version
Broken: 3.1.2
Worked: Unknown.

Short description of error
Pointiness mask disappears/leaves artifacts on baked textures.

Exact steps for others to reproduce the error
Tried in both my main project file, and a brand new one to reproduce the error(provided).

Using the pointiness to mask out pointy objects, corners and such is brilliant! Works perfect when using procedural textures directly while rendering.

Now I need to bake my textures. And I'm noticing in every single bake I make, be it roughness, diffuse/color, or normal, my mask for pointiness doesn't show up. Or rather it does show up, leaving small tiny speckled artifacts. This occurs no matter my subdiv, and even if i apply the subdiv.

Regardless of how "close" to the shader the pointiness node is, it still occurs. I could have it directly connected, and it would happen, I could have it 100 nodes deep into spaghetti nodes and it still disappears or creates issues upon baking.

I've included a blend file with one of the parts of my project. I've hooked up a basic setup for pointiness, and a texture ready to bake. Just click on the texture, the object, and render as roughness.
Now you'll see the black artifacts, which I think is "leftovers" from my mask.

Hopefully this is not intended, and can be fixed. Or I'm being a dumb dumb, that would be even better! If not are there any other ways of achieving the same effect?

Also, I have tried on other objects. very simple square objects seems to work somewhat. But as soon as it gets a bit more complicated it start happening. Even on simple objects very strange artifacts quickly appear.

Any help is appreciated. Thank you!

Here are some pictures and the blend file :

BLEND FILE
THE MASK
RENDER WITH MASK
BAKED ROUGHNESS TEXTURE RESULT W/ ARTIFACTS
ZOOMED
ZOOMED RENDERED

**System Information** Operating system: Windows 10 Home, version 21H1, build 19043.1645 Graphics card: NVIDIA 3090 ASUS TUF GAMING **Blender Version** Broken: 3.1.2 Worked: Unknown. **Short description of error** Pointiness mask disappears/leaves artifacts on baked textures. **Exact steps for others to reproduce the error** Tried in both my main project file, and a brand new one to reproduce the error(provided). Using the pointiness to mask out pointy objects, corners and such is brilliant! Works perfect when using procedural textures directly while rendering. Now I need to bake my textures. And I'm noticing in every single bake I make, be it roughness, diffuse/color, or normal, my mask for pointiness doesn't show up. Or rather it does show up, leaving small tiny speckled artifacts. This occurs no matter my subdiv, and even if i apply the subdiv. Regardless of how "close" to the shader the pointiness node is, it still occurs. I could have it directly connected, and it would happen, I could have it 100 nodes deep into spaghetti nodes and it still disappears or creates issues upon baking. I've included a blend file with one of the parts of my project. I've hooked up a basic setup for pointiness, and a texture ready to bake. Just click on the texture, the object, and render as roughness. Now you'll see the black artifacts, which I think is "leftovers" from my mask. Hopefully this is not intended, and can be fixed. Or I'm being a dumb dumb, that would be even better! If not are there any other ways of achieving the same effect? Also, I have tried on other objects. very simple square objects seems to work somewhat. But as soon as it gets a bit more complicated it start happening. Even on simple objects very strange artifacts quickly appear. Any help is appreciated. Thank you! Here are some pictures and the blend file : [BLEND FILE ](https://filebin.net/fflfpnhzgbxt7kca) [THE MASK ](https://i.stack.imgur.com/RKwjI.png) [RENDER WITH MASK ](https://i.stack.imgur.com/PvORo.png) [BAKED ROUGHNESS TEXTURE RESULT W/ ARTIFACTS](https://i.stack.imgur.com/X8bcX.png) [ZOOMED ](https://i.stack.imgur.com/P4xPb.png) [ZOOMED RENDERED ](https://i.stack.imgur.com/9Olfd.png)

Added subscriber: @Willywonkahc

Added subscriber: @Willywonkahc
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Thanks for the report. I'm able to see artifacts in viewport render and also with baked textures.
This issue is actually same as said in #81089 (Pointiness - wrong results with dense mesh and small scale). So I'll merge this report.
Don't hesitate to comment if there is any misunderstanding. I'll reopen the report in that case

Thanks for the report. I'm able to see artifacts in viewport render and also with baked textures. This issue is actually same as said in #81089 (Pointiness - wrong results with dense mesh and small scale). So I'll merge this report. Don't hesitate to comment if there is any misunderstanding. I'll reopen the report in that case
Member

Closed as duplicate of #81089

Closed as duplicate of #81089

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk

In #97641#1347264, @PratikPB2123 wrote:
Thanks for the report. I'm able to see artifacts in viewport render and also with baked textures.
This issue is actually same as said in #81089 (Pointiness - wrong results with dense mesh and small scale). So I'll merge this report.
Don't hesitate to comment if there is any misunderstanding. I'll reopen the report in that case

I can see that I had set my subdivisions to 2 in viewport, where the mask actually looks good. Once they go over 2 the distortion happens, everywhere.

I was able to get my baking done by reducing the subdivision to 2, where the object still looks square and awful, but then with my baked textures done I can crank up the subdivisions again, no problem.

With that said, I have a few thoughts.

  1. Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same.

  2. One of the devs noted

In #81089#1021673, @lichtwerk wrote:
I can confirm the behavior.

There is code that detects "doubles" and does special things with these, I assume we are running into that code-branch.
But without digging deeper, I would assume this could be prevented somehow? Not sure why it spits out white in that case.

Will confirm for now.

This I'm not sure how is detected, is it relative distance between vertices? Either way it seems to be causing trouble. Also it seems like this dev has noted an "error" that hasn't been looked at deeper.

  1. Shouldn't the pointiness node be more robust? It is the only feature as far as I know to create this type of mask with procedural textures. Why does it break down at the sight of detail? Sure I can fix it now by doing it low poly. But what if my model was modeled with this level of detail even without the subdivisions? I would have enjoyed having it work with procedural textures, and in the future the need might arise again where I can't just bake my textures.
    Its a strong and useful feature, that I personally would think it important that it is investigated, and perhaps fixed or improved.
    Unless improved I'd call this feature, pardon the pun, half-baked.

Thanks for your time and effort.

> In #97641#1347264, @PratikPB2123 wrote: > Thanks for the report. I'm able to see artifacts in viewport render and also with baked textures. > This issue is actually same as said in #81089 (Pointiness - wrong results with dense mesh and small scale). So I'll merge this report. > Don't hesitate to comment if there is any misunderstanding. I'll reopen the report in that case I can see that I had set my subdivisions to 2 in viewport, where the mask actually looks good. Once they go over 2 the distortion happens, everywhere. I was able to get my baking done by reducing the subdivision to 2, where the object still looks square and awful, but then with my baked textures done I can crank up the subdivisions again, no problem. With that said, I have a few thoughts. 1. Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same. 2. One of the devs noted > In #81089#1021673, @lichtwerk wrote: > I can confirm the behavior. > > There is code that detects "doubles" and does special things with these, I assume we are running into that code-branch. > But without digging deeper, I would assume this could be prevented somehow? Not sure why it spits out white in that case. > > Will confirm for now. This I'm not sure how is detected, is it relative distance between vertices? Either way it seems to be causing trouble. Also it seems like this dev has noted an "error" that hasn't been looked at deeper. 3. Shouldn't the pointiness node be more robust? It is the only feature as far as I know to create this type of mask with procedural textures. Why does it break down at the sight of detail? Sure I can fix it now by doing it low poly. But what if my model was modeled with this level of detail even without the subdivisions? I would have enjoyed having it work with procedural textures, and in the future the need might arise again where I can't just bake my textures. Its a strong and useful feature, that I personally would think it important that it is investigated, and perhaps fixed or improved. Unless improved I'd call this feature, pardon the pun, half-baked. Thanks for your time and effort.

Added subscriber: @MarcinTwarowski

Added subscriber: @MarcinTwarowski

In #97641#1347400, @Willywonkahc wrote:
Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same.

If I scale it up by a factor of 2 the speckles are gone. You have to adjust the color ramp.
obraz.png
pointinessbug.blend

> In #97641#1347400, @Willywonkahc wrote: >Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same. If I scale it up by a factor of 2 the speckles are gone. You have to adjust the color ramp. ![obraz.png](https://archive.blender.org/developer/F13031861/obraz.png) [pointinessbug.blend](https://archive.blender.org/developer/F13031878/pointinessbug.blend)

In #97641#1347509, @MarcinTwarowski wrote:

In #97641#1347400, @Willywonkahc wrote:
Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same.

If I scale it up by a factor of 2 the speckles are gone. You have to adjust the color ramp.
obraz.png
pointinessbug.blend

At 4 levels and scaling by 2 and applying I still see artifacts at the top, no matter how much I slide the color ramps.
And so do you, at the top, just like me.

At 3 levels its fine after some adjustments.
I see now that with some tweaking I can possibly get it to work proceduraly. But the artifacts that are happening still shouldn't happen, right? There seems to be an issue that could be improved upon here.
Thank you for your help, I'll move along now with my life.

I still hope this gets improved.

> In #97641#1347509, @MarcinTwarowski wrote: >> In #97641#1347400, @Willywonkahc wrote: >>Scaling like was said in the other posts, seems to have zero effect on the result for me. Scale it up, apply it, don't apply it, it doesn't matter. Result is the same. > If I scale it up by a factor of 2 the speckles are gone. You have to adjust the color ramp. > ![obraz.png](https://archive.blender.org/developer/F13031861/obraz.png) > [pointinessbug.blend](https://archive.blender.org/developer/F13031878/pointinessbug.blend) At 4 levels and scaling by 2 and applying I still see artifacts at the top, no matter how much I slide the color ramps. And so do you, at the top, just like me. At 3 levels its fine after some adjustments. I see now that with some tweaking I can possibly get it to work proceduraly. But the artifacts that are happening still shouldn't happen, right? There seems to be an issue that could be improved upon here. Thank you for your help, I'll move along now with my life. I still hope this gets improved.
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
3 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#97641
No description provided.