Git Product home page Git Product logo

unity3d-vatutils's Introduction

VATUtils

Utils script for using VAT shader form SideFX Labs with VFX Graph Effects For more information on Vertex Animation Texture (VAT) see the SideFX Labs repository

gif

System requirements

  • Unity 2021.X
  • HDRP 12.1.X

What's in the package

This package propose a mockup of a Visual Graph Effect using Vertex Animation Textured mesh as an output. It also propose an helper script to dynamically load an set all the data (textures and variable) from the VAT exported files to the Visual Graph

How to use the VFX Graph model

img Make a copy of the VFX graph inside the package and start put all your VAT data.

How to use the Helper Script

Place all your VAT Assets inside the Resources folder (everything will be loaded from this folder) Keep the hierarchy from the Houdini export. You should have three folders per VAT

  • materials: Containing the material and json data
  • mesh: Containing the Mesh for the VAT
  • textures: Containing all the textures. You can also place your albedo, Mask and normal maps. img

Create a new scripatble object of type VATDescriptor (Asset → Create → Scriptable Object → VATDescriptor) and provide all the attributes for your VFX.

  • FolderPath: the path of your VAT folder inside the Resources folder
  • VATName: name of your VAT (Houdini exported params uses NAME_ELEMENT.extension for textures, materials and json data such as Orchide_data.json or Orchid_pos.exr for position map)
  • VFXPrefabModel: the prefab conatining the VFXGraph
  • Number of instance: number of elements spawn by the VFX
  • GlobalScale: value used for rescaling VAT on your scene
  • VFX Materials Params: Albedo, mask and normal map img

Create your own VFX graph by making a copy of the VFXGraph model in the package and place it on your GameObject. Add the BindVATParamsToVFXInGame.cs script on your GameObject and set the VATDescriptor attribute using your own. Click on Bind VATParams to VFX to bind the data to your VFX Graph

Do not hesistate to extend the VATDescriptor.cs script to dynamically provide more data to you VFX graph dynamically. See the VATFlowerPistilDescriptor.cs for an example for multiple VAT output.

You can also use the VATDescriptor.cs from script by simple calling VATDescriptorObject.InitVFX(Tranform parent) which will automatically instantiate the VFX prefab with all the data set.

Install Package

This 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": "Bonjour-lab",
    "url": "https://registry.npmjs.com",
    "scopes": [
        "com.bonjour-lab"
    ]
}

To the dependencies section:

"com.bonjour-lab.vatutils": "0.0.2",

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "Bonjour-lab",
      "url": "https://registry.npmjs.com",
      "scopes": [
        "com.bonjour-lab"
      ]
    }
  ],
  "dependencies": {
    "com.bonjour-lab.vatutils": "0.0.2",
    ...

unity3d-vatutils's People

Contributors

alexr4 avatar

Watchers

 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.