Node: Gabor Noise Texture #110802

Open
Charlie Jolly wants to merge 68 commits from CharlieJolly/blender:gabor into main

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

68 Commits

Author SHA1 Message Date
Charlie Jolly 916534f418 Merge branch 'main' into gabor 2023-10-26 10:57:00 +01:00
Charlie Jolly 38c607df96 Merge branch 'main' into gabor 2023-10-12 10:14:23 +01:00
Charlie Jolly 3cef2a2115 Merge branch 'main' into gabor 2023-10-11 22:09:08 +01:00
Charlie Jolly a5ef4e832f Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-10-02 10:59:26 +01:00
Charlie Jolly 5c4c4520ba Phasor: Sum after fractal accumalation, could be an option as it produces very different results 2023-10-02 10:56:30 +01:00
Charlie Jolly 436b7fd2ae Support fractal rotation when set to fixed anisotropy
buildbot/vexp-code-patch-coordinator Build done. Details
2023-10-01 16:35:29 +01:00
Charlie Jolly d190aa3a71 Use seed for offset rather than offset position, reduces artefacts detail/scale is high 2023-10-01 13:34:25 +01:00
Charlie Jolly ff9afe89ca Revert seed to old value 2023-10-01 11:56:21 +01:00
Charlie Jolly e10210d3b8 Fix variable name in OSL 2023-10-01 02:47:43 +01:00
Charlie Jolly 419279fa65 Comments, spelling and tidy. 2023-10-01 00:20:40 +01:00
Charlie Jolly 0a7de0bda7 UI: Rename Base Frequency to Frequency and move to Kernel panel 2023-09-30 23:17:53 +01:00
Charlie Jolly eae89b65a6 Rename socket Phase to Phase Offset
buildbot/vexp-code-patch-coordinator Build done. Details
2023-09-30 20:32:05 +01:00
Charlie Jolly 137c9933a6 Unintended change in Wave texture 2023-09-30 20:29:14 +01:00
Charlie Jolly 37968e3b74 Revert unintended change in noise glsl
buildbot/vexp-code-patch-coordinator Build done. Details
2023-09-30 17:20:50 +01:00
Charlie Jolly fd27a220a9 Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-09-30 16:11:10 +01:00
Charlie Jolly 019eb3d42f Remove anisotropic modes and replace with a Anisotropic factor that mixes between fixed anisotropic direction and isotropic direction.
Put Anisotropic controls in a separate panel.
2023-09-30 16:10:24 +01:00
Charlie Jolly 6ae35a8e02 Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-09-29 12:51:04 +01:00
Charlie Jolly 47b4cc0f45 Add origin offset to Fractal settings, see #112661 2023-09-29 12:49:16 +01:00
Charlie Jolly 64fd82ab2b Unclamp roughness similar to pending Noise/Musgrave changes. 2023-09-28 16:57:10 +01:00
Charlie Jolly edc6016a46 Merge branch 'main' into gabor 2023-09-28 16:00:54 +01:00
Charlie Jolly edb32534b0 Merge branch 'main' into gabor 2023-09-18 21:34:10 +01:00
Charlie Jolly 0583c44b03 Use cosine envelope instead of gaussian to reduce artefacts.
Change base frequency factor for better UX.
Change Bandwidth to Gain.
Add remaining sockets to Params panel, currently it is
expected that panels only appear after sockets.
Normalise omega in all cases.
Add directional randomness to all modes.
2023-09-18 21:33:22 +01:00
Charlie Jolly 7c515366bb Merge branch 'main' into gabor 2023-09-18 00:41:18 +01:00
Charlie Jolly eaf490c6e2 Merge branch 'main' into gabor 2023-09-15 14:36:55 +01:00
Charlie Jolly 9cd95748f2 Add support for panels 2023-09-13 14:34:32 +01:00
Charlie Jolly 9653d1fe17 Merge branch 'main' into gabor
# Conflicts:
#	scripts/startup/nodeitems_builtins.py
2023-09-13 10:52:00 +01:00
Charlie Jolly f2c8f0f888 Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-30 16:39:53 +01:00
Charlie Jolly 605c62c121 Move Cell Randomness to bottom like in Voronoi
Expose Isotropic direction
2023-08-30 16:37:53 +01:00
Charlie Jolly 7d9e2047da Merge branch 'main' into gabor 2023-08-30 14:37:18 +01:00
Charlie Jolly 0fbe56c39c Merge branch 'main' into gabor 2023-08-30 14:08:36 +01:00
Charlie Jolly 290e3bd066 Comments 2023-08-30 13:44:33 +01:00
Charlie Jolly 3d65b05a8b Merge branch 'main' into gabor 2023-08-30 13:43:37 +01:00
Charlie Jolly 41c3d0892a Add Hybrid back but without the length() function. This works more like a hybrid option between Anisotropic and Isotropic. 2023-08-30 13:42:13 +01:00
Charlie Jolly 335e367716 Merge branch 'main' into gabor 2023-08-30 00:09:39 +01:00
Charlie Jolly 6db2eb0023 Fix error in last commit 2023-08-30 00:08:52 +01:00
Charlie Jolly 784a1131ed Address comments 2023-08-29 15:19:07 +01:00
Charlie Jolly 8979689d8a Merge branch 'main' into gabor 2023-08-29 12:56:15 +01:00
Charlie Jolly 07b94d48e6 Merge branch 'main' into gabor 2023-08-22 10:44:02 +01:00
Charlie Jolly b4d138c959 Minor comment changes 2023-08-22 10:16:17 +01:00
Charlie Jolly fcd07d1c09 Additional comments and tidy
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-22 03:10:07 +01:00
Charlie Jolly 8fe47fde3a Merge branch 'main' into gabor 2023-08-22 02:41:02 +01:00
Charlie Jolly 70430f9a56 Change scale factor back 2023-08-22 02:40:10 +01:00
Charlie Jolly ec8bf9ba73 Use a define for seed offset 2023-08-22 02:34:46 +01:00
Charlie Jolly fec2f071d3 Don't scale phasor based on impulses as this is already normalised by default
Split fractal params from GaborParams into its own struct
Address some code comments from Omar and Hoshinova
Change default frequency to 16
2023-08-22 02:28:22 +01:00
Charlie Jolly 1f8517f17a Remove unused params 2023-08-20 22:07:00 +01:00
Charlie Jolly 0aeb0b8fe6 Skip this cells if they are too far away to contribute - from Lee Bruemmer.osl 2023-08-20 17:54:14 +01:00
Charlie Jolly 57b8b8208a Move bandwidth multiplication outside loop 2023-08-20 17:16:51 +01:00
Charlie Jolly 1b53cd0928 Change kernel to mode 2023-08-20 17:08:42 +01:00
Charlie Jolly cb921981ea Merge branch 'main' into gabor 2023-08-20 13:20:05 +01:00
Charlie Jolly 38d3511132 Match other noise behaviour when lacunarity is zero 2023-08-20 13:19:31 +01:00
Charlie Jolly 8e93e7cab7 Tweak ui 2023-08-19 19:00:28 +01:00
Charlie Jolly d8474af870 Add some missing const 2023-08-19 18:25:34 +01:00
Charlie Jolly 4627b0760c Make normalize default to on 2023-08-19 18:17:28 +01:00
Charlie Jolly 231be540a3 Fix build issues raised on build bot
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-19 17:03:50 +01:00
Charlie Jolly 403d99b5d3 Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-19 16:33:20 +01:00
Charlie Jolly a243de001a + Added Normalisation and Fractal options, removing previous implementation of fractal noise
+ Added Roughness, Frequency Lacunarity and Rotation Lacunarity to control fractal noise
+ Added 2d dimension, this computes using a 2x2 grid rather than a 3x3 grid
+ Removed Hybrid Anistropic option (can be added back but I find it is non-intuitive)
+ Added Normal UI control to Anisotropic mode
+ Remove custom RNG and use built in hash noise
+ Add entry to GN menu
2023-08-19 16:29:45 +01:00
Charlie Jolly c0805ea670 Fix issues after changes in master 2023-08-18 11:39:43 +01:00
Charlie Jolly cde5059f12 Fix unintentional change in Wave texture node 2023-08-18 10:07:22 +01:00
Charlie Jolly c6fb7f420e Merge branch 'main' into gabor 2023-08-18 10:03:11 +01:00
Charlie Jolly 3403c7722d Merge branch 'main' into gabor 2023-08-11 10:28:41 +01:00
Charlie Jolly 98b2a67673 Merge branch 'main' into gabor
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-09 19:38:04 +01:00
Charlie Jolly 303c9c72f1 Fix error on build - 'float' to 'double'
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-09 17:47:25 +01:00
Charlie Jolly 231e052cd0 Use math lib in GN
buildbot/vexp-code-patch-coordinator Build done. Details
Remove `gabor_cellhash` and use built-in hash functions. Noticed bug after switching to VS22 from VS19.
2023-08-09 16:48:24 +01:00
Charlie Jolly 4a74f488ce Merge branch 'main' into gabor 2023-08-08 19:44:03 +01:00
Charlie Jolly 9c23b24a8e Fix headers after main update 2023-08-08 19:43:40 +01:00
Charlie Jolly 940aab5f9b Merge branch 'main' into gabor 2023-08-08 16:47:58 +01:00
Charlie Jolly 4e34082370 Merge branch 'main' into gabor 2023-08-08 12:28:39 +01:00
Charlie Jolly 8496518229 Node: Gabor Noise Texture
This patch adds procedural Gabor noise.

This has implementations for Shading (Cycles, Eevee, OSL) and GN.

The noise works by splatting kernels over grid cells similar to Voronoi.

The node has controls for fractal layering and kernel shape variance.

The noise is similar to Voronoi for expense.

Shadertoy test version:
https://www.shadertoy.com/view/NtdfRj

Devtalk feedback thread:
https://devtalk.blender.org/t/gabor-procedural-texture-node/25934

Based on these patches and OSL:
https://archive.blender.org/developer/D3495
https://archive.blender.org/developer/D287

Adapted from Open Shading Language
Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
All Rights Reserved.

Gabor noise originally based on:
Lagae, A. and Drettakis, G. 2011. Filtering Solid Gabor Noise.
2023-08-04 16:30:13 +01:00