Page 1 of 1

OSL Texture Nodes - Kuwahara Filter

Posted: Sun Mar 16, 2025 9:40 am
by foliumcr
Is it possible to create a "Kuwahara filter" node using OSL texture that forces the input to become "stylised", or has anyone made something similar? Looking for a quick and simple way to mimic a painterly style to match a character already in that style.

Re: OSL Texture Nodes - Kuwahara Filter

Posted: Sun Mar 16, 2025 11:18 am
by interelectronix
For Octane OSL, you can’t do Kuwahara filter directly inside a texture node because:
1. OSL in Octane doesn’t allow per-pixel access of neighboring texels dynamically via code (no mipmap/sample functions with varying UVs inside OSL).
2. OSL texture() only takes string filenames, not texture nodes passed as color.

This makes writing a working Kuwahara inside Octane OSL impossible unless Octane adds proper texel sampling access (as found in Blender’s OSL or Arnold’s OSL implementation).