GithubHelp home page GithubHelp logo

mayacgfx's Introduction

Maya CgFX Shaders

Simple NPR shader demos in Maya. This package includes the following NPR techniques.

  • Lit-Sphere [Sloan et al. 2001]
    • View-dependent texture map to capture artistic shading styles.
  • X-Toon [Barla et al. 2006]
    • Extension of cartoon shader for providing additional shading behavior with a 2D texture.

Result

Lit-Sphere

Lit-Sphere

X-Toon

X-Toon

Usage

Directory Structure

  • [ShaderName]
    • cgfx: CgFX shader files.
      • [ShaderName].cgfx: main CgFX shader file.
      • builtInMatrix.cgh: Maya built in matrix declaration.
    • sourceimages: sample texture files for the shader.

Maya

You can use these CgFX shaders (LitSphere.cgfx or XToon.cgfx) from a built-in Maya CgFXShader material node.

  1. Load the CgFX shader plug-in.
    • Window > Settings/Preferences > Plug-In Manager
    • In the Plug-In Manager, Load the cgfxShader.mll plug-in.
  2. Create a CgFX shader material.
    • Right-click the target object and select Assign New Material.
    • In Assign New Material window, select the CgFX Shader material from the Maya > Surface list.
    • The CgFXShader material node appears in the Attribute Editor.
  3. Load the target CgFX shader file (LitSphere.cgfx or XToon.cgfx).
    • From the CgFX File attribute, you can load the .cgfx file you want to use.
    • The CgFX shader plug-in automatically loads shader attributes.

Shader Attributes

Lit-Sphere shader attributes.
Attribute Description
colorSampler (Color Map) Texture attribute for the Lit-Sphere shader.
- sourceimages/LitSphereTexture.png can be used for testing.
X-Toon shader attributes.
Attribute Description
Light Position Point light location for the illumination.
XToonSampler (XToon Map) Texture attribute for the X-Toon shader.
- sourceimages/XToonSilhouette.png can be used for silhouette effect.
- sourceimages/XToonSpecular.png can be used for specular effect.
Show Diffuse Show diffuse shading term.
Show Specular Show specular shading term.
Show Silhouette Show silhouette term.
Silhouette Effect 0: 2D texture is used for specular effect.
1: 2D texture is used for silhouette effect.

License

The MIT License 2015 (c) tody

mayacgfx's People

Contributors

tody411 avatar

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.