Skip to main content

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 is here

took about 16 minutes to render that 720P frame (just a HDRI and PBR).

Here it is with the contrast centre animated in the shader:

Comments

  1. hello, how to do this after displacement please, there is no ptnum in global variables inside the shop, should we be using point clouds

    ReplyDelete

Post a Comment