Fix #109254: Voronoi Distance Output Clamps at 8.0 with low Minkowski Exponents #109286
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#109286
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Hoshinova/blender:db"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This fixes #109254 for F1 and F2, the fix doesn't work for Smooth F1.
The problem with Smooth F1 is that the 8.0 seems to be the only constant where the smooth interpolation works correctly. So I thought you might know how to change the interpolation logic to make it work with the analytically computed max_distance.
And to be sure were on the same page
params.max_distance
is calculated like this:params.max_distance = voronoi_distance(vec3(0.0), vec3(0.5 + 0.5 * params.randomness), params);
WIP: Fix #109254to WIP: Fix #109254: Voronoi Distance Output Clamps at 8.0 with low Minkowski Exponents@OmarEmaraDev I narrowed down the problem a bit.
Changing
float smoothDistance = 8.0;
tofloat smoothDistance = params.max_distance;
fixes the problem for most cases... except for the1D Smooth F1
and2D Smooth F1 + Chebychev
Color
andPosition
outputs for some reason.I only applied the Smooth F1 fix to the EEVEE (GLSL) version to make it easier to compare to the original version, which is still used in Cylces.
Test file demonstrating differences:
Voronoi_Test_File.blend
As can be seen in the test file there is a slight difference between the output in EEVEE and Cycles for the
1D Smooth F1
and2D Smooth F1 + Chebychev
Color
andPosition
outputs.@ -157,3 +157,3 @@
float localPosition = coord - cellPosition;
float smoothDistance = 8.0;
float smoothDistance = params.max_distance;
Slightly changes
Color
andPosition
outputs for1D Smooth F1
and2D Smooth F1 + Chebychev
for some reason.Changing it further to
float smoothDistance = params.max_distance + 8.0;
also fixes it for those cases.@OmarEmaraDev
Changing
float smoothDistance = params.max_distance;
tofloat smoothDistance = params.max_distance + 8.0;
fixes the issues for the1D Smooth F1
and2D Smooth F1 + Chebychev
Color
andPosition
outputs now.I'm not sure why it works, my guess is that the smooth interpolation logic only works when the initial value of
smoothDistance
is significantly larger thanparams.max_distance
.It works now from a user perspective, the question is whether it makes sense regarding the whole Smooth F1 calculation logic or if it's just mere coincidence that it works.
@ -8,6 +8,7 @@
#include "vector4.h"
#define vector3 point
#define FLT_MAX 3.402823466e+38 // max value
Move that to
stdcycles.h
.@ -130,3 +130,3 @@
float localPosition = coord - cellPosition;
float minDistance = 8.0;
float minDistance = FLT_MAX;
Add at the top:
@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
WIP: Fix #109254: Voronoi Distance Output Clamps at 8.0 with low Minkowski Exponentsto Fix #109254: Voronoi Distance Output Clamps at 8.0 with low Minkowski ExponentsThis produces artifacts for the smooth version.
@blender-bot package
@OmarEmaraDev The artifacts are fixed now.
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.