ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Does anyone have an idea if such a script exists already? What I want is to convert vray plane lights into mesh planes, but keeping the position and dimensions of the original lights.
This fn works with vray lights (sphere and plane type)
You have two arguments:
- if "turn" is set to "on" then existing lights will stay enabled ei. on
or you can set all selected light off
- "assigneLightMtl" - when is "on" every plane or sphere geometry will
have VRayLight material with same color and multipliar as actual light
Select some vray lights and run code below. Also twick args in the last line of code
fn vrlightToMesh turn:off assigneLightMtl:on =
(ifselection.count == 0 then messageBox "select some vray light first!" title:"Warning" beep:off else(for light in selection where iskindof light VRayLight do(
light.on = turn
material = if assigneLightMtl do VRayLightMtl compensate_exposure:on multiplier:light.multiplier color:light.color
case light.type of
(0: plane transform:light.transform length:(light.size1*2) width:(light.size0*2) lengthsegs:1 widthsegs:1 material:material wirecolor:yellow
2: sphere transform:light.transform radius:light.size0 segs:16 material:material wirecolor:yellow
))))
vrlightToMesh turn:off assigneLightMtl:on
Comments
...
This fn works with vray lights (sphere and plane type)
You have two arguments:
- if "turn" is set to "on" then existing lights will stay enabled ei. on
or you can set all selected light off
- "assigneLightMtl" - when is "on" every plane or sphere geometry will
have VRayLight material with same color and multipliar as actual light
Select some vray lights and run code below. Also twick args in the last line of code
bga