Hide objects and lights outside of a box
Does anyone know how to write a script that will hide objects and v-ray lights that are completely not inside or touching a box? The script just needs to be a function. It would be best if it didn’t have an interface.
They reason why I need this, is I am rendering animations with v-ray, deadline, and RPManager and if I can hide the objects and lights I don’t need, per camera shot, it will substantially reduce my render times. Deadline has an option which will delete hidden objects, and in doing so, it reduces the size of the submitted files and reduces render time. I have been using layers and selection sets but they do not work well enough for what I need. Thank you for any help you can provide!
Comments
.
The code below is from script, that I did not wrote. All credits goes to the author - Klaas Nienhuis, [email protected], www.klaasnienhuis.nl
Tested on max2014 with standard lights.
How to use it - select the box, that will be the volume object and execute the script. If it works, you can save it is macro script and assign hotkey or toolbar button.
Tools and Scripts for Autodesk 3dsMax
Thanks! Almost there..
Thank you very much Miauu and Klaas ! This is very close to what I want. I need to tweak the script a little so it will also include intersecting geometry. I have some objects that have pivot points which are outside the volume. If I can figure out how to modify this correctly I’ll post my results or if anyone already knows please post. Thanks!
.
Send me([email protected]) a sample scene with all possible situatios(positions and intersections). Or post the link to the scene here.
Tools and Scripts for Autodesk 3dsMax