Yet another update to both the Krakatoa VRY exporter script and the Krakatoa VRY plugin.
vray_KrakatoaVRY_20170302.zip (4.52 MB)
To install, copy the DLL into the Plugins folder of the VRay RT installation for your 3ds Max version (see earlier posts in this thread). Copy the MS file to the Krakatoa MX\Scripts\ folder. You will need to set corresponding permissions to your files to overwrite them.
Lots of changes here:
- Added a wait option to the DLL when a PRT file is missing. The exporter currently sets the wait time to 1 minute, and a new attempt is performed every 10 seconds until the PRT file appears or the minute has expired. The wait time is currently hard-coded and not exposed to the UI, but due to other changes is probably not as necessary as before anyway.
- Added some new logic to the export of unchanging PRT objects: If a PRT object produces the same particles over time within the export sequence, later frames will not reexport the PRT file, but will simply copy the previously exported file. This results in much faster export of, say, PRT Volumes from a static mesh. The planned solution to this is actually something more similar to XMesh header files to allow the reuse of frames without duplication on disk. So this is just a temporary measure.
- Fixed the hashing of PRT objects with a changing source object. In previous versions, a PRT Volume made from a deforming mesh (say, an EMesh with a Bend modifier) did not detect the animation of the underlying mesh and produced the same hash on all frames, thus ignoring the deformation.
- Added a PRT cleanup pass when exporting an animation. In previous versions, if you exported a PRT sequence and it was preserved on disk from a previous render attempt, if you launched a new iteration and the export was slower than the rendering, at some point the renderer could encounter a previous PRT file that has not been updated yet, thus rendering potentially incorrect particles. In the new fixed version, after saving the first frame’s PRT and starting the rendering, but before saving the rest of the frames, a pass will be performed over all objects and any PRT files that have a mismatching hash checksum will be deleted first. This way, any pre-cached and valid PRTs will remain on disk and can be rendered, but any changed particle files will be deleted and cause the renderer to wait for the next export (see the first item on this list above!) This ensures every frame will always contain the latest particles.
- Added a function to check the type and name of the current viewport. It will be reported in the beginning of the export. Also, if the type is not Perspective, Camera or Light (which means it is any Ortho view), the Krakatoa rendering is likely to render incorrectly, so the rendering will be prevented and an error will be printed to the log. This is supposed to work with both Locked and Unlocked render views. It should hopefully prevent accidental renders of incorrect viewports.
- Added a 2 seconds timeout between clicks on the Export/Cancel button. This way, if you multi-click too quickly on the Cancel button (and it can take a while before it registers when exporting large PRT files), there is no danger of accidentally starting another export.