TBFX wrote:Unfortunately I believe that so far only the loading of particle instances has been optimized and not regular instances. So if you scatter your instances with either particles or nParticles they will load much much faster.
Just to be clear, will try to describe the exact reason of it.
It's not optimization issue...
When you use particles - the plugin assumes that each particle geometry can have
only one (or
just few if different materials are used for different poligons) associated Octane material node (which can be "virtual" of course). So, the particles code can be highly optimized due to this reason: as the plugin checks "what material this object has" only
once for each particle geometry, assuming that all other 1'000'000'000 particles have the same (perhaps virtual) material node.
Otherwise when you use instances. For some scenes you may want to explicitly associate different material for some of
the same geometry's instances. The corner case, that theoretically you can have all 1'000'000'000 instances having own material each (being set e.g. by some crazy script

).
So, taking into account this case, the plugin
must query the associated material node
for each instance during scene compilation. And here we get the most interesting thing. No matter how highly optimized I can make this chunk of code (in fact I've done it long time ago and it
is optimized the same good as particles translation code) - as all this optimization will be eaten by Maya's slowpoke
getConnectedShaders() API function which must be called for each instance and which kills all the optimizations as most of the time instances translation process "sits" inside this function...
So, if we for example will decide that "all instances can have
only one associated material node (the one connected to the geometry)" - then the instances translation speed may be faster. But as soon as some instances of the same geometry must be able to have different materials associated (not just random "virtual" material but
true explicit different material nodes) - the instances translation will be slower than particles translation.
One more chance - if Maya developers will optimize the
getConnectedShaders() API function, but IMHO it is utopia.
So, I think you intuitively have choosen the right way.)
If you need speed and don't need flexibility of setting different explicit material nodes for each instance - the
particles are appropriate for this usecase.
But as soon as you need the flexibility in associating different material nodes with different instances of the same geometry -
instances is your way...