Maya API Plugin - Instance Along Curve


#1

Hey there!

I wanted to share with you a plugin I recently finished for instancing objects along a curve in Maya. It is a dependency graph node, so it is more efficient and usable than other approaches.

C&C appreciated!

Download Link:
http://mmerchante.github.io/instanceAlongCurve/

More info:
https://github.com/mmerchante/instanceAlongCurve

Demo:

//youtu.be/k4i_dZjxVr0


#2

This seems more about having created something useful and being willing to share than it is about code.
I’m moving it to the main forum so it gets more attention. If you have section and code specific items you’d like to receive comments on then feel free to post something more specific in the code section.

Thanks for sharing.


#3

Yeah, great looking plugin, and code as well. Thanks for sharing.

David


#4

No problem, thanks! Didn’t know where to post it :slight_smile:


#5

Thanks!
Btw, your blog is awesome, and is a very useful resource for learning! It helped me a lot.


#6

Thank you very much for this plugin, Mariano!

I do have a question, maybe someone can help me with. Is there any way to “lock” an axis, regarding the instances following the curve?

I’m trying to instance some fence sections and it’s working just fine, but not all my terrains are flat. If I pull or push the CVs up or down to match my terrains, the instances have a tendency to rotate on multiple axes (of course, as predicted) but I’d love to have them stay straight up and simply translate up or down.

Here’s a screenshot of the issue:


#7

Hey InfernalDarkness, thanks!

I think locking an axis would be a good feature to add, I’ll think about that.

For your problem, I think the best way would be using the manipulator mode and add explicitly tell the plugin how you want stuff oriented. You can enter this mode by enabling manipulators and clicking on the Edit manipulator button in the Attribute Editor while selecting the plugin node :slight_smile:

I hope that helps!


#8

Thanks for your prompt reply!

It does help, a lot. In the few spots I can’t get it to look okay, I can always select those aberrant instances and hide them, and plop in a fence chunk manually too. I had previously done several hundred meters of this fencing by hand, but then wanted to make changes to the landscape and of course that’s not dynamic, and terribly time-consuming.

Your tool is saving me tons of time, thanks again for sharing it with us. :slight_smile:


#9

I’m glad it’s helping you! Yeah, unfortunately the way Maya handles curves complicated orientation a bit, thus I added the manipulators. But locking axis sounds interesting, I’ll see if I can add it later.

Btw, Maya now includes the MASH plugin which kinda has all the same features and more, check it out!


#10

Wow, this looks great! Thanks a lot for sharing. :slight_smile:

Cheers!


#11

I’ve looked into MASH a bit, but since I’m still using Maya 2015 and mental ray for most of my work (and all of my artwork), there’s not as much integration as in newer versions of Maya. It was a bit wieldy and clumsy for me. I also played with SOUP a bit, but found myself lost in it. So far, your plugin, Environment System, and spPaint3D are my main tools for environment layout creation and they’re pretty good. :slight_smile: