Giter VIP home page Giter VIP logo

instancealongcurve's Introduction

Maya API plugin developed in Python that tries to simplify the process of instancing various objects along a curve. The plugin essentially creates a new dependency graph node called instanceAlongCurveLocator, which handles all the necessary logic. It also includes a node creation command and an Attribute Editor template for a very familiar and user friendly interface.

Short demo at: Youtube

Difference with other approaches

Because it is a DG node that is recomputed each time Maya considers necessary, there is no need to execute manual scripts or hacks or custom windows to update the instances. Also, it is very efficient in updating each instance, because every relevant instance attribute is connected to the locator, and only recomputes what is needed.

However, Maya makes instancing objects from a plugin node very difficult, so there are some known limitations.

Features

  • It's a dependency graph node, so it works gracefully with the Maya environment.
  • Instance an object by count or by distance between instances.
  • Various rotation modes, including chain mode.
  • Customize the instances transformation by ramps evaluated in curve parameter space.
  • Customize the ramps' offset with keys or expressions for animations.
  • Customize how instances look in viewport.
  • Randomize instances transformations.
  • Portable.
  • User friendly, highly flexible.

Installation

Save instanceAlongCurve.py under MAYA_PLUG_IN_PATH

  • (Linux) $HOME/maya/plug-ins
  • (Mac OS X) $HOME/Library/Preferences/Autodesk/maya/plug-ins
  • (Windows) \Users\<username>\Documents\maya\plug-ins

Instructions

To use the plugin, select a curve first and the shape you want to instance and go to Edit->Instance Along Curve. You can save it as a Shelf Button if you want.

Known issues

  • When batch rendering, if the node has complex logic depending on time, it may be necessary to bake the node and its children. In some renderers, the node is not being evaluated each frame.
  • When the instancing mode is by distance, any change on the curve length is not immediatly reflected until a change on the instancing attributes is made.

License

MIT

instancealongcurve's People

Contributors

mmerchante 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.