particles channels in maxScript/cpp

Is there an API we can read the particles channel data in maxscript or cpp, like the Particle Dataviewer does it?
We can read the cache directly, but then we’re losing the power of magmaflows, and the prt partition handling and file loading is already very well handled. There is no point to rewrite this :stuck_out_tongue:

Thanks

Goran

Hi Goran,

Particle Data Viewer was written in MAXScript and uses our particle I/O interfaces to read the data.
thinkboxsoftware.com/krak-pa … xscpt-val/
Note that the return value of the .getChannels() method now returns an array of strings, e.g.
#(“Position float32[3]”, “ID int32[1]”, “Velocity float16[3]”, “Color float32[3]”)
instead of the old
#(#(“Position”, “float32”, 3), #(“ID”, “int32”, 1), #(“Velocity”, “float16”, 3), #(“Color”, “float32”, 3))
I will fix the documentation on Monday…
You can call
theFS = filterString aChannelDef " "
to convert the new form “Position float32[3]” to #(“Position”,“float32”,“3”).
You would also have to convert the 3rd array element to Integer if desired…

You can also write PRT streams using MAXScript:
thinkboxsoftware.com/krak-pa … -mxscript/

Regarding C++ interfaces, I know we had some header files related to WRITING to our particle streams for developers who wanted to expose particle data channels directly to our PRT Source object, but I don’t think we have anything for reading. Our PRT Loader also exposes the standard 3ds Max particle interface, so any plugin that can read PFlow or legacy particles data should be able to read from it, too.

Awesome! This is great!

I’ll give this a try and come back to you if I hit another wall!

Thanks a lot Bobo! :slight_smile:

Goran