Cycles adaptive subdivision pre-subdivides the mesh with the "hidden" render levels setting #85030

Closed
opened 2021-01-25 02:50:53 +01:00 by Jesse Yurkovich · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version:

  • 2.93.0 Alpha, branch: master, commit date: 2021-01-22 18:30, hash: aaa1d58054
  • 2.91.0
  • 2.90.1
    Worked: n/a

Short description of error
It's not Cycles fault per se, but the mesh used for adaptive subdivision is sync'd with Cycles pre-subdivided using a "hidden" render levels setting.

This causes unnecessary runtime performance and memory problems that wouldn't otherwise be there. It is also quite unexpected from a user perspective and introduces a workflow ordering issue.

Exact steps for others to reproduce the error
adaptive-subd.blend

  • Add a plane
  • Add a sub-d modifier and set Viewport to 0 and Render to 2
  • Enable Adaptive Subdivision on that sub-d modifier
    • The Render level of 2 is now "hidden"
  • Perform a render while under the debugger
    • Notice that the mesh that is sync'd with cycles is already at 25 verts in the following stack (a 4 vert plane subdivided 2 times)
blender.exe!ccl::create_mesh(ccl::Scene * scene, ccl::Mesh * mesh, BL::Mesh & b_mesh, const ccl::array<ccl::Node *,16> & used_shaders, bool subdivision, bool subdivide_uvs) Line 743	C++
blender.exe!ccl::create_subd_mesh(ccl::Scene * scene, ccl::Mesh * mesh, BL::Object & b_ob, BL::Mesh & b_mesh, const ccl::array<ccl::Node *,16> & used_shaders, float dicing_rate, int max_subdivisions) Line 893	C++
blender.exe!ccl::BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, ccl::Mesh * mesh) Line 1045	C++
blender.exe!ccl::BlenderSync::sync_geometry::__l2::<lambda>() Line 163	C++
  • Disable Adaptive Subdivision on that sub-d modifier, Set Render level to 0, and Re-enable Adaptive Subdivision
  • Perform another render while under the debugger
    • Notice that the mesh that is sync'd with cycles is correctly at 4 verts
    • And the final render is much more reasonable in geometry

Setting Render levels to 0 before enabling Adaptive Subdivision:
r0adapt.png

Setting Render levels to 2 before enabling Adaptive Subdivision:
r2adapt.png

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: - 2.93.0 Alpha, branch: master, commit date: 2021-01-22 18:30, hash: `aaa1d58054` - 2.91.0 - 2.90.1 Worked: n/a **Short description of error** It's not Cycles fault per se, but the mesh used for adaptive subdivision is sync'd with Cycles pre-subdivided using a "hidden" render levels setting. This causes unnecessary runtime performance and memory problems that wouldn't otherwise be there. It is also quite unexpected from a user perspective and introduces a workflow ordering issue. **Exact steps for others to reproduce the error** [adaptive-subd.blend](https://archive.blender.org/developer/F9596005/adaptive-subd.blend) - Add a plane - Add a sub-d modifier and set Viewport to 0 and Render to 2 - Enable Adaptive Subdivision on that sub-d modifier - The Render level of 2 is now "hidden" - Perform a render while under the debugger - Notice that the mesh that is sync'd with cycles is already at 25 verts in the following stack (a 4 vert plane subdivided 2 times) ``` blender.exe!ccl::create_mesh(ccl::Scene * scene, ccl::Mesh * mesh, BL::Mesh & b_mesh, const ccl::array<ccl::Node *,16> & used_shaders, bool subdivision, bool subdivide_uvs) Line 743 C++ blender.exe!ccl::create_subd_mesh(ccl::Scene * scene, ccl::Mesh * mesh, BL::Object & b_ob, BL::Mesh & b_mesh, const ccl::array<ccl::Node *,16> & used_shaders, float dicing_rate, int max_subdivisions) Line 893 C++ blender.exe!ccl::BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, ccl::Mesh * mesh) Line 1045 C++ blender.exe!ccl::BlenderSync::sync_geometry::__l2::<lambda>() Line 163 C++ ``` - Disable Adaptive Subdivision on that sub-d modifier, Set Render level to 0, and Re-enable Adaptive Subdivision - Perform another render while under the debugger - Notice that the mesh that is sync'd with cycles is correctly at 4 verts - And the final render is much more reasonable in geometry Setting Render levels to 0 before enabling Adaptive Subdivision: ![r0adapt.png](https://archive.blender.org/developer/F9596006/r0adapt.png) Setting Render levels to 2 before enabling Adaptive Subdivision: ![r2adapt.png](https://archive.blender.org/developer/F9596008/r2adapt.png)
Author
Member

Added subscriber: @deadpin

Added subscriber: @deadpin

Added subscribers: @brecht, @rjg

Added subscribers: @brecht, @rjg

Based on this comment by @brecht on #73564 this is a known limitation.

Adaptive subdivision is not properly working yet in 2.80, and will subdivide the mesh both in Blender and Cycles. This is a known issue, one of the reasons it is still an experimental feature.

I will merge this ticket into #53901 which is the general task for the adaptive subdivision task.

Based on this comment by @brecht on #73564 this is a known limitation. > Adaptive subdivision is not properly working yet in 2.80, and will subdivide the mesh both in Blender and Cycles. This is a known issue, one of the reasons it is still an experimental feature. I will merge this ticket into #53901 which is the general task for the adaptive subdivision task.

Closed as duplicate of #53901

Closed as duplicate of #53901
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
2 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#85030
No description provided.