Short description:
The script creates 4 plug-in lights that allow for different creation modes than the standard ones.
Besides allowing to pick light type before having created it (much like the toolbar does), the modes ought to aid in their positioning, reducing mouse clicking and improving placement accuracy.
Notice that the script is personal, not a Chaos-Group sanctioned one, nor is supported, besides bug fixing, and listening to requests.
Implementation of said requests will only happen if and when time constraints will allow it, so please use them as they are, for what they are, and feel free to suggest for changes, but EXPECT nothing of them.
Installation:
Put the scripts into
%MaxRoot%\scripts\Startup\
(usually C:\Program Files\Autodesk\3ds Max 20xx\scripts\Startup)
On next max run, you'll find four more buttons in the V-Ray lights panel.
Usage:
Undo is supported.
For all light types BUT the dome:
NO Modifier Key = Standard light creation, inscribed into and centered on the creation Bounding Box.
SHIFT Key = Viewport-Aligned creation toggle: when on, the transform matrix used to create the light will be the view one. Having just Shift pressed while clicking, instantly creates a light, sized as the frustum 10 units into the view.
CTRL key = Sizing mode toggle: for grid-aligned creation it switches to symmetrical sizing and center on the clicked point; for view-aligned creation it allows to drag to size the light.
ALT Key = Target creation toggle: in grid creation mode it also allows for target positioning before ending the light's creation action, in viewport-aligned mode it simply creates a target for the light at the view focal point (or ten units further than the light if the view is orthogonal).
For the Dome:
NO Modifier Key = Light creation at the origin.
If an environment map is present AND active, it's instanced into the dome texture, the environment map use is turned off (ie. just the checkbox), and the environment color is set to black.
If no environment map was present, or active, the background color only is reset to black.
SHIFT Key = Creation like above, but on mouse projection on the grid.
CTRL key = Creation like above, but it also DELETES all Domelights from the scene (whether they were on or off).
ALT Key = Creation like above, but it also TURNS OFF all Domelights in the scene
Combinations work (the ctrl key in realtime, too, when grid-creating).
Limitations and Usage Notes:
*)The view-creation mode (shift+click) currently doesn't support safe frames at all. The sizing of your light is done on the original, non-masked, viewport.
It may or may not change in the future: i can't seem to find a way to access the masked viewport size directly (there is none.), so the workaround would be to mimic the safe-frames code.
*)The view creation mode should change, i think, to move the lights back to the view origin, rather than 10 units in front (something clearly visible when creating them in ortho views.). While this would work NP for said ortho views, it would break the look of light creation when from a perspective view (the light would then be bigger than the frame, and all the user would see would be the cross in the middle). Thoughts?
Technical notes for TDs:
The plug-in simply encapsulates a vrayLight class to implement the new creation modes through a mouse Tool.
Usage is entirely safe, as at the moment the light is created it returns to its original class, and any script error is self-contained and won't spill into the Max session.
In other words, saving a file after having created the lights with the plugin will be identical to one where the lights were created normally.
Not having the plugin lights on a system when opening the scene will incur in absolutely no penalty.
Updates and Changelog:
05-06-2016: Removed garbage test code from the arealight.
08-06-2016: Added undo Support to lights' creation and new modes to the DomeLight.
Re-download and overwrite with Max closed if you have already installed them.
The script creates 4 plug-in lights that allow for different creation modes than the standard ones.
Besides allowing to pick light type before having created it (much like the toolbar does), the modes ought to aid in their positioning, reducing mouse clicking and improving placement accuracy.
Notice that the script is personal, not a Chaos-Group sanctioned one, nor is supported, besides bug fixing, and listening to requests.
Implementation of said requests will only happen if and when time constraints will allow it, so please use them as they are, for what they are, and feel free to suggest for changes, but EXPECT nothing of them.
Installation:
Put the scripts into
%MaxRoot%\scripts\Startup\
(usually C:\Program Files\Autodesk\3ds Max 20xx\scripts\Startup)
On next max run, you'll find four more buttons in the V-Ray lights panel.
Usage:
Undo is supported.
For all light types BUT the dome:
NO Modifier Key = Standard light creation, inscribed into and centered on the creation Bounding Box.
SHIFT Key = Viewport-Aligned creation toggle: when on, the transform matrix used to create the light will be the view one. Having just Shift pressed while clicking, instantly creates a light, sized as the frustum 10 units into the view.
CTRL key = Sizing mode toggle: for grid-aligned creation it switches to symmetrical sizing and center on the clicked point; for view-aligned creation it allows to drag to size the light.
ALT Key = Target creation toggle: in grid creation mode it also allows for target positioning before ending the light's creation action, in viewport-aligned mode it simply creates a target for the light at the view focal point (or ten units further than the light if the view is orthogonal).
For the Dome:
NO Modifier Key = Light creation at the origin.
If an environment map is present AND active, it's instanced into the dome texture, the environment map use is turned off (ie. just the checkbox), and the environment color is set to black.
If no environment map was present, or active, the background color only is reset to black.
SHIFT Key = Creation like above, but on mouse projection on the grid.
CTRL key = Creation like above, but it also DELETES all Domelights from the scene (whether they were on or off).
ALT Key = Creation like above, but it also TURNS OFF all Domelights in the scene
Combinations work (the ctrl key in realtime, too, when grid-creating).
Limitations and Usage Notes:
*)The view-creation mode (shift+click) currently doesn't support safe frames at all. The sizing of your light is done on the original, non-masked, viewport.
It may or may not change in the future: i can't seem to find a way to access the masked viewport size directly (there is none.), so the workaround would be to mimic the safe-frames code.
*)The view creation mode should change, i think, to move the lights back to the view origin, rather than 10 units in front (something clearly visible when creating them in ortho views.). While this would work NP for said ortho views, it would break the look of light creation when from a perspective view (the light would then be bigger than the frame, and all the user would see would be the cross in the middle). Thoughts?
Technical notes for TDs:
The plug-in simply encapsulates a vrayLight class to implement the new creation modes through a mouse Tool.
Usage is entirely safe, as at the moment the light is created it returns to its original class, and any script error is self-contained and won't spill into the Max session.
In other words, saving a file after having created the lights with the plugin will be identical to one where the lights were created normally.
Not having the plugin lights on a system when opening the scene will incur in absolutely no penalty.
Updates and Changelog:
05-06-2016: Removed garbage test code from the arealight.
08-06-2016: Added undo Support to lights' creation and new modes to the DomeLight.
Re-download and overwrite with Max closed if you have already installed them.
Comment