Scatter CSV format

Forums: Scatter CSV format
A public forum for discussing and asking questions about OctaneVR.

Scatter CSV format

Postby chrisw69 » Wed May 30, 2018 1:11 am

chrisw69 Wed May 30, 2018 1:11 am
Hi All,

I'm trying to write a scatter CSV file exporter, but cant seem to find any info about the file specs. The documentation seems very light - it specifys there need to be 12 float values to make 1 transform, but doesnt say what order the values should be output as. Through trial and error, I've found the 4th, 8th & 12 value are the X,Z & Y position values from Max, but cant seem to work the rest out - is there any additional documentation on this?

I would have posted this in a more appropriate sub forum but this one seems to be the only one I can post to (though this is unrealted to VR)

I also cant seem to search the forums, as apparently there is a spreadsheet somewhere which converts Modo values to Octane CSV values - which should give me the info I need, but I'm unable to search for it :(
chrisw69
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Sun Feb 18, 2018 10:31 pm

Re: Scatter CSV format

Postby aoktar » Wed May 30, 2018 1:21 am

aoktar Wed May 30, 2018 1:21 am
Check this quote from my codes
Attachments
a1.jpg
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 12263
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: Scatter CSV format

Postby chrisw69 » Thu May 31, 2018 12:18 am

chrisw69 Thu May 31, 2018 12:18 am
That's brilliant thank you!
chrisw69
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Sun Feb 18, 2018 10:31 pm

Re: Scatter CSV format

Postby paride4331 » Thu May 31, 2018 7:12 am

paride4331 Thu May 31, 2018 7:12 am
Hi chrisw69,
this 3dsMax script should work:

Code: Select all
(
FileName = GetSaveFileName types:"object coordinates |*.csv|" filename:selection[1].name
if FileName == undefined then Exit
File = CreateFile FileName
InstanceObjs = #()
for obj in geometry where (instanceMgr.getInstances obj &instances) > 1 and (findItem instanceObjs obj) == 0 do
join instanceObjs instances
for obj in InstanceObjs do
(
tr = obj.transform as matrix3
c1 = tr.row1 [1]
c2 = tr.row3 [1]
c3 = -tr.row2 [1]
c4 = tr.row4 [1]
c5 = tr.row1 [3]
c6 = tr.row3[3]
c7 = -tr.row2 [3]
c8 = tr.row4 [3]
c9 = -tr.row1 [2]
c10 = -tr.row3 [2]
c11 = tr.row2 [2]
c12 = -tr.row4 [2]

Format ("% % % % % % % % % % % %\n") c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 to:file
)
close file
print "File was created"
)


Regards
Paride
Attachments
scatter.rar
(476 Bytes) Downloaded 88 times
Win 7 / i7 5930 - 32gb / 1 x quadro K620 / 2 x Evga Titan X Hybrid
User avatar
paride4331
Octane Guru
Octane Guru
 
Posts: 2516
Joined: Fri Sep 18, 2015 7:19 am

Re: Scatter CSV format

Postby roeland » Fri Jun 01, 2018 2:20 am

roeland Fri Jun 01, 2018 2:20 am
You can check in standalone by selecting a scatter node and clicking the Edit button in the Node Inspector.

The format is as follows (with a few spaces added for clarity):

Code: Select all
M00 M01 M02 M03 M10 M11 M12 M13 M20 M21 M22 M23 ID
1   0   0   10  0   1   0   20  0   0   1   30  40

First there is a header with column names. The Mxx columns are the matrix elements, these are the first 3 rows of a 4×4 transform matrix (the 4th row by definition is (0, 0, 0, 1). The ID column is optional and contains the instance IDs.

Then there is the table with values.
The example above contains one instance with a translation of (+10, +20, +30) and instance ID 40.

The header is optional, if it is not there there must be exactly 12 columns with the matrix elements.

You can use comma, space or tab as separators. Octane merges multiple delimiters to one.
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1738
Joined: Wed Mar 09, 2011 10:09 pm

Return to OctaneVR Questions & Discussion


Who is online

Users browsing this forum: No registered users and 3 guests

Sat Aug 24, 2019 1:02 am [ UTC ]