Magmaflow without PRT Loader, viewport lag

Is there any way to load a Magmaflow editor into a normal 3ds Max scene, say onto a Group of emitters?

The reason I ask is because my viewport framerate is excellent with the emitters in a regular scene, but when I render a PRT sequence and load it into a new scene with a PRT Loader, the framerate is absolutely terrible and I cannot scrub at all. I’m working on a very good machine with 16gb ram as well. Even if I display 0.01% of particles (there is about 60 million total, so it’s only displaying a few thousand), the lag is unworkable and times out often.

The only reason I need the PRT sequence really is to save out the velocity channel, and run it through magmaflow to apply a gradient based on velocity to Map Channel. I have this working, I’m just wondering if it’s possible to do this without having to save out a PRT sequence.

Thanks!

Hi Dave,

If you have set the PRT Loader to load Every Nth particle, the whole 60 million particles have to be unzipped from the stream and read for the few you need to appear. If you are loading the First N particles, I would expect it to be pretty zappy with 0.01% (6K particles), since it would have to decompress only the beginning of the file. This is the reason the PRT Loader defaults to 1%, First N. Of course, if the particles are very sorted inside the file, you might be forced to use Every Nth to see a better representation of the cloud.

Right now, you cannot apply Magma directly to Particle Flow or Thinking Particles, although we have a Wishlist item to make this possible via a PRT PFlow object similar to the PRT Volume, PRT Hair etc. objects.

One way to work around this issue would be to create a low-res proxy of the PRT Loader - we intend to add better tools to do this automatically in the future, but right now you can do this:

*In an empty scene, place a PRT Loader at the Origin, disable Viewport display completely and load the 60M particles sequence
*Set the Render % to 0.1 (this will give you 60K particles) and “Load Every Nth Particle” mode
*Open the Krakatoa UI, switch to Save Particles To File Sequence mode, set the Render Setup time range to the range of the sequence and make sure “PRT Loaders” are enabled for saving.
*Specify an output path in the Save Particles dialog - for example, you can use the same path as the source sequence but with a different name, or a sub-folder of the source folder.
*Set the Channels list to the channels that were in the original sequence. If you need to know what channels were in it, you can use the >> icon in the PRT Loader to open the “File Sequence Editor” and have a look at the channels layout.
*Press the SAVE PARTICLES button and wait for the sequence to be processed.

Once you are done, you will have two PRT sequences on disk - the original for rendering, and the 0.1% every Nth proxy version for viewport.

*In your scene where you are doing the Magma work, select the PRT Loader with the original sequence, select the sequence on the File List and uncheck the “Viewport” checkbox. The sequence will now have “-r” instead of “vr” in front of the file name.
*Press the Add Files… button and pick the Proxy sequence you just saved.
*Select it and uncheck the “Render” checkbox, so it has “v-” in front of its name.
*Set Viewport > % of Render to 100.0.

At this point, your PRT Loader will be showing all 100% of the Proxy particles in the viewport, but reading from a much smaller and faster file. When you hit Render, the original sequence will load 100% of 60M particles, but will skip the Viewport proxy.

This is how I use the PRT Loader in production - I have a Naiad flow here with up to 50MP and have made myself a proxy with about 500K particles for fast scrubbing and tweaking of the Magmas…

Hope this helps.

Hey bobo!

That’s incredibly helpful actually. I had been using previous renders with less particles as samples but it was a pain to swap out the PRT Loader with each sequence when I went to render. Wasn’t aware you could load different sequences for viewport/render.

Thanks again!

Dave