Cycles renders only first duplivert when mesh has generative modifier #60735

Closed
opened 2019-01-22 05:00:57 +01:00 by ChameleonScales · 17 comments

System Information
Operating system: Linux Mint 19.0 x64
Graphics card: Nvidia GeForce 820M

Blender Version
Broken: 2.8 Date: 2019-01-16 21:59 Hash: e57ee5934a
Worked: 2.79b

Short description of error
When rendering a mesh with dupliverts with Cycles, if that mesh has a modifier from the "Generate" column, only one instance will be rendered.
Exceptions: Bevel, Boolean, Decimate, Edge split, Skin, Triangulate, Wireframe
Note: This bug also happens in the Cycles viewport and when it does, for some reason the progressive sampling refreshes constantly as if something was being edited.
Other note: This bug doesn't happen with duplifaces

Exact steps for others to reproduce the error
From start:

  • Keep cube
  • add another one
  • scale this one down
  • parent it to the big one
  • enable dupliverts on the big one
  • add a subdivision modifier (or any other that is not in the exceptions) to the big one
  • render with Cycles

Only one instance gets rendered

**System Information** Operating system: Linux Mint 19.0 x64 Graphics card: Nvidia GeForce 820M **Blender Version** Broken: 2.8 Date: 2019-01-16 21:59 Hash: e57ee5934a30 Worked: 2.79b **Short description of error** When rendering a mesh with dupliverts with Cycles, if that mesh has a modifier from the "Generate" column, only one instance will be rendered. Exceptions: Bevel, Boolean, Decimate, Edge split, Skin, Triangulate, Wireframe Note: This bug also happens in the Cycles viewport and when it does, for some reason the progressive sampling refreshes constantly as if something was being edited. Other note: This bug doesn't happen with duplifaces **Exact steps for others to reproduce the error** From start: - Keep cube - add another one - scale this one down - parent it to the big one - enable dupliverts on the big one - add a subdivision modifier (or any other that is not in the exceptions) to the big one - render with Cycles Only one instance gets rendered

Added subscriber: @ChameleonScales

Added subscriber: @ChameleonScales

#62568 was marked as duplicate of this issue

#62568 was marked as duplicate of this issue

#61547 was marked as duplicate of this issue

#61547 was marked as duplicate of this issue

#59837 was marked as duplicate of this issue

#59837 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Confirmed, checking...

Confirmed, checking...
Brecht Van Lommel self-assigned this 2019-01-22 12:09:02 +01:00

Added subscriber: @JasonClarke

Added subscriber: @JasonClarke

Added subscribers: @finnb, @brecht

Added subscribers: @finnb, @brecht

The problem is that meshes sometimes have a CD_ORIGINDEX layer that is not filled in. Need some time to figure out when it should be created now in the new code.

The problem is that meshes sometimes have a `CD_ORIGINDEX` layer that is not filled in. Need some time to figure out when it should be created now in the new code.

Added subscriber: @yohoo

Added subscriber: @yohoo

Added subscriber: @DenisBelov

Added subscriber: @DenisBelov

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey

In 2.7, CDDM_from_template, cddm_copy and maybe more functions would create CD_ORIGINDEX on the original derivedmesh. This makes things work mostly automatic without modifiers having to do anything.

In 2.8 we are no longer doing this, and we probably shouldn't because the input is now the actual original mesh instead of a derivedmesh. I can think of 3 solutions:
a) Let modifiers initialize original indices manually
b) Make a shallow copy of the mesh that can have its customdata modifier like derivedmesh used to
c) Add special handling of CD_ORIGINDEX instead CustomData_copy so copies the element index

@Sergey or @mont29, any ideas?

In 2.7, `CDDM_from_template`, `cddm_copy` and maybe more functions would create `CD_ORIGINDEX` on the original derivedmesh. This makes things work mostly automatic without modifiers having to do anything. In 2.8 we are no longer doing this, and we probably shouldn't because the input is now the actual original mesh instead of a derivedmesh. I can think of 3 solutions: a) Let modifiers initialize original indices manually b) Make a shallow copy of the mesh that can have its customdata modifier like derivedmesh used to c) Add special handling of `CD_ORIGINDEX` instead `CustomData_copy` so copies the element index @Sergey or @mont29, any ideas?

@brecht, think creating a shallow copy is the cleanest and the most isolated solution: only needs to be done in a single place of modifier stack evaluation.

Let modifiers initialize original indices manually

This would make modifiers implementation more verbose and more prone to errors.

Add special handling of CD_ORIGINDEX instead CustomData_copy so copies the element index

That could work, but kind of introduces extra special handling, making it even further unclear what is to be used where.

Make a shallow copy of the mesh that can have its customdata modifier like derivedmesh used to

The only downside here i can think of is an extra allocation/pointers assignment. I am not convinced that this will show up in the profiled any time soon. And i don't want to make things more complicated/unclear just to gain unmeasurable speedup in the real world usecase.

Not saying that optimization can not happen later. But for now i think we really want something simple, reliable, and error-proof.

@brecht, think creating a shallow copy is the cleanest and the most isolated solution: only needs to be done in a single place of modifier stack evaluation. > Let modifiers initialize original indices manually This would make modifiers implementation more verbose and more prone to errors. > Add special handling of CD_ORIGINDEX instead CustomData_copy so copies the element index That *could* work, but kind of introduces extra special handling, making it even further unclear what is to be used where. > Make a shallow copy of the mesh that can have its customdata modifier like derivedmesh used to The only downside here i can think of is an extra allocation/pointers assignment. I am not convinced that this will show up in the profiled any time soon. And i don't want to make things more complicated/unclear just to gain unmeasurable speedup in the real world usecase. Not saying that optimization can not happen later. But for now i think we really want something simple, reliable, and error-proof.

Agree with @Sergey, overhead should be neglectable, and this is by far the simplest and safest solution.

Agree with @Sergey, overhead should be neglectable, and this is by far the simplest and safest solution.

This issue was referenced by 0680525147

This issue was referenced by 06805251478c53a262bc1fe9a7224d1f1b5bf449

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
7 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#60735
No description provided.