I have a PRT loader getting in some Naiad stuff, and for the droplet channel I get one value in the magmaflow debugger, and another in the particle data viewer. Check out thescreenshot below:
I think it’s not the first time i see this either. PRT Loader’s scale is 400%, but that shouldn’t be affecting that channel, right? There is no retiming.
First thing first: Debugger operates on the Viewport particles in object space, PDV shows the Render Stream either in Object or World Space, depending on the Load menu options.
So you can expect significant differences between the two displays depending on whether you are applying transforms or not, and also depending on the viewport vs. render stream contents.
Simple test:
*Make a Box of size 10x10x10 units at the origin.
*Make a PRT Volume from it, disable Jitter, set Viewport Spacing to 5.0, Render Spacing to 1.0.
*Add a Magma and enter Debug mode - you will see the 7 viewport particles (based on spacing of 5).
*Open PDV - you will be shown the first 1000 of 1215 particles based on the Render Spacing of 1.0.
*If you move the PRT Volume away from the world origin, the content of the Position channel will change depending on whether World or Object space is requested in the Load menu…
Now when it comes to the Min/Max/Mean values, the PDV shows them based on the sub-set listed in the ListView - if you show only 10 entries, only their Min/Max/Mean values will be calculated (because it is a MAXScript tool that would have to read through all million particles otherwise, and it would be slow). In the Debugger though, it is a C++ Interface that does the collection of the data, and all data is evaluated BEFORE the display is shown in the ListView. So the Min/Max/Mean is based off the WHOLE stream, not on the subset of particles shown in the ListView.
I know it is a mess, but the two tools were made to serve different purposes. The Debugger gives you insight into what is passing through the Magma modifier using the actual data collected via a C++ interface exposed to MAXScript. That data is the Viewport stream, and in the Object Space before transforms (same data that actually exists in the Magma Modifier). The PDV uses a MAXScript Interface to read the data from the modifier stack either before Material assignment, before Transforms, or after Transforms using the full Render stream. It is meant to debug the actual rendering data. Since that data can be huge, it only reads a subset of particles using a MAXScript FOR loop (to save time), and only shows the Min/Max/Mean of what was displayed, not of the complete stream.
I guess we should expand the PRT specification with metadata per channel containing the actual Min/Max/Mean values of each channel and save that after the PRT file has been completely written. This way, we could then read that data from the header of the PRT file without the need to read the actual channels… I will log this as a Wish.