Fix for wobbly volume object outlines in the viewport #111657

Merged
Lukas Tönne merged 2 commits from LukasTonne/blender:fix_wobbly_volume_outline into main 2023-10-06 17:43:14 +02:00
Member

The outlines of volume grids in the viewport are noticeable "wobbly"
when they should simply represent grid boxes. This is especially
noticeable on simple regular grids such as the "Volume Cube" geometry
node output.

The reason is that the outlines generated by taking a triangulated mesh
of the grid boxes and then growing it by successively scaling each
triangle. The offset for each vertex grows proportional to its degree
(number of connected edges). The fix is to divide each vertex's offset
by its degree.

The resulting mesh is much more regular and closer to to 1% desired
growth factor.

Old: Screenshot_20230829_155602
New: Screenshot_20230829_155648

The outlines of volume grids in the viewport are noticeable "wobbly" when they should simply represent grid boxes. This is especially noticeable on simple regular grids such as the "Volume Cube" geometry node output. The reason is that the outlines generated by taking a triangulated mesh of the grid boxes and then growing it by successively scaling each triangle. The offset for each vertex grows proportional to its degree (number of connected edges). The fix is to divide each vertex's offset by its degree. The resulting mesh is much more regular and closer to to 1% desired growth factor. Old: ![Screenshot_20230829_155602](/attachments/87fbdca3-fb9d-49d8-b4f5-6780d1c72f79) New: ![Screenshot_20230829_155648](/attachments/4452c52b-96df-4200-a02f-3d0d8aa8680e)
Lukas Tönne added 1 commit 2023-08-29 15:57:24 +02:00
ca55e85ed2 Fix for wobbly volume object outlines in the viewport.
The outlines of volume grids in the viewport are noticeable "wobbly"
when they should simply represent grid boxes. This is especially
noticeable on simple regular grids such as the "Volume Cube" geometry
node output.

The reason is that the outlines generated by taking a triangulated mesh
of the grid boxes and then growing it by successively scaling each
triangle. The offset for each vertex grows proportional to its degree
(number of connected edges). The fix is to divide each vertex's offset
by its degree.

The resulting mesh is much more regular and closer to to 1% desired
growth factor.
Lukas Tönne added this to the Nodes & Physics project 2023-08-29 16:02:29 +02:00
Author
Member

Some mathematical reasoning: Growing the surface by 1% does not directly lead to concrete vertex offsets, it requires solving a large equation system.

The current algorithm tries to arrive at a solution by solving each triangle in turn and adding up the solutions, which does not quite work. By simply dividing the sum by the number of vertex edges this can be turned into a proper Jacobi solver. It's still a single iteration but for the purpose is good enough.

Some mathematical reasoning: Growing the surface by 1% does not directly lead to concrete vertex offsets, it requires solving a large equation system. The current algorithm tries to arrive at a solution by solving each triangle in turn and adding up the solutions, which does not quite work. By simply dividing the sum by the number of vertex edges this can be turned into a proper Jacobi solver. It's still a single iteration but for the purpose is good enough.
Lukas Tönne requested review from Jacques Lucke 2023-10-06 15:14:06 +02:00
Lukas Tönne added 1 commit 2023-10-06 15:16:02 +02:00
Jacques Lucke approved these changes 2023-10-06 16:58:05 +02:00
Lukas Tönne merged commit 711c9c5553 into main 2023-10-06 17:43:14 +02:00
Lukas Tönne deleted branch fix_wobbly_volume_outline 2023-10-06 17:43:16 +02:00
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#111657
No description provided.