Cycles: various curve rendering issues #124295
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#124295
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: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 556.12
Blender Version
Broken: version: 4.2.0 Beta, branch: blender-v4.2-release, commit date: 2024-07-04 21:57, hash:
c94bed9afa0d
For all of the following cases, a single curve was created with its default settings: add empty hair on default cube, enter sculpt mode, and place one strand on the cube. For its mesh representative to directly compare against, a point was selected on the curve in edit mode, the 3D cursor was moved to it, and a cylinder of equal radius was created with no cap.
Blend files provided.
Case 1
The inside backface does not render on GPU.
Case 2
The frontface transmits light when it shouldn't.
This scene has a curve on the left and a mesh cylinder on the right, both have a Suzanne placed inside. The curve and mesh share a material that sets camera rays to be transparent. The single light in this scene is positioned so that it is impossible for light to enter the inside, with a cube at the bottom to block the potential possibility of light leaking through an unnoticeable gap. The curve is clearly incorrect. If you do not trust the material, you can set the curve to diffuse and look through the top camera instead. There is also a difference between CPU and GPU.
Case 3
GPU has ringing artifacts when looking down on a curve.
Curves with a taper make more pronounced rings.
Case 4
At certain viewing angles, a curve's shading changes.
This scene only has one light. When looking at the curve at a "common" angle, the side facing the light source predictably is brighter than the shadow side.
However, as our viewing angle changes, we can see a distinct teardrop shape. Inside the teardrop the shading is correct, but outside of the teardrop the shading is incorrect. Very easy to see on tapered curves, but harder to see on straight curves. The straight curve image is set up so that the camera is at the very top of the curve and it has just "fallen off", looking straight down
When the view is directly above the curve, the side facing the light is dark while the side in the shadow is bright.
This shading error is present at any viewing angle on a tapered curve. Here is a camera on the floor, angled 85degrees nearly perpendicular to the curve, and a thin line of bright shading is still visible (which is also seen in Case 4's first image).
Case 5a
Light rendering difference between CPU and GPU with hair or glass.
This scene has an icosphere inside a curve with a glass BSDF, CPU properly shows path tracing limitations with SDS caustics while GPU is clearly incorrect. Probably related to Case 2, or this is just Case 2 but with transparent materials.
Case 5b
There are refraction differences between glass and hair shaders on a curve which are different than mesh with glass.
Interestingly, the backface seems to be correct between curve glass and mesh glass.
Case 5c
Refraction difference between 3D curve and ribbon shapes. The area around the ground and the icosphere is expected, but the refraction of Suzanne should(?) be similar.
For future reference, please report one bug per report. All these issues are related to hair, but some issues are different from each other and should probably be reported separately.
Case 1:
Embree and Embree GPU do not do backface culling on 3D curves. BVH2 (Used by CUDA, HIP, oneAPI, and Metal), OptiX, HIP-RT, and MetalRT all do backface culling.
Looking at the documentation for OptiX, it doesn't seem like we can turn on backface culling. And it's probably the same for HIP-RT and MetalRT. But in Embree it seems backface culling can be turned on for curves with a cmake variable. So the best approach for consistency is to enable backface culling on Embree?
Edit: It seems like back face culling for curves is already turned on:
But it doesn't work with some curve types: https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/will-EMBREE-BACKFACE-CULLING-CURVES-ever-work-with-RTC-GEOMETRY/m-p/1282534#M913
Case 2:
With CPU/Embree. Ī could be wrong here, but it seems like rays bouncing off the curve can not intersect with the (inside?) of the same curve again. And so the rays bounce off the monkey head, hit the curve, then bounces off and passes straight through the curve.
The descripency between Embree and all other BVH options in case 2 is likely the same as case 1, backface culling on the first bounce.
Case 3:
The user mentions rings on the inside of the straight curve on the GPU. I can reproduce this with a RTX 4090 with OptiX. But can not reproduce this issue with BVH2, HIP-RT, Metal-RT, Embree GPU and CPU.
This is likely this limitation mentioned in the OptiX documentation, but I could be wrong:
The user mentions pronounced rings on a tapered curve. I can not reproduce this. Maybe a difference between software and hardware tracing in OptiX? Or I'm just doing something wrong. @Fernando-Alcala Can you share the steps to reproduce?
Case 4:
I couldn't reproduce the cases, or was doing something wrong. @Fernando-Alcala can you provide clearer steps to reproduce, or share a .blend file setup specifically for this issue?
Case 5:
Case 5a:
Probably just case 1 again.
Case 5b:
In the glass cyclinder vs glass curve comparison, I assume we're seeing case 2 again.
All other case 5 examples:
I'm not 100% sure what's causing that.
I add here a new Blend file with unique
scenes
to produce each image in Case 4.The straight curve seems to only have the issue on CPU and only when the ray that hits the outside also hits the inside where that inside face has to be lit.
To reproduce rings on GPU on a tapered curve in Case 3, open the new Blend file and select the
tapered curve
ordirectly above taper
scene. It happens on OptiX but not CUDA. But CUDA has a hole appear.Currently hair strands are designed to be used for non-closeup hair rendering and shading. There are a number of optimizations possible to support these use-cases, but they come with a drawback. The GPU behavior is closer to what the intended design is, so the CPU would need to align to GPU.
This will make it so the backface culling is enabled, and that objects inside of the hair strands would not be rendered the way one might expect. And also some BSDFs might not be working the same as if they are applied on a real geometry.
In the longer term we'd need to add an option on a Curves object to specify its intended use (is it just a non-renderable helper, is it a hair, or, potentially, a 3D curve). When the design for that is clear and finalized the Cycles side of rendering curves/hair would need to be adjusted accordingly.
This is also something we've discussed with artists here at the studio, and it is an understandable limitations for the short term.