Frame Selected in 3d viewport does not respect Geo Nodes instances #95262

Closed
opened 2022-01-27 18:15:44 +01:00 by Nikhil Shringarpurey · 15 comments

Blender Version
Broken: current master build

Short description of error
Frame Selected in 3d viewport does not respect Geo Nodes instances

Exact steps for others to reproduce the error

#95262.blend

  • Open .blend
  • use {key Numpad ,} to frame selected
  • result: frames the "original" boundingbox only
  • set RealizeInstances on the modifier to 1 (notice the overall boundingbox is "unified" - expected -)
  • use {key Numpad ,} to frame selected
  • result: frames the overall boundingbox now

So the question is probably: for user actions like these, should always the "realized" bounding box be used?

Original report
The frame selected function (numpad period) is normally used to zoom an object to full screen in the 3D View. When Geometry Nodes has created new mesh data, this function only zooms into the original object and ignores the new geometry.

If a Realize Instances node is added at the end of the tree, then the frame selected function works better, but is still not framing the object correctly.

Guessing this is due to how instances are handled, so I'm not sure if this is a bug that can be fixed, but wanted to log it.

Examples attached showing result of using frame selected with and without a RI node.

Without (zooms in way too far):
FrameSelected 01.png

With (better, but still not fitting selected object to viewport):
FrameSelected 02.png

**Blender Version** Broken: current master build **Short description of error** Frame Selected in 3d viewport does not respect Geo Nodes instances **Exact steps for others to reproduce the error** [#95262.blend](https://archive.blender.org/developer/F12830825/T95262.blend) - Open .blend - use {key Numpad ,} to frame selected - result: frames the "original" boundingbox only - set `RealizeInstances` on the modifier to 1 (notice the overall boundingbox is "unified" - expected -) - use {key Numpad ,} to frame selected - result: frames the overall boundingbox now So the question is probably: for user actions like these, should always the "realized" bounding box be used? **Original report** The frame selected function (numpad period) is normally used to zoom an object to full screen in the 3D View. When Geometry Nodes has created new mesh data, this function only zooms into the original object and ignores the new geometry. If a Realize Instances node is added at the end of the tree, then the frame selected function works better, but is still not framing the object correctly. Guessing this is due to how instances are handled, so I'm not sure if this is a bug that can be fixed, but wanted to log it. Examples attached showing result of using frame selected with and without a RI node. Without (zooms in way too far): ![FrameSelected 01.png](https://archive.blender.org/developer/F12828157/FrameSelected_01.png) With (better, but still not fitting selected object to viewport): ![FrameSelected 02.png](https://archive.blender.org/developer/F12828158/FrameSelected_02.png)
Author
Member

Added subscriber: @Nikhil.Net

Added subscriber: @Nikhil.Net
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Also true for "regular" instances, will check.

Also true for "regular" instances, will check.
Member

In #95262#1296879, @lichtwerk wrote:
Also true for "regular" instances, will check.

Backflip on the "regular" ones, these work.

> In #95262#1296879, @lichtwerk wrote: > Also true for "regular" instances, will check. Backflip on the "regular" ones, these work.
Member

Changed status from 'Confirmed' to: 'Needs Developer To Reproduce'

Changed status from 'Confirmed' to: 'Needs Developer To Reproduce'
Member

Basically made this a design question now, this might have been discussed already, will also ask in chat...

Basically made this a design question now, this might have been discussed already, will also ask in chat...
Member

Not sure if #92206 (Bounding Box: compute during depsgraph evaluation) is related?

Not sure if #92206 (Bounding Box: compute during depsgraph evaluation) is related?
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Checking this, intend seems to be to include instances already, but it's not working correctly. The dupli-object iterator in BKE_object_minmax_dupli() iterates over the original object multiple times, rather than the original one and then the instanced ones. So object_duplilist() seems to generate the wrong dupli-list.

Simpler way to recreate this:

In #95262#1296894, @lichtwerk wrote:
Not sure if #92206 (Bounding Box: compute during depsgraph evaluation) is related?

In some way related yeah, but not in that it would help much solving this I think.

Checking this, intend seems to be to include instances already, but it's not working correctly. The dupli-object iterator in `BKE_object_minmax_dupli()` iterates over the original object multiple times, rather than the original one and then the instanced ones. So `object_duplilist()` seems to generate the wrong dupli-list. Simpler way to recreate this: * Open file [node_instance_testing.blend](https://archive.blender.org/developer/F12831140/node_instance_testing.blend) * Press numpad {key .} * Notice that the instances go out of view bounds. > In #95262#1296894, @lichtwerk wrote: > Not sure if #92206 (Bounding Box: compute during depsgraph evaluation) is related? In some way related yeah, but not in that it would help much solving this I think.
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I guess the issue is that BKE_object_minmax_dupli calls BKE_object_boundbox_get(dob->ob). This ignores dop->ob_data which has to be taken into account here.
That's touching on the more general issue that we don't have bounding boxes on the geometry directly yet, but should be possible to fix either way.

I guess the issue is that `BKE_object_minmax_dupli` calls `BKE_object_boundbox_get(dob->ob)`. This ignores `dop->ob_data` which has to be taken into account here. That's touching on the more general issue that we don't have bounding boxes on the geometry directly yet, but should be possible to fix either way.

This issue was referenced by 217e0a2ce6

This issue was referenced by 217e0a2ce615921040da4b524d2393d4db5ab68e
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-02-01 11:59:49 +01:00
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
5 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#95262
No description provided.