Particle culling issues
I think there is still some kind of bug with animated geometry culling. It did not work at all a few versions ago and should already work with current builds. I am on v2.1.3.47 / max 2012x64.
Very often it happens to me that a PRTLoader with culling by simple (single volume, box or cylinder) geometry culling does not show in viewport properly across all frames.
Sometimes I see it (standard camera + krak camera modifier) across 100 frames, then it disappears for next 25 frames (no particles are shown at all) and gets back again for the next 100 frames.
In order to get it back in the viewport I need to go to the ‘blind’ frame, turn the culling off and on again and it shows up properly in the camera viewport across the frames that were blind previously, but I get a hole somewhere else.
It happens to me when there is a Magma modifier applied on the PRT loader, but not only in that situation.
Also very often in non-camera viewports the particles (regardless of whether culled or not) would disappear when I zoom out a bit above certain threshold.
Maybe that’s something you’d like to look into.
More culling problems
When it comes to culling via selection sets and multiple geometry objects I think it does not work reliably yet.
I understand that it is supposed to work that way, that Krak takes an union of all selection objects.
When all culling volumes are separate it seems to work fine.
The problem shows up when one of the volumes intersects with the other.
Yesterday I had a cylinder and box and when I moved the box towards the cylinder (top view) so that it overlapped, I got a union but the box content was somehow broken - instead of seeing full box filled with culled particles I saw only a triangle and the 2nd half of the box was missed.
Magma keyframes issues
Not sure if it’s your bug or max’s. I have a PRTLoader + Magma + few exposed params that I animate.
I see keyframe marks proprerly on the scrub bar in max main window at the bottom (not talking about track editor now).
When I delete these keyframes they get deleted but don’t disappear in the scrub bar unless I deselect and reselect PRTloader. Same happens when I move the keys around. They get actually moved, but views don’t update.
CSV Loading
Adding to that (I think I reported it earlier) It would be awesome if CSV importing simply skipped bad rows or displayed a good dialog box allowing to choose what to do.
Now importing any file that contains one bad line simply breaks the process.
UI - Adding multiple files to PRT loader
I think it would be fantastic to have ability to add multiple files at a time.
At the moment for some reason when I click add button I can only select one file at time in the system file browser.
I know I can use the manager, but for some reason it also did not work good for me when I wanted to add a folder with files named XYZ_P1.prt, XYZ_P2.prt etc…
It would not pick all files and simply skipped a lot of them leaving only a few files when I wanted to add entire folder.
Culling is not guaranteed to work correctly with concave volumes. I assume that taking multiple shapes and overlapping them results in the equivalent of a concave volume.
Will try to reproduce the animation thing…
I am pretty sure this is a Max bug.
I agree, but have to convince the developers it is a good idea.
It is “failing” because it considers the last digit of the file name to be the FRAME NUMBER, and it does not load files from the same “sequence”. If your frames were called XYZ_P1_0000.prt, XYZ_P2_0000.prt, then the P1 and P2 become part of the file name and produce UNIQUE file names that are not from the same sequence.
The alternative is to name your files according to the Krakatoa partitioning pattern - XYZ__part01of99_0000.prt, XYZ__part02of99_0000.prt etc. When you pick ONE of them using the Add File… button, the others will be added automagically.
FWIW - I had the same request, but eventually realized Thinkbox continued to be awesome and made nearly everything accesible through MaxScript, so you can script loading of multiple files fairly easily.
theSourceFilenames = #(“file1.pts”,“file3.pts”)
newPRTLoader = KrakatoaPRTLoader()
newPRTLoader.filelist = theSourceFilenames
for o in theSourceFilenames do append newPRTLoader.fileListFlags 3 --this part sets the viewport / render flags for each file
This worked for me because I wasn’t loading them as individual frames, they were all set to ‘load single frame only’ - maybe that wasn’t what you were looking for, not sure.
Thanks for the flowers, but we are even more awesome than that!
*Open the Windows Explorer at a location with particle files.
*Grab the file name of one of the frames, e.g. particles_0000.prt
*Paste it into the Explorer’s path to get the full path name and copy into the Windows Clipboard.
*Open a text editor or a MAXScript Edtior and paste it there multiple times
*Edit each line to modify the file number, e.g.
C:\Temp\partitions\FallingParticles\particles_0000.prt
C:\Temp\partitions\FallingParticles\particles_0001.prt
C:\Temp\partitions\FallingParticles\particles_0002.prt
C:\Temp\partitions\FallingParticles\particles_0003.prt
*Select all these lines and press Ctrl+C to copy to Windows Clipboard
*Create a new PRT Loader
*Check “Load Single Frame Only”
*Click the [>>] button and select “Paste Filenames From Windows Clipboard”
RESULT: You will get the content of the Windows Clipboard added as a file list!
Yet another alternative - the File Sequence Manager found in the same [>>] menu has a feature that lets you save and load sequence files. These are text files that describe the file name and the flag mode. So if you open the Manager and save the above sequences to disk, the resulting KFL (Krakatoa File List) file’s content will look like
C:\Temp\partitions\FallingParticles\particles_0000.prt, 3
C:\Temp\partitions\FallingParticles\particles_0001.prt, 3
C:\Temp\partitions\FallingParticles\particles_0002.prt, 3
C:\Temp\partitions\FallingParticles\particles_0003.prt, 3
In other words, you can write a text file with this content yourself, save as KFL file and then just pick in the File Sequence Manager as any other KFL file and you will get the same list… This has the added benefit of specifying the bit flag for the render/viewport display!
Alternatively, you can just list the files out to the clipboard. From cmd, run
dir "C:\Temp\partitions\FallingParticles\" /s /b | clip
and you’ll get your files in the clipboard. Unfortunately /s will also do subdirectories recursively, but it’s unlikely your PRT folders have subdirectories.
Shift-right click in windows explorer reveals a hidden command: COPY as Path . This also works for multiple file selections.
It will put all file paths in quotes just inc ase there are spaces. I’m not sure if that causes a problem in krak or not.