"Ashima" Vertex Noise with Lighting and Texture (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution
Date: 2012.09.01
Compatibility: 10.5, 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

Per the conversation here: http://kineme.net/forum/DevelopingCompositions/Environmentmapsandvertexn...

I decided to put together an example over morning coffee.

This is a GLSL shader that "intercepts" the lighting position, diffuse, specular, and shininess, etc., and basically just sets up a Blinn-Phong model lighting using that info - so Lighting patch controls can be used as expected.

Then I added the popular "ashima arts" perlin noise implementation that's been kicking around that I've been seeing in the frag shaders, but placed in the vertex shader - so that there's some tweakable exposure (though I don't really recommend it) instead of just invoking the default noise function.

Udart's picture
Re: "Ashima" Vertex Noise with Lighting and Environment ...

Thank you for an inspiring example. I like the noise implementation. Very smooth. Strictly speaking though this is an example of texturing and not environment mapping as an environment map should create a reflection relative to the placement of the object in space instead of to the object.

gtoledo3's picture
Re: "Ashima" Vertex Noise with Lighting and Environment ...

Oh, interesting point. The orange book environment map shader does that? I'll have to take another look at that. I'll retitle this :)

gtoledo3's picture
Re: "Ashima" Vertex Noise with Lighting and Environment ...

Hey thanks for that note again; I was just looking over the 3D labs classic environment map. One cool thing I just learned out of it is the "reflect" keyword in GLSL. I'd never noticed that, and always did more complex stuff to get that result.

I like the Ashima / Perlin noise implementation as well. I made a 2D filter awhile back that implements it in the fragment shader, with a few settings that use a feedback loop as a low rent way of getting normals for a lighting effect too.

http://kineme.net/composition/gtoledo3/AshimaNoiseExternalTextureWarp