Regression: Instanced NURBs or CURVES on mesh vertices are not visible in 3.2+ #100706

Closed
opened 2022-08-30 11:57:26 +02:00 by Omar Emara · 23 comments
Member

System Information
Operating system: Linux-5.19.2-arch1-1-x86_64-with-glibc2.36 64 Bits
Graphics card: AMD CEDAR (DRM 2.50.0 / 5.19.2-arch1-1, LLVM 14.0.6) X.Org 4.3 (Core Profile) Mesa 22.1.6

Blender Version
Broken: version: 3.2, 3.3, 3.4.0
Worked: 3.1

NURBS issue caused by edcbf741df
Same for curves if they have geometry, that is broken b9febb54a4

Short description of error

When instancing surfaces like NURB sphere on mesh vertices through parenting, the surfaces are not visible.

instancedNURBS.blend

In 3.1:

20220830-115318.png

In 3.2+:

20220830-115334.png

**System Information** Operating system: Linux-5.19.2-arch1-1-x86_64-with-glibc2.36 64 Bits Graphics card: AMD CEDAR (DRM 2.50.0 / 5.19.2-arch1-1, LLVM 14.0.6) X.Org 4.3 (Core Profile) Mesa 22.1.6 **Blender Version** Broken: version: 3.2, 3.3, 3.4.0 Worked: 3.1 NURBS issue caused by edcbf741df Same for curves if they have geometry, that is broken b9febb54a4 **Short description of error** When instancing surfaces like NURB sphere on mesh vertices through parenting, the surfaces are not visible. [instancedNURBS.blend](https://archive.blender.org/developer/F13433908/instancedNURBS.blend) In 3.1: ![20220830-115318.png](https://archive.blender.org/developer/F13433909/20220830-115318.png) In 3.2+: ![20220830-115334.png](https://archive.blender.org/developer/F13433910/20220830-115334.png)
Author
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev

blender/blender-addons#100566 was marked as duplicate of this issue

blender/blender-addons#100566 was marked as duplicate of this issue

blender/blender-addons#100553 was marked as duplicate of this issue

blender/blender-addons#100553 was marked as duplicate of this issue
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Omar Emara changed title from Instanced NURB on mesh vertices are not visible in 3.2+ to Regression: Instanced NURB on mesh vertices are not visible in 3.2+ 2022-08-30 11:58:48 +02:00
Author
Member

Added subscriber: @Zhaoxu-Li

Added subscriber: @Zhaoxu-Li
Author
Member

Added subscriber: @fzm

Added subscriber: @fzm
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Same for curves if they have geometry (actually think this has been reported before and was ruled a Known Issue, let me dig that up)

Same for curves if they have geometry (actually think this has been reported before and was ruled a Known Issue, let me dig that up)
Member

works with Geometry Nodes:
instancedNURBS_GN.blend

works with Geometry Nodes: [instancedNURBS_GN.blend](https://archive.blender.org/developer/F13434056/instancedNURBS_GN.blend)
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Caused by edcbf741df

Reading the commit message it is not totally clear if this was expected, will raise prio here to get an answer shortterm.
Would assume this ends up as a Known Issue though.

CC @HooglyBoogly

Caused by edcbf741df Reading the commit message it is not totally clear if this was expected, will raise prio here to get an answer shortterm. Would assume this ends up as a `Known Issue` though. CC @HooglyBoogly
Member

related: #93159 (Particle don't emit curves/text in 3.0 beta )
The same thing for curves is broken since b9febb54a4 btw.

related: #93159 (Particle don't emit curves/text in 3.0 beta ) The same thing for curves is broken since b9febb54a4 btw.
Philipp Oeser changed title from Regression: Instanced NURB on mesh vertices are not visible in 3.2+ to Regression: Instanced NURBs or CURVES on mesh vertices are not visible in 3.2+ 2022-08-30 20:40:42 +02:00
Member

Added subscriber: @Blendphys

Added subscriber: @Blendphys
Member

Dear all:

I can confirm this bug because it quite strongly affects the [Atomic Blender add-on ]] (NURB balls are used to represent the atoms and are inside an [ https:*docs.blender.org/manual/en/dev/addons/import_export/mesh_atomic.html#the-instancing-vertex-structure | instancing vertex structure , with the vertices being the atom positions). With version 3.1.2 it works but starting with version 3.2.x it started to not work. It is not working with the current exp. version 3.4.0.
Note that there is no such an issue with Mesh balls ... .

Operating system: Ubuntu 22.04, 64Bit

Dear all: I can confirm this bug because it quite strongly affects the [Atomic Blender add-on ]] (NURB balls are used to represent the atoms and are inside an [[ https:*docs.blender.org/manual/en/dev/addons/import_export/mesh_atomic.html#the-instancing-vertex-structure | instancing vertex structure ](https:*docs.blender.org/manual/en/dev/addons/import_export/mesh_atomic.html#atomic-blender-pdb-xyz), with the vertices being the atom positions). With version 3.1.2 it works but starting with version 3.2.x it started to not work. It is not working with the current exp. version 3.4.0. Note that there is no such an issue with Mesh balls ... . Operating system: Ubuntu 22.04, 64Bit
Hans Goudey self-assigned this 2022-09-06 06:44:11 +02:00
Member

I'll try to look into this one tomorrow. Can't say for sure how fixable it is yet though.

I'll try to look into this one tomorrow. Can't say for sure how fixable it is yet though.
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

It turns out the instances are being created properly, but the dependency graph iterator skips them because of deg_object_hide_original.
I don't really understand that function. I guess it's hiding instances when the instance of type OB_DUPLIVERTS | OB_DUPLIFACES but the parent object did have one of those types turned on?

That said, the comment doesn't make much sense to me: Automatic hiding if this object is being instanced on verts/faces/frames by its parent.
"Being instanced on verts" seems like a typical situation, I'm not sure why it has special attention here.

@brecht, do you remember adding that function in D4109? I'm curious if the issue it's working around is related to missing depsgraph relations or just plain visibility handling.

It turns out the instances are being created properly, but the dependency graph iterator skips them because of `deg_object_hide_original`. I don't really understand that function. I guess it's hiding instances when the instance of type `OB_DUPLIVERTS | OB_DUPLIFACES` but the parent object did have one of those types turned on? That said, the comment doesn't make much sense to me: `Automatic hiding if this object is being instanced on verts/faces/frames by its parent`. "Being instanced on verts" seems like a typical situation, I'm not sure why it has special attention here. @brecht, do you remember adding that function in [D4109](https://archive.blender.org/developer/D4109)? I'm curious if the issue it's working around is related to missing depsgraph relations or just plain visibility handling.

This is logic has existed forever, but was lost in the new depsgraph and then restored again in D4109. The idea is that if you instance an object on vertices/faces, you automatically hide the original object. We don't want to hide the instances, only the original.

The logic is a bit more complicated for the case where you instance a collection containing a setup like this. In that case the instance of the original object that comes in through the collection should be hidden, but the instances from the vertices/faces should be visible.

The easiest way to keep backwards compatibility may be to set dob->type to the same value it would have had if there were was no geometry set. I also see some code in OBJECT_OT_duplicates_make_real checking dob->type, for that case it may also be better if geometry sets didn't change it.

This is logic has existed forever, but was lost in the new depsgraph and then restored again in [D4109](https://archive.blender.org/developer/D4109). The idea is that if you instance an object on vertices/faces, you automatically hide the original object. We don't want to hide the instances, only the original. The logic is a bit more complicated for the case where you instance a collection containing a setup like this. In that case the instance of the original object that comes in through the collection should be hidden, but the instances from the vertices/faces should be visible. The easiest way to keep backwards compatibility may be to set `dob->type` to the same value it would have had if there were was no geometry set. I also see some code in `OBJECT_OT_duplicates_make_real` checking `dob->type`, for that case it may also be better if geometry sets didn't change it.

This issue was referenced by e508de0417

This issue was referenced by e508de041712cc31588cbc8d63f81970eedf3be0
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Dear Hans, thanks for your kind support!

I tried out the instancing, and see what I get (2 example files). It seems that the instancing only works for 2 vertices so far? ;-) Or is it me who is doing something wrong? Thanks for some comments ... . Cle.

System: 64Bit Ubuntu, Blender Info see last image

Example_cube.blend

Example_KBr_crystal.blend

Blender_info.png

Dear Hans, thanks for your kind support! I tried out the instancing, and see what I get (2 example files). It seems that the instancing only works for 2 vertices so far? ;-) Or is it me who is doing something wrong? Thanks for some comments ... . Cle. System: 64Bit Ubuntu, Blender Info see last image [Example_cube.blend](https://archive.blender.org/developer/F13911341/Example_cube.blend) [Example_KBr_crystal.blend](https://archive.blender.org/developer/F13911342/Example_KBr_crystal.blend) ![Blender_info.png](https://archive.blender.org/developer/F13911351/Blender_info.png)
Member

Thanks for testing @blendphys. It looks like that was broken by a follow-up fix to this fix.
Now I committed another fix for that, your file works for me now: 0e6d893d07

Thanks for testing @blendphys. It looks like that was broken by a follow-up fix to this fix. Now I committed another fix for that, your file works for me now: 0e6d893d07
Member

Yep, now it works, thanks a lot, @HooglyBoogly !

Yep, now it works, thanks a lot, @HooglyBoogly !
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
6 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#100706
No description provided.