Cycles 3D Curves missing some intersections using Metal #123634
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#123634
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Operating system: macOS-14.5-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 Max 1.2
Blender Version
Broken: version: 4.2.0 Beta, branch: blender-v4.2-release, commit date: 2024-06-23 04:43, hash:
485a4dbf0fe2
Worked: Not sure, even 3.3 is broken
Short description of error
Some hair segments are missing when rendering 3D curves with Metal. The behavior depends on the viewing angle.
Exact steps for others to reproduce the error
Add Empty Hair with a length of more than 0.4 or 0.5m, change Curve Shape to 3D Curves, render with GPU, observe some hair segments are missing.
I can confirm this issue. Just adding that this issue doesn't occur when using MetalRT, which points towards it being a BVH2 issue. But I could not reproduce the issue with other backends that use BVH2 (CUDA with BVH2, and CPU with BVH2). So it seems it's a Metal + BVH2 issue.
Since the issue is view dependant, it points to a problem in the curve intersection functions.
Apple M1 Pro
I did some quick investigating. The issue reported here only seems to occur when the hair strands are straight. As they start to curve, the gaps disappear.
But what's interesting is that as you continue adjusting the hair shape, sometimes gaps will appear again, and I assume these two issues are related to each other.
However in the case of curved hair, the issue can be reproduced on multiple backends that use BVH2 (Tested BVH2 on Metal and CPU). So hopefully this helps with debugging the issue.
missing_hair_intersection_curved.blend
Note: I can only reproduce the issue in this file in the viewport. Although the appreance of the original file in the report adjusts based on final vs viewport rendering, so I assume this is the same thing.
I am pretty sure that the curved variant is a different issue, and I have a proposed fix for it in #126157. I cannot reproduce the original problem, maybe something changed, fixing it by accident?
Thanks for opening the pull request David.
I can confirm the original issue Weizhen reported and the one I reported are different, sorry for grouping them together.
On that note, I can still reproduce the issue reported by Weizhen here on my M1 Pro. I tried investigating that issue, but I can't figure out the cause yet.
From my debugging it seems that the GPU ray correctly hits the curve, and schedules aINTEGRATOR_SHADE_SURFACE
kernel. But aINTEGRATOR_SHADE_BACKGROUND
kernel gets processed instead.Edit: It seems that when I try and debug the issue, the intersect occurs, but if I don't try to debug it, the intersection doesn't. This lead to some confusion and the incorrect (now crossed out) information above