Skip to main content

Posts

Showing posts with the label occlusion

Wear Shader

Just playing around with shaders - curvature and occlusion in SOPs to make a wear shader. In SOPs, made a little curvature vopsop. It is a vopsop to do curvature since the curvature SOP doesn't give a normalised result. Inside the vopsop, the neighbors of a point are looped through and the dot product of the direction to a neighbor and N is averaged for all neighbors. I shamelessly copied the idea from Dan: And some occlusion in SOPs, done in SOPs so that it only needs to be done once for all frames This is mashed a bit to get the result I want: Mult the two together: This is to represent where the surface is likely to get worn or chipped. I started with the default reflective shader and added a displacement shader that gets the wear attribute, mults it with noise, then that goes through a contrast function to give a sharp edge. That 'matte' is exported to the surface shader to control a few things in there like reflections, colour etc. hipnc file i...