Auto LightSelect script?

Hey guys,
does anyone know a skript like this:
http://www.scriptspot.com/3ds-max/sc…raylightselect
But working with the full LightSelect an its modes?
Also it would be cool if it could use the light names for the naming of the elements.

I’m loosing alot of time these days setting up the LightSelects.

Would be a nice button for the vray toolbar too… wouldn’t it? :roll_eyes:

Can you not rework that script to support the full mode?

Best regards,
Vlado

Unfortunatly no.
I didn’t found the time to lern maxScript yet.
I’m planning to do so though.
I guess it would be a nice first project…

Just ask the guy for an update.

I’ll try, but I have not great hope for it since his last activity was 2014.

is vraylightselect automatic setup part of the vray next roadmap? Seems like it would be a highly appreciated feature!

I asked him for an update some months ago regarding some stuff I wanted changed. He replied quite quickly (days) and even did the stuff himself. It was small stuff tho, just changing some defaults. Anyways - your chances of establishing contact are quite good.

EDIT: Latest version: https://forums.chaosgroup.com/forum/…41#post1012441
Hey guys.
A student who does an internship semester at our company had nothing to do. So I told him to learn MaxScript and write the auto light select script since ecXimer didn’t answer.
EcXimer’s script is encrypted, so he had to start from scratch.
Here is what he came up with so far:
LightSelectElementScript v1.3.zip

It’s tested in max 2019 with Vray 3.6.04
He’s got one day left to work on this. So I’d be grateful if you guys could test it and quickly respond if you find any bugs.
He’ll try to add grouping by selection set later today.
LightSelectElementScript v1.3.zip (2.4 KB)

I’ve tried it in Max 2016 and V-ray 3.6.04 and everything worked fine .
I like the additional options you added (add instance as one and duplication )
I think the UI could use more polishing tho .
Anyway thanks for sharing !

Kudos to your student - to have learned Maxscript from scratch and written this is commendable.

I’ve tried in 2019 and it seems to work fine for me.

Thanks for sharing - it’ll save me time and encourage me to set up LightSelect Elements more often :slight_smile:

EDIT: Latest version: Auto LightSelect script? - General - Chaos Forum
Update:
LightSelectElementScript v1.32.zip

Changed:
-LightSelection by selection sets.
-Improved UI.
-There was a bug when using sun or ies lights and “only activated lights” was checked because its called “enabled” instead of “on” in those lights.

To come:
-Grouping by selection sets.
-Two options for Sorting. “alphabetical” and “by mode”.
-UI changes: Mostly more radiobuttons instead of checkboxes to limit the possible combinations and prevent pointless settings.
I.e deleting all elements and deleting all LightSelect elements.

Don’t know when he’ll find the time to work on this again.
This weekend maybe.

Test the hell out of it as long he can do stuff!
LightSelectElementScript v1.32.zip (3.22 KB)

+1 to get it part of Vray UI instead of using script with auto naming from light name.
Thanks to share the script anyway, that’s very helpfull.

Terrific! Just used it today. Saved Me a lot of time.
Thanks for sharing!

+1 to my old post :slight_smile:

Thanks for sharing this - first thing I did was use the ‘add instance as one’ - such a clever option to have. It worked so quickly/cleanly that I almost didn’t think it worked at all. The pre-script action ‘Clear all LightSelects’ also seems like a smart inclusion. I’ll use that as I get further in my scene and things start to change.

I went into the script and changed a few of my favorite checkboxes to ‘true’ so I wouldn’t need to manually tick them every time I opened the script. Awesome!

I managed to do an update on my own.
I took the last version my Student made before he left and added the LS modes of Vray Next.

RenderElementScript v1.361.zip

The last version he made had some additions to the last one I posted here:

Light Selection:
-In any selection set: adds only lights which are in selection sets.
If a light is in two selection sets it gets added just once.

-All Selection Sets: adds only lights which are in a selection sets.
It will add lights which are in more than one selection sets as often as they appear in a different set. (I think this was necessary for the following)

Grouping:
-by selection set: Is only active when ‘All Selection Sets’ is checked.
It will group the lights using the selection sets they’re in. The LS will then have the name of the selection set.
If you put a light in two selection sets it’ll appear in both LS!

Sorting:
-Sort elements by name: Self describing.

Known issues:
-‘Only activated lights’ will result in an error if ‘all selection sets’ and group ‘by selection set’ are both checked.

I didnt really needed any scripting skills to add the Vray Next modes.
Fixing the issue and making a more user friendly ‘group by selection set’ option is a completely different thing.
It might take a while till I’m able to address those since I have to first find the time to learn MAXScript.:wink:

I think the script will still work with 3.6 (except the modes from Next). But I can’t test it right now.
RenderElementScript v1.361.zip (5.39 KB)

I love this script but what code would need to be added for a checkbox for to auto set all the Denoisers on/off for each light before the LightSelect render elements are created ?

PS - I’d have thought by default Denoiser for LightSelect should always be selected as on ?

Um that might be very easy… I’ll take a look tomorrow.