Random Per Island working incorrectly with sharp edges and volumes #72284

Open
opened 2019-12-09 00:09:21 +01:00 by mantissa · 25 comments

System Information
Operating system: Linux-5.0.0-36-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: TITAN X (Pascal)/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.50

Blender Version
Broken: version: 2.82 (sub 4), branch: master, commit date: 2019-12-07 19:38, hash: 416e66c7fe
Worked: (optional)

Short description of error
Random Per Island not working correctly with sharp edges or volumes.

Exact steps for others to reproduce the error

Sharp Edges:

  • Create Cube
  • Add Bevel Modifier with Harden Normals
  • Set Smooth Shading
  • Set Auto Smooth
  • Random Per Island is affected incorrectly by sharp edges, even after applying Bevel modifier

Volumes:

  • Create cube (or array of objects)
  • Create volume shader
  • Assign Random Per Island to volume shader
  • No random colors

random_per_island.blend

**System Information** Operating system: Linux-5.0.0-36-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: TITAN X (Pascal)/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.50 **Blender Version** Broken: version: 2.82 (sub 4), branch: master, commit date: 2019-12-07 19:38, hash: `416e66c7fe` Worked: (optional) **Short description of error** Random Per Island not working correctly with sharp edges or volumes. **Exact steps for others to reproduce the error** Sharp Edges: - Create Cube - Add Bevel Modifier with Harden Normals - Set Smooth Shading - Set Auto Smooth - Random Per Island is affected incorrectly by sharp edges, even after applying Bevel modifier Volumes: - Create cube (or array of objects) - Create volume shader - Assign Random Per Island to volume shader - No random colors [random_per_island.blend](https://archive.blender.org/developer/F8200178/random_per_island.blend)
Author

Added subscriber: @Mantissa

Added subscriber: @Mantissa

#102001 was marked as duplicate of this issue

#102001 was marked as duplicate of this issue

#102710 was marked as duplicate of this issue

#102710 was marked as duplicate of this issue

#95619 was marked as duplicate of this issue

#95619 was marked as duplicate of this issue

#85265 was marked as duplicate of this issue

#85265 was marked as duplicate of this issue

Added subscriber: @BennyG

Added subscriber: @BennyG

I have the same problem with blender v2.82.6

Sharp Edges:

Create Cube
Add Bevel Modifier with Harden Normals
Set Smooth Shading
Set Auto Smooth On Angle to 30
Random Per Island is affected incorrectly by sharp edges, even after applying Bevel modifier or weld modifier

I have the same problem with blender v2.82.6 Sharp Edges: Create Cube Add Bevel Modifier with Harden Normals Set Smooth Shading Set Auto Smooth On Angle to 30 Random Per Island is affected incorrectly by sharp edges, even after applying Bevel modifier or weld modifier
Member

Added subscribers: @OmarEmaraDev, @Sergey, @JacquesLucke

Added subscribers: @OmarEmaraDev, @Sergey, @JacquesLucke
Member

Hm, not sure if there is a good fix for that. It seems that Blender splits edges apart when the Auto Smooth option is used.

@OmarEmaraDev @Sergey Is there a way to access the connectivity data in cycles before the splitting happens?

Hm, not sure if there is a good fix for that. It seems that Blender splits edges apart when the Auto Smooth option is used. @OmarEmaraDev @Sergey Is there a way to access the connectivity data in cycles before the splitting happens?
Member

I am not sure, I haven't seen anything in the code that indicates that.

I am not sure, I haven't seen anything in the code that indicates that.

This is more of a limitation of attributes and auto-smooth in Cycles. This affects pointiness and random-per-island, but also motion blur to some extent.

Ideally, attributes for those featured would be calculated prior to auto-smooth is applied and then copied over to a newly created vertices.
There isn't really simple solution, so will consider this a known limitaiton of the system which will be eventually resolved. See the developer note below.

More in-dept developer note.

This is actually how Cycles was initially dealing with attributes: it was creating them for vertices/faces and only after this it was splitting sharp edges. Tricky thing is, the way how Cycles splits edges need to match the way how Blender does it and with an addition of custom normals this became more and more problematic. Eventually, the sharp edge split was left to a Blender side, so then all areas are doing it exactly the same (modifier stack, viewport, Cycles render).

From possible ways to solve the issue I see:

  • Move pointiness and random-per-island attributes to Blender side, calculated prior to sharp edge split. This will additionally make it possible to use those attributes in Eevee, yay!
  • Add a version of sharp edge split utility which will only tag edges which are to be split. This will allow Cycles to use same splitting rules as the rest of Blender, but will allow Cycles to keep track of its attributes.
This is more of a limitation of attributes and auto-smooth in Cycles. This affects pointiness and random-per-island, but also motion blur to some extent. Ideally, attributes for those featured would be calculated prior to auto-smooth is applied and then copied over to a newly created vertices. There isn't really simple solution, so will consider this a known limitaiton of the system which will be eventually resolved. See the developer note below. More in-dept developer note. This is actually how Cycles was initially dealing with attributes: it was creating them for vertices/faces and only after this it was splitting sharp edges. Tricky thing is, the way how Cycles splits edges need to match the way how Blender does it and with an addition of custom normals this became more and more problematic. Eventually, the sharp edge split was left to a Blender side, so then all areas are doing it exactly the same (modifier stack, viewport, Cycles render). From possible ways to solve the issue I see: - Move pointiness and random-per-island attributes to Blender side, calculated prior to sharp edge split. This will additionally make it possible to use those attributes in Eevee, yay! - Add a version of sharp edge split utility which will only tag edges which are to be split. This will allow Cycles to use same splitting rules as the rest of Blender, but will allow Cycles to keep track of its attributes.
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @Maia3D

Added subscriber: @Maia3D

Yes, I'm having the same problem. This needs to be fixed, specially because even after we apply the bevel, it continues broken.

Really, it is the Auto Smooth splitting the edges.

also check this file:
AutoSmooth_RandomPerIsland.blend

I only add suzanne, activated auto smooth and applied random per island.

Also, why Bevel modifier doesn't use the same method as Weighted Normals? Weighted Normal doesn't splits the edges (at least when Keep Sharp is off).
Bevel could use Weighted Normal under the hood, but feeding it with the new created faces. Well, I'm only a user, not a developer, so maybe i'm wrong.

Yes, I'm having the same problem. This needs to be fixed, specially because even after we apply the bevel, it continues broken. Really, it is the Auto Smooth splitting the edges. also check this file: [AutoSmooth_RandomPerIsland.blend](https://archive.blender.org/developer/F8401729/AutoSmooth_RandomPerIsland.blend) I only add suzanne, activated auto smooth and applied random per island. Also, why Bevel modifier doesn't use the same method as Weighted Normals? Weighted Normal doesn't splits the edges (at least when Keep Sharp is off). Bevel could use Weighted Normal under the hood, but feeding it with the new created faces. Well, I'm only a user, not a developer, so maybe i'm wrong.

Added subscriber: @ttrevan

Added subscriber: @ttrevan

Added subscriber: @APEC

Added subscriber: @APEC
Member

Added subscribers: @NahuelBelich, @lichtwerk

Added subscribers: @NahuelBelich, @lichtwerk

Added subscriber: @ChrisCrossCrash

Added subscriber: @ChrisCrossCrash

At a minimum, perhaps a note could be added to the Geometry Node documentation so that users will know of this limitation.

At a minimum, perhaps a note could be added to the [Geometry Node documentation](https://docs.blender.org/manual/en/latest/render/shader_nodes/input/geometry.html) so that users will know of this limitation.
Member

Added subscribers: @slowburn, @HooglyBoogly, @PratikPB2123

Added subscribers: @slowburn, @HooglyBoogly, @PratikPB2123

Added subscriber: @shmuel

Added subscriber: @shmuel

the volume never worked and as it says in the documentation that most the inputs of the geometry node doesn't work for volumes

the volume never worked and as it says in the documentation that most the inputs of the geometry node doesn't work for volumes

Added subscribers: @mod_moder, @mano-wii

Added subscribers: @mod_moder, @mano-wii

Would it be possible to consider using geometry groups to auto-generate this? That is, so that temporary nodes would be created, executed and their result used in the render. Then, it would also allow working versions of implementations of this from geometry nodes to be reused.

Would it be possible to consider using geometry groups to auto-generate this? That is, so that temporary nodes would be created, executed and their result used in the render. Then, it would also allow working versions of implementations of this from geometry nodes to be reused.
Member

Added subscriber: @crantisz

Added subscriber: @crantisz
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:01:32 +01:00
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
15 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#72284
No description provided.