Hi all, I have been trying to solve a problem for my scene involving instances.
For scattering hundreds of object in my scene I use Phantom Scatter, and it's great.
However, I need to place a bunch of items in a specific way, and I need to have artistic control to where they are and how are they rotated and scaled, so I need to see the actual object while I'm placing it, to make sure they are placed correctly.
So here's my question, is there a way I can use Maya to manually place my objects, and then convert the position, rotation and scale into a .csv file for Octane?
My ideal workflow would be:
- import my object in Maya
- duplicate it a bunch of times and manually place it in the scene (including scale and rotation)
- select all the objects I placed, and export them as .csv for Octane standalone.
Is that possible?
Need help about scatter from Maya to standalone
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Last edited by Rikk The Gaijin on Sat Jul 02, 2016 6:51 am, edited 2 times in total.
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
I found this old post about the same topic: viewtopic.php?f=28&t=22612
But the linked website doesn't exist anymore
But the linked website doesn't exist anymore

Yes it's possible.Rikk The Gaijin wrote: My ideal workflow would be:
- import my object in Maya
- duplicate it a bunch of times and manually place it in the scene (including scale and rotation)
- select all the objects I placed, and export them as .csv for Octane standalone.
Is that possible?

Here is my simple mel script to do that,
Just select the objects you want to output as octane scatter matrix and run the script.
The script prints numbers list in the script editor, just copy this list and past it directly in a scatter node in Standalone,
or paste the list in a text file with .cvs extension.
Code: Select all
{string $selection[] = `ls -sl -tr`;
int $n = 0;
string $octMatrix[] ;
for ($transform in $selection) {
float $matrix[] = `xform -q -ws -m $transform`;
$octMatrix[$n] = $matrix[0]+" "+$matrix[4]+" "+$matrix[8]+" "+$matrix[12]+" "+$matrix[1]+" "+$matrix[5]+" "+$matrix[9]+" "+$matrix[13]+" "+$matrix[2]+" "+$matrix[6]+" "+$matrix[10]+" "+$matrix[14]+" ";
$n=$n+1;
}
print $octMatrix;
}
EDIT: corrected a mistake in the script (forgot the world space tag in xform).
Last edited by calus on Wed Jul 13, 2016 12:29 am, edited 1 time in total.
Pascal ANDRE
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Hi calus, thank you so much for the script, however it doesn't seem to work properly.
When I paste the matrix values into the scatter node in Octane Standalone, all the objects scale and position are completely wrong...
Do I need to do something special? Any idea?


Hi Rikk,
I think this is the script you're looking for. I use it right now with maya and the standalone while waiting for the maya plugin
, works well for me!
I think I got it from you're link above.
Hope it'll help.
I think this is the script you're looking for. I use it right now with maya and the standalone while waiting for the maya plugin

I think I got it from you're link above.
Hope it'll help.
- Attachments
-
- octaneInstancer.zip
- (2.64 KiB) Downloaded 226 times
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Hi spark31, how are you supposed to use it? I select my objects and run the script, but the only thing I get is a bunch of Syntax Error messages.spark31 wrote:Hi Rikk,
I think this is the script you're looking for. I use it right now with maya and the standalone while waiting for the maya plugin, works well for me!
I think I got it from you're link above.
Hope it'll help.

I just try in maya 2016 (sp4) and it's working for me, weird.
Yes I just select some objects (works with groups too) run the scripts ("octaneInstancer;") and a menu appear with some options. click Export, save the csv file.
Let me see I can record a movie from maya maybe
Yes I just select some objects (works with groups too) run the scripts ("octaneInstancer;") and a menu appear with some options. click Export, save the csv file.
Let me see I can record a movie from maya maybe
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Ok, I managed to make it run, but now when I click Export I get another error "//Error: line 43: Cannot find procedure "octaneInstancerFile".
Are you sure there isn't another script called octaneInstancerFile.mel?
Are you sure there isn't another script called octaneInstancerFile.mel?
Yes sorry it's the only one I have, I don't think there is another one 

- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Where did you copy the mel file? In what folder?