Geometry Nodes: Simulation Zone drawing updates #107043

Closed
Dalai Felinto wants to merge 5 commits from geometry-nodes-simulation-background into geometry-nodes-simulation

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

Multiple changes:

  • Make the drawing smoother/anti-aliased.
  • We use the alpha to blend between the background and the zone color.
  • If alpha is 100% we then get to see the dotted background again
  • Change zone corner radius to match nodes/layout.

image

See #106810

Multiple changes: * Make the drawing smoother/anti-aliased. * We use the alpha to blend between the background and the zone color. * If alpha is 100% we then get to see the dotted background again * Change zone corner radius to match nodes/layout. ![image](/attachments/cd6808d1-796b-4c52-a104-8275680961ab) See #106810
116 KiB
Dalai Felinto added 1 commit 2023-04-17 17:08:29 +02:00
3b31efa3f1 Geometry Nodes: Set Simulation Zone background color
There is no more real transparency. Right now we use the alpha to blend between
the background and the zone color. This way they don't look darker when
they overlap.

See #106810
Dalai Felinto added this to the Nodes & Physics project 2023-04-17 17:08:37 +02:00
Hans Goudey reviewed 2023-04-17 23:02:42 +02:00
@ -3168,1 +3167,3 @@
immUniformThemeColor(TH_NODE_ZONE_SIMULATION);
float zone_color[4];
UI_GetThemeColor4fv(TH_NODE_ZONE_SIMULATION, zone_color);
immUniformThemeColorBlend(TH_BACK, TH_NODE_ZONE_SIMULATION, zone_color[3]);
Member

What about using immUniformColor4fv here so TH_NODE_ZONE_SIMULATION doesn't have to be passed twice? I'd think that would give the same result.

What about using `immUniformColor4fv` here so `TH_NODE_ZONE_SIMULATION` doesn't have to be passed twice? I'd think that would give the same result.
Author
Owner

I don't see the point besides saving one internal call to the equivalent of UI_GetThemeColor4fv(TH_BACK, background_color);.

What I thought of instead is to split the alpha from the simulation zone color and have it as a standalone float.

I don't see the point besides saving one internal call to the equivalent of `UI_GetThemeColor4fv(TH_BACK, background_color);`. What I thought of instead is to split the alpha from the simulation zone color and have it as a standalone float.
Dalai Felinto added 1 commit 2023-04-18 10:30:30 +02:00
Dalai Felinto added 1 commit 2023-04-18 10:42:26 +02:00
43344af260 Simulation Zones: Draw the countours on top
Since we now draw the zones fully opaque, we need to make sure a zone
can't hide another one that may be inside it.
Author
Owner

Patch updated to contain three separate commits:

  • Use the theme
  • Make drawing smooth
  • Make sure zones don't hide behind others.
Patch updated to contain three separate commits: * Use the theme * Make drawing smooth * Make sure zones don't hide behind others.
Dalai Felinto added 2 commits 2023-04-18 11:36:01 +02:00
Author
Owner

Added two more commits:

  • Simulation Zones: Make the round corners smaller
  • Simulation Zones: Draw background when alpha = 0.0

I looked at drawing the zone with a shadow, but that would be too much work. I propose we move forward with this as it is.

Added two more commits: * Simulation Zones: Make the round corners smaller * Simulation Zones: Draw background when alpha = 0.0 I looked at drawing the zone with a shadow, but that would be too much work. I propose we move forward with this as it is.
Dalai Felinto changed title from Geometry Nodes: Set Simulation Zone background color to Geometry Nodes: Simulation Zone drawing updates 2023-04-18 11:39:26 +02:00
Author
Owner

Committed to the geometry-nodes-simulation branch as 8981bb4ac6.

Committed to the `geometry-nodes-simulation` branch as 8981bb4ac615.
Dalai Felinto closed this pull request 2023-04-18 12:16:13 +02:00
Dalai Felinto deleted branch geometry-nodes-simulation-background 2023-04-18 12:16:19 +02:00
Member

I don't see the point besides saving one internal call to the equivalent of UI_GetThemeColor4fv(TH_BACK, background_color);.

It's just about avoiding logical redundancy and not doing the same thing twice.

>I don't see the point besides saving one internal call to the equivalent of UI_GetThemeColor4fv(TH_BACK, background_color);. It's just about avoiding logical redundancy and not doing the same thing twice.

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