Compositor: Allow variable Kuwahara size #112946

Merged
Omar Emara merged 4 commits from OmarEmaraDev/blender:variable-kuwahara-size into main 2023-10-10 10:10:27 +02:00
Member

This patch changes the size property of the Kuwahara into a node socket
to allow variable size Kuwahara.

This patch changes the size property of the Kuwahara into a node socket to allow variable size Kuwahara.
Omar Emara added the
Interest
Compositing
Module
VFX & Video
labels 2023-09-27 10:45:03 +02:00
Omar Emara added 1 commit 2023-09-27 10:45:13 +02:00
Realtime Compositor: Allow variable Kuwahara size
All checks were successful
buildbot/vexp-code-patch-coordinator Build done.
5964820636
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR112946) when ready.
Author
Member

@DGruwier Here is a test build for variable size Kuwahara. It is only implemented for the realtime compositor for now. Can you give it a test and perhaps provide some practical examples?

@DGruwier Here is a test build for variable size Kuwahara. It is only implemented for the realtime compositor for now. Can you give it a test and perhaps provide some practical examples?
First-time contributor

@OmarEmaraDev Works beautifully! I'll make some examples of it in action.

@OmarEmaraDev Works beautifully! I'll make some examples of it in action.
First-time contributor

@OmarEmaraDev Three quick practical examples:

The video is a "focus pull" using the Kuwahara node instead of blur, with zdepth as the size. With stylized looks being "in" in 3D animation at the moment, I'd be very surprised if we don't see this exact thing used in an animated movie down the road.

The render with the coffee carts is using an AOV to pass a custom object attribute to the filter, having effectively a "stylization amount" parameter you can turn up and down per object. It'll be really powerful once AOVs work in the realtime compositor.

The stock photo with the person and dog is just the same thing as the squirrel example from before, more of an image editing or more advanced rotoscoping example. Painted a dirty detail map and used it as the input for the size. I can imagine creating these masks with simple rotoscoping (or tracking it with something like EbSynth), but you could also paint this as a weight map on animated geometry and pass it to the compositor. Combine it with the depth map method and the per-object attribute method, and have ultimate control.

Works great, extremely powerful workflow for getting that nice stylized painterly look. I'll definitely be playing with this a lot.

@OmarEmaraDev Three quick practical examples: The video is a "focus pull" using the Kuwahara node instead of blur, with zdepth as the size. With stylized looks being "in" in 3D animation at the moment, I'd be very surprised if we don't see this exact thing used in an animated movie down the road. The render with the coffee carts is using an AOV to pass a custom object attribute to the filter, having effectively a "stylization amount" parameter you can turn up and down per object. It'll be really powerful once AOVs work in the realtime compositor. The stock photo with the person and dog is just the same thing as the squirrel example from before, more of an image editing or more advanced rotoscoping example. Painted a dirty detail map and used it as the input for the size. I can imagine creating these masks with simple rotoscoping (or tracking it with something like EbSynth), but you could also paint this as a weight map on animated geometry and pass it to the compositor. Combine it with the depth map method and the per-object attribute method, and have ultimate control. Works great, extremely powerful workflow for getting that nice stylized painterly look. I'll definitely be playing with this a lot.
Author
Member

@Sergey What do you think?

@Sergey What do you think?
Contributor

(Windows / RTX 2060 Super)

There's noise with Classic mode with a low (or 0.0) size value.

kuwahara_noise.png

kuwahara_noise.blend

It's very subtle when a scene's brightness is low. It's more apparent (like the picture above) with a strong light.

(Windows / RTX 2060 Super) There's noise with Classic mode with a low (or 0.0) size value. ![kuwahara_noise.png](/attachments/1ea87d5a-db64-4fdb-8f96-741e87b45b63) [kuwahara_noise.blend](/attachments/215671e5-884c-48a8-8e1c-7d70b8ba80f7) It's very subtle when a scene's brightness is low. It's more apparent (like the picture above) with a strong light.
Author
Member

@persun This happens only with this patch?

@persun This happens only with this patch?
Contributor

