Code Monkey home page Code Monkey logo

texturegenerator's Introduction

Noise & Texture Generator for Unity

3D and 2D Texture generation using the compute shaders within the Unity engine. Image of 3D Noise

Purpose

This project handles the creation and serialization of different 3D/2D textures created via custom compute shaders. This is done through a custom ComputeTexture object.

Why

I created this asset in order to generate 3D textures for use in raymarching systems. In fact the example provided is intended for use with a volumetric cloud system as described by the wonderful people at Guerilla Games. I found 3D textures to be wonderful however the lack of support was dissapointing.

Use

There are three main scripts to know here: ComputeTexture, ComputeTexture3D, and Noise Generator. Note that since these scripts are based on MonoBehaviour they need to be attached to a game object, in the future I would rather these behave in a similar manner to Render Textures. In order to generate the completed texture you will need to provide the texture scripts with some information:

  • Asset Name - what you want the asset to be named at save
  • Kernel Name - the name of the compute shader kernel used to generate the final texture
  • RW Texture - name of the RWTexture that will be written to by the compute shader
  • Square Resolution - length, width, and depth resolution (i.e. 128 = 128 x 128 x 128)
  • Parameters - list of float values and their corresponding compute shader name
  • Compute Threads - thread counts specified in the compute shader above each kernel (Z is only used in the case of 3D textures)
  • Compute Shader - any compute shader that writes to RWTextures
  • 3D ONLY Texture 3D Slicer - compute shader that slices 3D textures to 2D layers, should be provided with the repo

References

texturegenerator's People

Contributors

mtwoodard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

texturegenerator's Issues

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.