Lastly some of these I even cringe as there are some neater ways to write these, however they did the job at the time for whatever I needed them for, so again.. "as is" : ) !!
Most of these are aimed at pflow, afterburn or fume fx. Used in production, some for large teams and at my studio, others just me 5 years ago needing a few quick things. I will release more soon - however I'm in New York right now and I'm flying back to aus to pack my bags as I'm moving permenately to North America this year, so I dont see myself having much time in the coming months..
Hope you find them useful!
Use this in conjunction with PFFX_ScriptGUI_v01.2.ms - make a script test and put this in there. Then wire it to a new event. What this will do is generate a special box where the particles travel to the new event. This way if you did an effect like an airstrike or something, it will generate a special box where it needs to blow up. Then run the next script (telling it to read your ffx container) and it will place a fume explosion set up for rendering at that position. read on with the next script..
The previous script PFFX_pflow_script_GenOBJ.ms generates a special box which has the frame information etc in it. And then make an explosion or fume fx sim, sim the whole effect. delete the lights and camera, emitters everything out of the scene so you just have $fumefx01. save it out and tell this script to point to that location. Then run this script it will generate as many explosions as your pflow event specifies, so you suddenly have 50 explosions or whatever you need. all set up to go to render. As with the rest, I will give better documentation on this later.
Simple script that will read all the files in a directory and change their spacing. This is a good starting point if you want to batch change files values. I wrote this to quickly change 50 demo files to a much higher resolution I neded. It then wrote them out to a new file name (so it isnt overwriting). You can modify this to do pretty much anything in max, so probably useful even outside of fx.
generates the tightest box possible based on your animation. Then just make it a bit wider and taller to fit the fire in and you save the most room possible for your fume fx sims!
Create a FFX_repository.txt and ren_repository.txt files in your c:\ and put the location of all the files you need sim'd in the FFX_repository.txt folder. example listed below.
All files are broken up with a , and are either / or \\ instead of \. Other than that its an easy way to locally sim all of your stuff. I wrote this a year ago before there was backburner support, however its still useful for doing stuff locally. I still use it a lot.
Useful to track one object to another objets animation. Such as tracking a dummy to another object etc.
Useful for dumping out data information from a fume fx scene. You will need to specify an output directory in the script (I dont believe I've written a gui for this one) but it will output a lot of useful information. Its good if you have 20 scenes ready to sim and you want to double check all of their settings quickly before they sim or you go home for the day. (I basically use it to dump out all my scenes so I can review them on my way home to double check nothing is going to go wrong or I missed anything, but also good for troubleshooting a fluid sim).
Will generate a dummy for each vertex on every frame of the animation. Good to get an idea as to what your objects doing, or gauge how far an object might be moving over time. Useful for things like seeing if objects collide with surfaces, or if you are doing a fluid sim with a complex character moving around, you can select a bunch of vertices to get an idea as to where hes moving etc. and create a container based on the entire animation.
This script will localize your scene so it will save all the point cache data and everything in the scene locally, and reset up the scene to be able to then sim locally. You can modify it but right now it will go to C:\f_local\ and make a folder for each max file, then inside of their have a /pic/ + /fxd/ + /pc2/ dirs and store all the info there. I wrote this one afternoon after a deadline where our network was going down a lot, I could easily save all my stuff locally and then set off sims for the night, knowing the network wasnt going to crap out.
Useful script that will increment your max file up one version, but also update your render output to the new version (as well as make new directory for it too) and if you enable the fume fx checkbox it will also change the fume fx FXD path to a new version as well. I find this useful so I do not need to update 3-5 things each time I decide to go up a version. (I version up a lot so I dont lose old data incase a director or client decides to roll back a version). Might want to modify to match your directory structure, but its pretty easy to use.
Will require some modifying but I wrote this to be able to generate fume fx libraries. I'm able to get maybe 3 situation tests and 5 flametypes and then it will go through and generate 15 max files from that with every single situation test ran by every single flame type. This was needed while we were prototyping various fire sims for a film coming out later this year.. What would take me a day of paintakingly boring work would take 10 seconds, and I could generate 500 max files ready to render if I wanted to. This will probably require some additional documentation to make sense, however right now I'm just putting it up in its raw form, later I will put it up with the correct example scenes.
This script is very useful for getting a particles age to stay the same. Lets say you have a pillar of smoke that grows over 30 frames, but once it reaches 30 frames you want it to last forever, but at that size. Make it go to a new event at age 30 that has this script (plus the delete operator in here too) and it will keep reassigning the old age to the particle, so you do not need to tell your particle to last 5000 frames and have a funky animation or AFC curve for its life. I find this script to be useful a lot when working with afterburn!
Birth script which you can use to create a bunch of particles matching exactly what the objects in your scene are. If there are 50 objects named "Brick_01" etc. it will (assuming you tell it in the globals to look for "brick_*") generate 50 particles and assign the shape etc. to them.
Will tell your objects in the scene to be the same as your particles. Useful to initially grab the positions in a birth script, but then run this to move them around.
Simple but useful scripts
Simple way to clear out memory foot prints to an extent. It does a garbage dump, I personally find running it 3-5 times you get a good result. Its just useful to help from max crashing etc. so I occasionally will click this button to clear out some redudent memory.
Simple script to tell all your objects to be a grey material.
Mattes your scene out, so all models are matte/shadow. I use this all the time to pull in a scene file, matte everything out, and start doing fx passes.
Simple script which will hide all the objects in a scene, change the render path to exactly what it was with "_noholdout_" at the end of the name. And also changes the max file to "_noholdout". So you might have a maxfile called "foo.max" and it renders to "C:/temp/foo_000.tga" it will make a max file called foo_noHoldOut.max and render c:/temp/foo_NoHoldout_000.tga.
This script is useful if you need to make a bunch of passes that you render out, and then render again without any hold out geometry (I do a lot of this when working lets say in max doing lots of fume fx passes, and then all the geometry renders are done in Houdini, and there may be issues compositing the two together etc, or you just want with and without holdout geometry).
Simple script to clear all the materials out of the material editor. I use this all the time to get rid of all the shaders from a scene. Usually when I start an fx scene (esp fume shots) I will load the scene and run MatteMyScene and ResetMaterialEditor and then I will have a fairly clean max file to work with.
Smoothes the selected geometry and flips the normals. A lot of geometry I bring in from houdini requires it, so part of the importing software I wrote does this for me, however if I were to manually import .obj files I would then just click this button to set it right for me.
Simple script to toggle the selected objects from box mode and non box mode.
Simply select all the vertices you want tracked, and then it will track a dummy object to each vertex for the entire animation. Useful for linking emitters to point cached objects etc.
Will randomly assign new wire colors to all selected objects
If your fume fx containers path is busted this will fix it.
Useful if you're running out on a lunch break and want to get something to sim locally, and then render the results as well. It runs the sim, then renders it out once its completed.
Quick script to center objects pivot
Quick script to match the dimensions of one object to another, great for making deflectors match to a ground plane etc.
Another quick script just to load pflow window
Resets the xform of an object