Code Monkey home page Code Monkey logo

clay's Introduction

Clay

A procedural clay shader made in Unity 3D's ShaderGraph.

Clay demonstration gif

How does it work?

  • Textured fingerprints leave dents in the normal and add smoothness to mock natural oils from skin.
  • Voronoi noise is used to flatten normals, creating a handcrafted look.
  • Perlin noise is modified to form valleys, dimming ambient occlusion and subtracting normals to create a folded appearance. (Doesn't look very good as yet).
  • Tileable Perlin noise is used to displace mesh vertices at normals to the surface, providing a seamless bumpy look.
  • Small heptagonal impurities are randomly generated on the surface. (Doesn't look very good as yet, and performs very poorly).

Installation

Open the project in Unity. Open the Purveyor of Stars scene located at clay/Assets/Scenes/.

Warning

I created this procedural clay shader as an exercise in Unity 3D's ShaderGraph.
Shaders are run every frame, and since this is an unbaked shader, it generates and then discards various noise textures each frame.
I would therefore strongly advise against using this shader in it's current state in commercial usage.
Instead, one could re-create the shader in Blender and bake it into materials and animations.
You would then benefit from peak performance, with results that you can be just as happy with!

Contributing

  1. Fork the repository.
  2. Create a branch for your feature: git checkout -b my-shiny-feature.
  3. Commit your changes: git commit -am 'Added my super shiny feature'.
  4. Push to the branch: git push origin my-shiny-feature.
  5. Submit a pull request.

All contributions big and small are appreciated and encouraged!

Credits

Fingerprints texture

Courtesy of cgbookcase.com.

All else

Is my own.

License (MIT License)

See this page for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.