This happens only with this patch?

Yes.

In the latest daily build:

kuwahara_noise (1).png

kuwahara_noise.blend

Sorry I removed the emission material from the file while removing other materials to make it a simple file. Re-uploaded so it's in the reproducible condition right away.

kuwahara_noise (1).blend

> This happens only with this patch? Yes. In the latest daily build: ![kuwahara_noise (1).png](/attachments/e70b4dd5-261b-4564-b525-55c89114bc6a) > kuwahara_noise.blend Sorry I removed the emission material from the file while removing other materials to make it a simple file. Re-uploaded so it's in the reproducible condition right away. [kuwahara_noise (1).blend](/attachments/006fd2a4-26c0-4814-83e0-67ee3131b40f)

@OmarEmaraDev This seems to be very powerful tool for artists.

Not sure what sort of feedback you're expecting at this time, but just general point apply about keeping parity with the CPU compositor. From studying the patch seems it is not hard to do so (unless I am missing something).

@OmarEmaraDev This seems to be very powerful tool for artists. Not sure what sort of feedback you're expecting at this time, but just general point apply about keeping parity with the CPU compositor. From studying the patch seems it is not hard to do so (unless I am missing something).
Sergey Sharybin added this to the Compositing project 2023-10-02 11:17:28 +02:00
Omar Emara added 2 commits 2023-10-06 10:00:09 +02:00
Omar Emara changed title from WIP: Realtime Compositor: Allow variable Kuwahara size to Realtime Compositor: Allow variable Kuwahara size 2023-10-06 10:00:21 +02:00
Omar Emara requested review from Sergey Sharybin 2023-10-06 10:00:37 +02:00
Omar Emara added 1 commit 2023-10-06 10:20:14 +02:00

I think the description needs to be updated, as it is now implemented for all compositors. It is also not very clear to me whether the issue reported by Sun Kim is now fixed.

That being said the code looks fine, and I did not encounter issues while testing the patch. So we are getting very close!

I think the description needs to be updated, as it is now implemented for all compositors. It is also not very clear to me whether the issue reported by Sun Kim is now fixed. That being said the code looks fine, and I did not encounter issues while testing the patch. So we are getting very close!
Author
Member

@Sergey The reported issue is fixed indeed. I am not sure what you mean regarding the patch description, the statement of it being for the realtime compositor only is just a comment, would like it removed or updated?

@Sergey The reported issue is fixed indeed. I am not sure what you mean regarding the patch description, the statement of it being for the realtime compositor only is just a comment, would like it removed or updated?

@OmarEmaraDev The title says "Realtime compositor", but on the code side it seems to be implemented for the CPU compositor as well?

@OmarEmaraDev The title says "Realtime compositor", but on the code side it seems to be implemented for the CPU compositor as well?
Author
Member

Right, the title, sorry, will update that.

Right, the title, sorry, will update that.
Omar Emara changed title from Realtime Compositor: Allow variable Kuwahara size to Compositor: Allow variable Kuwahara size 2023-10-09 10:00:02 +02:00
Sergey Sharybin approved these changes 2023-10-09 11:01:01 +02:00
Sergey Sharybin left a comment
Owner

Lovely, thanks!

Lovely, thanks!
Omar Emara merged commit 203559757a into main 2023-10-10 10:10:27 +02:00
Omar Emara deleted branch variable-kuwahara-size 2023-10-10 10:10:29 +02:00
Sergey Sharybin removed this from the Compositing project 2023-10-10 11:53:31 +02:00
Contributor

@OmarEmaraDev Hi, thanks for the patch!

Unfortunately the noise still appears to me but in a different range of size value, see #113578

@OmarEmaraDev Hi, thanks for the patch! Unfortunately the noise still appears to me but in a different range of size value, see #113578
First-time contributor

Thanks for this update. Much nicer result.
I hope elliptical Kuwahara will appear too… once…

Thanks for this update. Much nicer result. I hope elliptical Kuwahara will appear too… once…
Sign in to join this conversation.
No reviewers
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
6 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#112946
No description provided.