Instance Tool

51 votes
Version: 
2.6
Date Updated: 
09/23/2020
Author Name: 
Matan Halberstadt

Instance tool analyze the geometry objects in the scene and finds groups of objects that could be represented as instances of one of them. Then the user can turn every group into actual instances and choose which object from the group will be preserved. The objects in the group are objects that have the same topology (could be morph targets of one another) and the difference between them could be described with transformation alone. After making a group into instances, all the objects in the group except the master object will become instances of the master and a new transformation value (position rotation and scale) will be applied to transform them back to their original shape and orientation.

 

The advantages of using instances over just copies of objects are:

  1. It saves storage space.
  2. It saves memory.
  3. It saves render time.
  4. It saves work time (modifying one instance effect all of them, like uv mapping).

 

Updates:

version 2.6

  • fix an error with corona scatter

version 2.5

  • fix for the "undefined to integer" error (tested and confirmed on 2019)
  • fix for issues with "preserve pivot"

version 2.4

  • Added Group by Material ID checkbox - if checked, only objects with the same material ID setup will be grouped as instances.
  • UI is now resizeable on the height axis.

version 2.3

  • Added Group by Scale checkbox - if checked, only objects with the same scale will be grouped as instances.
  • Added Group by Material checkbox - if checked, only objects with the same material will be grouped as instances.

 version 2.1

  • "-- Unknown property: "getName" in undefined" error message in early max versions is now fixed.

version 2.0

  • All mesh geomety is now supported including Editable mesh, Editable poly and primitives.

Installation:

 

  1. Drag and drop the mzp file into the viewport, the tool will pop up.
  2. Go to Customize -> Customize user interface.. -> Toolbars tab
  3. Under the category "Snowball VFX" you will find the InstanceTool, drag it into a toolbal.
  4. Enjoy.

 

 

UI description:

 

  • Get groups Button: analyze the scence and collect the potential groups. In no objects are selected, the whole scene will be analized, but if there are selected objects, only groups containing at list 1 selected object will be created (this will take less time).
  • Tolerance Spinner: set the maximum distance alowed for every vertex of an object to move from it's original location in order to become instanced to another object.
  • Ignore hidden objects CheckBox: If checked, it will ignor hidden objects.
  • Random wirecolor per group CheckBox: if checked, every group will recieve a unified  random wirecolor.
  • Instance selected group Button: Make the selected group in the Groups listbox into instances of the master object.
  • Instance all groups Button: Make all groups into instances.
  • Groups ListBox: Shows all the found groups after the analyze is done, and let the user select a group. Double clicking the group will select the objects of the group in the scene.
  • Remove selected group Button: Delete the selected group from the list.
  • Group Membets ListBox: Shows the objects in the selected group. Selecting an object from the list will select it in the scene. Double clicking an object in the list will set it to be the master (the master is the object that has the prefix ">>" in the list. This is the object that will not be changed at all when instancing the group, all the other objects will become instances of it).
  • Remove selected Object Button: Delete the selected object from the group.
  • Attach selected group Button: Attach all the members of the selected group into one mesh.
  • Attach all groups Button: Attach all the groups, every group will become one mesh.
  • Detach selected objects Button: this option is only available if you are running snowball pipeline for now.
  • Select instances: Select all the instances of the selected objects in the scene.

 

Instance tool UI

 

Links:

http://www.snowballvfx.com/

http://cargocollective.com/matan#1450373/Instance-tool

Version Requirement: 
Tested on 3ds Max 2019
Video URL: 
AttachmentSize
instancetool_dragdrop.mzp110.32 KB
instancetool_help.pdf88.78 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matan's picture

the script only works on

the script only works on editable mesh objects, convert these boxes to editable mesh and try again

visit my portfolio at http://cargocollective.com/matan3D

dddesign's picture

sry but it does nothing

when I click the Get groups button nothing happens! It´s a scene with some copys of a cube.
tested in max2011 and max2012...

crystal3d's picture

this has been tried before but none could achieve a realible

solution and i am curous about what it does...thank you for sharing already

Matan's picture

Alex thanks for the reply,

Alex thanks for the reply, There is no reason for it not to recognize mirrored objects. I would appreciated it if you could send me a scene with 2 objects that are mirrors of each other and that the tool doesn't recognize. Cheers, Matan.

visit my portfolio at http://cargocollective.com/matan3D

Alex Morris's picture

It doesn't seem to pick up mirrored objects

This is a huge time saver but I've noticed that it is not recognising some mirrored geometry as potential instances.

Matan's picture

"when I use it it messes up

"when I use it it messes up my mapping on the new instances. Any idea?"

This is because when instancing a group, the script copies the base object of the master to the rest of the group. Any difference between the base objects will be lost once instanced. However ant modify will be saved. So in order to keep the mapping you will have to make sure the mapping data is saved in the modify stack and not in the base object. If you have already collapsed the stack you can use a "UVW Mapping Paste" modifer to extract the mapping data to the stack.

"It also seems to to mess up any animation on the objects"

This is because when instancing the objects I change their transformation. (This is the opposite operation of reset xform)
You can keep the animation intact by creating a dummy to hold the animation for the geometry and to act as their parent.

visit my portfolio at http://cargocollective.com/matan3D

silencer77's picture

Now nothing happens for me

Now nothing happens for me also. It just worked but now it doesn't. Strange

silencer77's picture

It also seems to to mess up

It also seems to to mess up any animation on the objects

silencer77's picture

extremly useful. However when

extremly useful. However when I use it it messes up my mapping on the new instances. Any idea?

Matan's picture

You might be using the tool

You might be using the tool wrong.
Is it working for you on a previous version of max?
Could you send me an example scene?

visit my portfolio at http://cargocollective.com/matan3D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.