GPv3: Bounding Box node #113790

Closed
Dalai Felinto wants to merge 2 commits from dfelinto/blender:grease-nodes-bounding-box into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Note that this node was already working. But it was creating a single
bounding box.

Similar to Convex Hull we are following the design defined in #113602
where each layer should create its own mesh instance.

Part of #113602.

Note that this node was already working. But it was creating a single bounding box. Similar to Convex Hull we are following the design defined in #113602 where each layer should create its own mesh instance. Part of #113602.
Author
Owner

Keep in mind that:

  1. It is changing the GeometrySet::compute_boundbox_without_instances() function which is used elsewhere (e.g., BKE_object_boundbox_calc_from_evaluated_geometry).
  2. Technically we could create a single Reference and add it multiple times. Wouldn't mind doing it, but only if needed.

My test file: greasepencil-nodes.blend

Keep in mind that: 1. It is changing the GeometrySet::compute_boundbox_without_instances() function which is used elsewhere (e.g., BKE_object_boundbox_calc_from_evaluated_geometry). 2. Technically we could create a single Reference and add it multiple times. Wouldn't mind doing it, but only if needed. My test file: [greasepencil-nodes.blend](/attachments/29450176-1c17-47e9-ac61-d065fb5bdc69)
Dalai Felinto requested review from Hans Goudey 2023-10-16 22:57:56 +02:00
Dalai Felinto force-pushed grease-nodes-bounding-box from 67017aab7d to d21997a2d7 2023-10-18 17:22:12 +02:00 Compare
Dalai Felinto requested review from Jacques Lucke 2023-10-18 17:32:03 +02:00
Member

Generally, outputting the individual bounding box as instances seems ok.

It feels like the Min and Max outputs of the node should still take the full grease pencil geometry into account though. Instances are not taken into account there, because that would be quite expensive in many cases. For grease pencil, it shouldn't really be more expensive than it is already.

I'll probably also change modify_geometry_sets sets today or tomorrow so that adding instances feels more safe.

Generally, outputting the individual bounding box as instances seems ok. It feels like the `Min` and `Max` outputs of the node should still take the full grease pencil geometry into account though. Instances are not taken into account there, because that would be quite expensive in many cases. For grease pencil, it shouldn't really be more expensive than it is already. I'll probably also change `modify_geometry_sets` sets today or tomorrow so that adding instances feels more safe.
Dalai Felinto force-pushed grease-nodes-bounding-box from d21997a2d7 to 6729fed3bc 2023-10-19 13:07:26 +02:00 Compare
Author
Owner

It feels like the Min and Max outputs of the node should still take the full grease pencil geometry into account though.

It makes sense, done! Test file: greasepencil-nodes.blend

> It feels like the Min and Max outputs of the node should still take the full grease pencil geometry into account though. It makes sense, done! Test file: [greasepencil-nodes.blend](/attachments/b9458ead-6619-47c8-92a2-078d0051db58)
Author
Owner

I will abandon this patch now. While talking to @HooglyBoogly we thought it would be ok to keep the current behaviour we have in main (where the entire Grease Pencil object is considered for a single "Bounding Box".

This way this node to behave similar to what you get with from the "Dimensions" in the viewport.

Besides, this also matches the behaviour of connecting the "Bounding Box" node with the Object Info node - which is always takes the entire object into account.

I will abandon this patch now. While talking to @HooglyBoogly we thought it would be ok to keep the current behaviour we have in main (where the entire Grease Pencil object is considered for a single "Bounding Box". This way this node to behave similar to what you get with from the "Dimensions" in the viewport. Besides, this also matches the behaviour of connecting the "Bounding Box" node with the Object Info node - which is always takes the entire object into account.
Dalai Felinto closed this pull request 2023-10-23 12:10:57 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
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#113790
No description provided.