Notifications
Clear all

[Closed] Script Controller Optimization

Hey guys,

I have a simple scene where I have a whole bunch (6k+) of spheres with script controllers that place them at the vertex of a mesh. Now what I’m wondering is, what the most efficient way to do this because for example, adding a Lattice modifier to the control mesh places a tetra/octa object at each vertex and it runs waaaaay faster. So what is the Lattice modifier doing exactly and is there a way to recreate this in Maxscript for maximum efficiency?

Thanks guys,
-S

4 Replies

I think some of the speed difference comes from the lattice modifier being driven by a C++ dll which will always run quicker than a script controller which probably gets reinterpreted at everyframe .

 lo1

not maxscript related but you can use pflow for this with probably increased efficiency

 PEN

I’m not fully understanding what your test is and how you are comparing things. Script controllers, being that they are Max script, are not going to run as fast as built in Max features that are C++.

Can you show what you are testing and what result you are getting and it might give a better idea of how to optimize it.

Hey guys thanks for the suggestions. PEN, I am creating a segment of a DNA strand where all the atoms are represented with spheres, and each molecule needs to be a separate material. It sounds like PFlow is the way to go with this, as there are 6k+ objects, I will just have to create an LUT for the corresponding sphere material at a given vertex.

Does anyone know if part of the XBR initiative is to increase performance with things like MAXScript and script controllers?