Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

New Core Image Procedural Noise Generators for Filterpedia

DZone's Guide to

New Core Image Procedural Noise Generators for Filterpedia

In image processing a noise potentially annoys. But in some cases it embellishes. This short article describes some interesting applications of purposeful distortion.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.


One of the great advantages of Core Image Kernel Language being such a close relative of GLSL is that I can scour through sites such as Shadertoy and GLSL Sandbox and copy some of the amazing work produced by their contributors pretty much verbatim to create new Core Image filters. 


Two such examples my CausticNoise (based on this Shadertoy project) and VoronoiNoise (based on this GLSL Sandbox project) filters. Both of these generator filters have now been included in Filterpedia and can be used like any other Core Image filter. 


Caustic Noise

Caustic Noise generates a tileable and animatable noise reminiscent of the caustic patterns you may see at the bottom of a swimming pool. On its own, it creates a nice effect, however, I've chained together with my height field refraction kernel that powers my RefractedTextFilter, to create a CausticRefraction filter:











Since the filter is animatable by its inputTime attribute, it works very nicely with live video. My NemoCam project applies caustic refraction to a live video feed from an iOS device to give a wobbly, underwater effect:

Voronoi Noise

Voronoi noise (also known as Worley or cellular noise) is created by setting the color of each pixel based on its distance to the nearest randomly distributed point. This filter is also animatable (as you can see above) by incrementing its inputSeed attribute. 


Using my normal map filter, both of these noise generators make excellent sources for normal maps for SceneKit materials:



Core Image for Swift 

If you'd like to learn more about the power of Core Image for generating textures, including how to leverage Metal compute shaders to create other types of noise, may I recommend my book, Core Image for Swift.


Core Image for Swift is available from both Apple's iBooks Store or, as a PDF, from Gumroad. IMHO, the iBooks version is better, especially as it contains video assets which the PDF version doesn't.


Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
image processing ,core image filters ,swift

Published at DZone with permission of Simon Gladman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}