1.0.1 • Published 3 years ago

com.dss.procedural-stochastic-texturing v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

procedural-stochastic-texturing

Heavily based on UnityLabs implementation. Their original readme is included below the line break.

I just updated it to work in the latest Unity version, and added ShaderGraph nodes for easier sampling in ShaderGraphs.

How To Install

The procedural-stochastic-texturing package uses the scoped registry feature to import dependent packages. Please add the following sections to the package manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
  "name": "DSS",
  "url": "https://registry.npmjs.com",
  "scopes": [ "com.dss" ]
}

To the dependencies section:

"com.dss.procedural-stochastic-texturing": "1.0.0"

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "DSS",
      "url": "https://registry.npmjs.com",
      "scopes": [ "com.dss" ]
    }
  ],
  "dependencies": {
    "com.dss.procedural-stochastic-texturing": "1.0.0",
    ...

alt text

Procedural Stochastic Texturing

This repository offers two implementation of our procedural stochastic texturing prototype for Unity. For a certain class of textures called stochastic textures, it solves the issue of tiling repetition when tileable textures are repeated across a surface. This allows using smaller textures, achieving higher levels of detail and texturing larger surfaces without the need to hide the repetition patterns.

How to use

  1. Create a ProceduralTexture2D asset using right click/Create or Assets/Create. Assign the desired texture input, select its type (Color for strictly color information such as albedo or emission, Normal for normal maps, Other for other data such as occlusion, roughness, height, etc.) and hit Apply.

  2. In a ShaderGraph, add a new StochasticSample node and hook up the inputs as generated by the ProceduralTexture2D asset.

Notes

  • Make sure a normal texture is imported as a Normal map in its import settings before using it with a ProceduralTexture2D asset.
  • Large input textures might take a while to pre-process.

Read More

This work is the implementation of two recent research publications at Unity Labs, which are the best resource for understanding the technique in detail.

Paper: High-Performance By-Example Noise using a Histogram-Preserving Blending Operator

Technical chapter: Procedural Stochastic Textures by Tiling and Blending

The comments in the code refer to specific sections of the Technical chapter.

1.0.1

3 years ago

1.0.0

3 years ago