I know we’ve discussed this before and I don’t quite remember the outcome. Is there no way we can get Stoke Field (Field Magma – which on a side note is called Field Magma under Stoke creation menu but is created with the name Stoke_Field) to get render time particles when we save to FXD, F3D or OpenVDB? I wouldn’t even mind if it was implemented into Krakatoa Renderer or a new Stoke Renderer to save out Fields but the way it is now when you want to save out a field you not only have to deal with the time it takes saving out the field (which is understandable) but you also have to deal with the sources (often PRT sources in my case) having to display a massive number of particles when I want/need a lot of accuracy which makes Max very slow and just getting to the Save Field window a pain.
I am sure this is going to become a headache for many artists and I understand if it won’t make it into 2.0 but maybe 2.x?
We have a function that can be called to set objects to Render Mode, and back to Viewport Mode.
I will try to add it to the Exporter to switch all relevant objects to render mode and then back when done.
While adding this, I discovered that, at least with live PFlow particles, the Field Magma already DOES get the render particles, but PRT Loaders do not.
This is probably because the PFlow code was “borrowed” from KMX and it switches implicitly somewhere. We are looking into that as a bug…
Give this a try and see how it goes…
I also added menu items to the File menu to copy the path or the full filename to the Windows Clipboard. Stoke_FieldDataExporter_20140404.zip (4.06 KB)
I am not quite sure how to get this working. I’ve tried every method I can think of except turning off viewport particles (under viewport rollout) because that crashes Stoke when I am referencing that PRT Loader. No matter what settings I seem to use, and with “Switch All Scene Objects to Render State” checked in the exporter, I just get whatever is showing in the viewport. So if I have viewport set to 0.0 and render set to 100.0 I get 0 PRTs evaluated when exporting my Field Magma. Change it to 0.01 and I get a few. I’m dealing with a very dense PRT that I want exported to FXD so displaying 100% in the viewport doesn’t seem to be an option. It takes forever when I try. Rendering several of these in Krakatoa isn’t a big problem though, I get a render time of ~12 minutes for 440,000,000 particles (that’s for several PRT Loaders but each is probably around 80,000,000).
Is “Switch All Scene Objects to Render State” working on your end and if so, exactly how do you have the PRT Loader set up?
*I loaded some old PRT sequence (a radial wave of PFlow particles saved for a Krakatoa Magma webinar years ago) in a PRT Loader
*I set the PRT Loader to 0.1 in the viewport to have very few particles
*I created a Field Magma around the PRT Loader and sampled the particles using a PVelocitySplat into a Velocity field.
*I set the viewport display of Field Magma to show Velocity as Color.
Looking at the viewport, I can see the few particles moving through the field and the field is painted where it should.
Saving this data to VDB using Field Data Exporter and loading the result from VDB with a Stoke Field Loader produces the identical result from moving viewport particles.
*Then I checked the “Switch All Scene Objects To Render State” option and saved a v002 of the VDB sequence.
The viewport showed a very dense coloring according to the render-time particles.
Loading the new VDB sequence shows the same massive Velocity field from render-time particles.
So in my tests, sampling a PRT Loader with a Field Magma in viewport and render modes produces the results I would expect.
But you might be doing a lot more than that, so we have to figure out what the difference is…
After we talked, you got me on the right path to isolating the cause except the uniform scaling did actually have an impact. The issue was in my case that I had scaled the PRT Loader (uniform) and had nothing to do with Render State. To make sure of this I did the following steps:
Created a Pflow system.
Rendered it out as a PRT sequence.
Created a PRT Loader, loaded the sequence.
Created a Field Magma surrounding the PRT sequence.
Simple Field Magma setup using ParticleSplat to splat density into the grid.
Saved out as OpenVDB and loaded the written out OpenVDB sequence in Stoke Field Loader. Looked great.
Then I scaled the PRT Loader by 11x uniformly, adjusted the Field Magma and made sure there was enough voxel density to accurately splat the density.
Exported to OpenVDB again and loaded in Stoke Field Loader, looked really bad.
This leads me to assume that I need to adjust the spacing values in the ParticleSplat node which I am attempting to do now.
Just to let anyone know who might be visiting this thread in the future, what I ended up doing was writing out the scaled up PRT Loaders to a new PRT sequence.
Then I created a new PRT Loader pointing to this new sequence and unchecked “Use Node Transform” to make sure they were in the right spot as I had saved them. I picked this new PRT Loader in my Field Magma using the same ParticleSplat setup. That fixed everything except I was still having problems with “render state” for some reason so I switched my view to box mode and gradually increased the viewport particles until I was showing all of them (~100,000,000). Increasing it gradually seemed easier on Max than going from 0 to 100 right away. Not sure how the implementation works but that definitely seemed to help things in my case.
Saved it out to FXD (density) and everything is working fine. Did some tests with various Field Magma spacings and various particle counts and settled on the one that had the best quality while still not taking up too much ram while rendering.