Blender ignores linked meshes when rendering in Cycles #58251

Closed
opened 2018-11-30 01:32:40 +01:00 by Tober · 16 comments

System Information
Operating system: Windows 10
Graphics card: NVIDIA GeForce GTX 1080

Blender Version
Broken: 2.80 beta (2018-11-29 15:57, 26d5a3625e, blender2.8)
Worked: 2.79 (5bd8ac9)

Short description of error
When using duplicate linked objects, the total amount of memory used to render an image in Cycles is the same as if the linked meshes were single-user copies.

Exact steps for others to reproduce the error
Load the default start-up file.
Set the render engine to Cycles.
Delete the default cube.
Add in a suitably vertex-dense object, such as an icosphere subdivision 6.
Render the file and take note of the memory statistic in the image viewer.
"Duplicate linked" (alt-d) the icosphere 2 or 3 times.
Re-render the file and note that the memory used has increased substantially.
Make each icosphere a single-user copy
Re-render the file and note that the memory used is the same as it was in the second render.
linked spheres test.blend
spheres.jpg

**System Information** Operating system: Windows 10 Graphics card: NVIDIA GeForce GTX 1080 **Blender Version** Broken: 2.80 beta (2018-11-29 15:57, 26d5a3625ed, blender2.8) Worked: 2.79 (5bd8ac9) **Short description of error** When using duplicate linked objects, the total amount of memory used to render an image in Cycles is the same as if the linked meshes were single-user copies. **Exact steps for others to reproduce the error** Load the default start-up file. Set the render engine to Cycles. Delete the default cube. Add in a suitably vertex-dense object, such as an icosphere subdivision 6. Render the file and take note of the memory statistic in the image viewer. "Duplicate linked" (alt-d) the icosphere 2 or 3 times. Re-render the file and note that the memory used has increased substantially. Make each icosphere a single-user copy Re-render the file and note that the memory used is the same as it was in the second render. [linked spheres test.blend](https://archive.blender.org/developer/F5761446/linked_spheres_test.blend) ![spheres.jpg](https://archive.blender.org/developer/F5761466/spheres.jpg)
Author

Added subscriber: @Tober-1

Added subscriber: @Tober-1

#61783 was marked as duplicate of this issue

#61783 was marked as duplicate of this issue
Member

Added subscribers: @brecht, @lichtwerk

Added subscribers: @brecht, @lichtwerk
Brecht Van Lommel was assigned by Philipp Oeser 2018-11-30 10:52:27 +01:00
Member

Confirmed.

@brecht: can you have a look?

Confirmed. @brecht: can you have a look?

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @Sergey

Added subscriber: @Sergey

The problem is the new dependency graph is duplicating these meshes before they get to Cycles.

We could still try to detect if they are duplicates, but ideally the dependency graph should have this kind of instancing as well. It was always a bit of a hack on the Cycles side to try to figure out when the object has any modifier that could make the result different.

The problem is the new dependency graph is duplicating these meshes before they get to Cycles. We could still try to detect if they are duplicates, but ideally the dependency graph should have this kind of instancing as well. It was always a bit of a hack on the Cycles side to try to figure out when the object has any modifier that could make the result different.

@brecht, not sure what you mean by "the new dependency graph is duplicating these meshes". There is a single Mesh datablock, and several Object datablocks in such example.

The way it works internally is:

  • Single copy of the original mesh is created
  • For every object in the dependency graph the new evaluated mesh is created, but it is shares custom data pointers.
  • Modifiers will modify some data in the evaluated mesh, and set those layers as no-referenced.

What we can do is to add some special flag for evaluated mesh, which will indicate that any modifier was run (or we can deliver this from CustomData data ownership flags).

@brecht, not sure what you mean by "the new dependency graph is duplicating these meshes". There is a single Mesh datablock, and several Object datablocks in such example. The way it works internally is: - Single copy of the original mesh is created - For every object in the dependency graph the new evaluated mesh is created, but it is shares custom data pointers. - Modifiers will modify some data in the evaluated mesh, and set those layers as no-referenced. What we can do is to add some special flag for evaluated mesh, which will indicate that any modifier was run (or we can deliver this from CustomData data ownership flags).

Alternatively, we detect this case in mesh_build_data() and don't create new pointer for an evaluated mesh.

Alternatively, we detect this case in `mesh_build_data()` and don't create new pointer for an evaluated mesh.

Added subscriber: @dodododorian

Added subscriber: @dodododorian

Added subscriber: @BYOB

Added subscriber: @BYOB

Added subscriber: @JasonClarke

Added subscriber: @JasonClarke
Brecht Van Lommel removed their assignment 2019-04-12 09:35:56 +02:00
Sergey Sharybin was assigned by Brecht Van Lommel 2019-04-12 09:35:56 +02:00

Added subscriber: @YuryZiankouvki

Added subscriber: @YuryZiankouvki

Added subscriber: @DanielPaul

Added subscriber: @DanielPaul

This issue was referenced by 2f7711962a

This issue was referenced by 2f7711962a69de8192d048514e5927e49a1a63a2

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
10 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#58251
No description provided.