nReplicate 0.5.1 BETA
Copies any object, light or camera onto the points of a target polymesh or surfacemesh object.
Press Stop!
The script is still being developed as we speak. I'm in the middle of a another job right now which sucks up all my time, but as soon it is finished I will get back to finishing it. Sorry for the delay. :/

Installation
There are three possible ways to install this script:
1) Copy it into the user, factory or workgroup property plugin directories (you can create the directory if it is not yet present) e.g. %XSI_USERHOME%\Application\Commands
OR
2) Use XSIApplication.LoadPlugin() to load it from any directory
OR
3) Add this line to your setenv.bat file and restart XSI:
set XSI_PLUGINS=%XSI_PLUGINS%;C:\MyCustomPath
Location
I haven't decided where to put the script yet but it is for located for the moment at the bottom of the Get->Property tab.
A "[c]" symbol appears next to the name if you decide to install the script outside the default drop-location.
In Development
A new mode is currently under development. This mode applies a scripted operator on each instance which allows animatable parameters. Stay tuned. |
 |
Usage
1) Select your source object, light or camera.
In this example we have a cylinder (source) and a grid (target).
2) Execute the script from the Get->Property tab (Fig.01)
3) A picking session starts.
4) Select your target which can either be a polymesh or a surfacemesh object.
5) A dialog box appears which prompts you to select a replication mode. Available options are Instantiate, Clone and Duplicate. (Fig.02)
6) Press OK to start the replication process. Have a coffee while it processes the data. (Fig.03)

7) Once finished, the main nReplicate property page appears. Here you can specify a number of options on how to randomise the objects. (Fig.04)
8) Have a play with the settings until you achieve a look you want. (Fig.05)
Options
The options on the property page are pretty self explanatory but here's a summary of the widgets in case you get lost. ;) |
| Random Scaling |
There are two values for each axis. The Minimum and Maximum Random Scaling for the XYZ axes. |
| Random Rotation |
There are two values for each axis. The Minimum and Maximum Random Rotation for the XYZ axes. |
| Random Translation |
There are two values for each axis. The Minimum and Maximum Random Translation for the XYZ axes. |
| Random Size |
There are two values: Minimum and Maximum Size. |
| Random Source |
Allows you to specify a new random seed. |
| Limitations |
| ● |
|
The script WILL fail if the target object is changed. You can however freely scale, rotate and translate the object as long as the point count remains the same. |
The Story So Far
The idea behind this script came from a plug-in for LightWave called PointClonePlus+. I used it frequently when I wanted to quickly generate an array of random objects such as rocks, trees and grass. Moving to XSI I still found the need of a tool like this but was dissapointed when there wasn't any. So, I decided to get my "hands dirty" and see if I could make one myself. And the result is what you have here. At the moment of writing it's still a work-in-progress, but seems to work reasonably well on scenes with a low to medium polycount... (?)
There are still a number of things that I want to add but due to time constraints this won't happen over a night. In the meantime I would like to hear your comments, suggestions or if you find any bugs. I know that its very slow with 1000+ instances but as I learn more about scripting I might be able to find some way to optimise it a bit more. Another option I've been looking into is to port it to C++, but that won't happen over night either. ;-)
|