Convert Instancer to Geometry #2

Type: Maya Python Script (py)
Name: ark_instToGeo
Version: 2.0
Released: 2016.12.17
Download (Save as...)

Updated my old utility that converts instancer into geometry – it’s much faster and stable now, works with all rotation types (rotation and aim), has progress bars and prints final statistics into script editor.

ark_instToGeo GUI


  1. put into any Maya scripts folder (get the list with “getenv PYTHONPATH;” MEL-command);
  2. execute python-command:
  3. from ark_instToGeo import *; ark_instToGeo()
  4. select instancer(s) and press Convert button to make conversion (static channels will be deleted and euler filter applied to the result).


Conversion Type:

Start from Current Frameif enabled, no matter what playback range is set to and whether custom range is enabled or not, conversion will start from the current frame;

Playback/Custom Rangein the first case conversion framerange will be taken from playback range, in the second one – you can enter custom start/end frames;

Convertruns the conversion;

Helplink to this page.

Posted on December 18, 2016 at 17:22 by · Permalink
In: FX · Tagged with: , , , , , , , ,

48 Responses

Subscribe to comments via RSS

  1. Written by grobbio
    on 9 January 2017 at 2:08

    Hi! Thank you very much for your utility. But it does seem to work only with the first (the 0) item on the instancer’ list. Is this limitation normal, by design, it’s a bug, it’s me?

    Here’s the example file that does this (maya 2016 sp2):

  2. Written by Ark
    on 9 January 2017 at 14:41

    Hi. You’re using ‘cycle’ option to randomize objects – I’ve never used it this way and haven’t accounted for that, so, yep, that’s a limitation and I will add it in the next version. But you can always use the ‘usual’ method – set ‘cycle’ to ‘none’ in instancer, create per-particle attribute with random number and plug it into ‘Object Index’. Check this scene:

  3. Written by grobbio
    on 9 January 2017 at 14:51

    Thank you very much for your great, fast answer and suggestion!

  4. Written by James Bond
    on 10 January 2017 at 17:44

    Awesome! Thanks 🙂

    Might help if it was possible to stop the conversion with ESC

  5. Written by Ark
    on 13 January 2017 at 1:56

    Yep, I’m looking into that 🙂

  6. Written by Daniel
    on 9 May 2017 at 6:04

    Hello Ark! just a quick question, does this works with maya 2017? Im trying to use it and my viewport freeze when I click on convert

  7. Written by Ark
    on 12 May 2017 at 13:17

    Hi Daniel. It works in 2017. In this version I’ve disabled viewport update, since it’s much-much faster this way – you should see progress bars moving though, that means everything is working. If not – send me your scene and I’ll check what is going on.

  8. Written by JC
    on 15 May 2017 at 1:47

    Hi Ark, I created a lot of meshes using the duplicate option and it works great but all the objects are hidden within its own group, is this working correctly?…I mean, do I have to unhide them all manuallly?
    Whats the purpose of the groups and the meshes to be hidden by default?
    I´m using Maya 2017 Update 3.
    Thank You very much 🙂

  9. Written by JC
    on 15 May 2017 at 1:51

    Don´t worry, I ungrouped everything, my fault…thank you so much for your good work 🙂

  10. Written by Aydar
    on 5 June 2017 at 14:11

    Arkady, thank you, works better than on the Sawa.

  11. Written by VP
    on 8 June 2017 at 14:49

    This script is amazing! Thank you!

  12. Written by hengki setiawan
    on 13 June 2017 at 5:26

    thanks for this script, the script its so cool 😀

  13. Written by NNN
    on 14 July 2017 at 8:12

    I can’tt convert instancer to geometry by using the rotate expression.
    it said the problem is from line 397. (list index out of range)
    Other thing else is fine.
    Please help!

  14. Written by Ark
    on 14 July 2017 at 13:50

    Rotation expressions should work. Please, drop me a simplified scene with this problem and I’ll take a look.

  15. Written by Elaine
    on 14 July 2017 at 18:28

    Getting an error on convert, is there something I am missing or need to try?

    C:/Users/name/Documents/maya/2016/scripts\ line 198: No object matches name: Dressing01ModelGeoPublish_v004:forest_2:rotation.instanceAttributeMapping #

  16. Written by Ark
    on 14 July 2017 at 19:09

    Please, check if the sample scene works for you:

    And email me your scene with the problem.

  17. Written by Elaine
    on 14 July 2017 at 20:25

    Ark, example scene works great!

    Emailing scene in the next 10 mins.

  18. Written by Elaine
    on 14 July 2017 at 20:39

    Email sent, subject line

    “No object matches name: Dressing01ModelGeoPublish_v004:forest_2:rotation.instanceAttributeMapping #”

  19. Written by Chris Leathers
    on 27 July 2017 at 3:49

    this is awesome, just what I needed great script.

  20. Written by Srinivas Tentu
    on 8 August 2017 at 5:08

    Hi Ark, Congrats for developing a wonderful script.

    I created a lot of meshes using the instance option and it works great but all the objects are hidden within its own group. Do I have to unhide them all manuallly? Whats the purpose of the groups and the meshes to be hidden by default?

    How to unhide all the meshes without manually unhiding one by one? Is there any possibility to do that. It’s urgent requirement for me.

    Ungrouping all the meshes looses animation keys as keys are applied to group nodes. How to solve this?

    Any help would be highly appreciated.
    Thanks a lot for a great script.

  21. Written by Srinivas Tentu
    on 8 August 2017 at 5:47

    Got the solution unhiding all the meshes in groups.
    Used Select > Hierarchy option to select all the meshes inside the group nodes and visibility turned on for all the meshes in a single click.

    Wonderful script & working great.
    Thanks a lot again.

  22. Written by Ark
    on 8 August 2017 at 10:23

    Hi Srinivas. Yes, the script just takes whatever settings you have on your original objects, including animations and so on. So, to make duplicates/instances visible, you need to have original objects visible.

  23. Written by Andy Howell
    on 18 August 2017 at 14:17

    Just used your script, worked a treat.
    Thank you very much

    Brilliant Stuff !!!

  24. Written by tamanegi
    on 16 September 2017 at 7:28

    Started a conversion on a scene with about 500,000 particles instanced by a small 4 poly pyramid, set the range to be one frame – its been running for the past 2 hours – pretty fast system. Think that’s normal to take so long? I can’t see the status bar as I opened a window over Maya and if I try to bring Maya back to the front it never refreshes the window to see if its processing.

  25. Written by Ark
    on 16 September 2017 at 9:01

    The problem is in the task you’re trying to accomplish – 500,000 separate objects in maya scene is a heavy thing, 4-poly or even empty groups. Instances are even slower. I haven’t done more than 100,000 (duplicates), it took about 10min to convert. Working with such a scene was very problematic though. So, try smaller particle count and duplicates mode, if it’s fast enough for you, switch to instances (if you need them, of course), then increase particle count.

  26. Written by TTT
    on 17 November 2017 at 14:34

    It would be great if the script duplicate the objects with their input graph.

  27. Written by Ark
    on 19 November 2017 at 21:26

    If you want to change the history of the original object and have those changes affect the duplicates – use ‘hybrid’ mode. If you want each duplicate to have it’s own copy of the history – that seems like a very special case to me, I’ll send you a modified script to email that works like this.

  28. Written by Mikhail
    on 8 December 2017 at 16:05

    It is working perfectly! Thank a lot!

  29. Written by Deepak
    on 11 April 2018 at 12:59

    i have a bee animation instanced onto particle and used object index expression to cycle through objects, so it looks like animated,
    But when i try and bake it, maya freezes, Any solution.

  30. Written by Ark
    on 11 April 2018 at 16:12

    Instead of cycling different meshes with index, plug the animated/rigged geometry into instancer (if you absolutely need to use separate meshes – use them as blendshape targets for a single final geometry – and plug this single final geometry into the instancer). This way my tool will work nicely and you will have a proper motion blur as well.

  31. Written by Frank Robbins
    on 30 April 2018 at 7:40

    You are a life saver. Thanks!

  32. Written by Brent
    on 17 October 2018 at 9:09

    god bless you sir

  33. Written by nader
    on 13 January 2019 at 20:10

    thanks a lot

  34. Written by Andrew Pace
    on 22 March 2019 at 21:15

    This doesn’t seem to work with nParticles. Is there a line of code that can be changed or is it a whole re-work? Thanks!

  35. Written by Thomas Lisle
    on 23 March 2019 at 18:15

    hi. many thanks for making this available. does it work on a Mac Maya 2019 as I run the script and nothing happens bo ho. really need to convert my instances to mesh !!!

  36. Written by Ark
    on 23 March 2019 at 20:29

    It should work fine with nParticles, but it has a ton of additional options that can be not supported – check what you use for instancer channels mapping (position, scale, rotation, etc.), you’re probably using it’s built-in ramp or something like that – disable it or recreate with custom per-particle attribute instead.

  37. Written by Ark
    on 23 March 2019 at 20:32

    I don’t have mac and can’t check it. Works fine in 2019 Win though – have you tried the example scene?

  38. Written by jack liu
    on 26 September 2019 at 9:22

    Thanks, man, this works and helped a lot.

  39. Written by patrice
    on 24 October 2019 at 13:59

    Hello again ArkGenius!

    So I looked through your documentation and found the geo shapes to be instanced had to live at the origin. I moved the geo and your script worked perfectly!

    Thanks again for your great work!

  40. Written by Sheshadri Gangavatikar
    on 27 March 2020 at 3:21

    # Error: IndexError: file line 407: list index out of range

  41. Written by raymundo oliveira
    on 14 April 2020 at 16:08

    What a great script! This should be implemented in Maya. I was looking for this kind of solution for days.

    Keep it up.

    Congrets for the great work.

  42. Written by Ark
    on 14 April 2020 at 16:28

    It’s hard to tell without looking at your scene… Something unexpected in the way you use your particles/objects. Try example scene, try default particle system to see what exactly is different in yours.

  43. Written by ER
    on 25 August 2020 at 10:15

    Thank you so much! Works great in Maya 2016 (High Sierra).

    Kind regards,
    – ER

  44. Written by FabianMG
    on 26 August 2022 at 1:07

    Worked like a charm, saved one of my projects

    Great work, thanks!!

  45. Written by Andrew Rubsov
    on 29 December 2022 at 18:16

    Hello, I’m trying to install the script in Maya 2022, I’m doing everything as instructed and I’m getting this error:
    # Error: ModuleNotFoundError: file line 1: No module named ‘ark_instToGeo’
    What is the problem? I am completely zero in scripts and do not understand what I’m doing wrong. I will be glad to feedback.

  46. Written by Matthew
    on 1 October 2023 at 21:42

    When I tried to run the python script I got this error message:

    # Error: Missing parentheses in call to ‘print’. Did you mean print(…)?

  47. Written by Ark
    on 2 October 2023 at 7:45

    Latest Maya (2024, at least) has switched to another version of Python that has some new strict rules… My tool needs an update. I’ll try to make it soon, but for now you can try to use it in older Maya (2020) and import the results to your latest scene.

  48. Written by Ark
    on 2 October 2023 at 7:56

    You’re putting the script into wrong folder, so, Maya doesn’t see it. You need to put it in your default ‘scripts’ folder in your user preferences.

Subscribe to comments via RSS

Leave a Reply