Arranging Lights in Lightmix

Hello Professionals,

I am working on a big interior scene with at least 30 lightselects.
Sometimes I need to add new ones and they end up by the end of the list.

does somebody know of a way to rearrange them without losing the values already inputted?

Thank you
Raoul

Hi,

A new render element is added at the end of the list, I don’t think Corona controls that, it’s Max thing.
When you add a new lightmix (CShading_LightSelect) layer, other layers should stay intact, unless you re-create the lightmix.

If you do this manually through render elements dialog, old values should stay intact. Just make sure that the light you add to a new lightmix layer is not in another layer (exception is, of course, the rest).

I’m pretty sure I came across such a tool but I’m not sure as I reinstalled 3ds Max since then and it’s no longer installed now.
I’m talking about “Creative Tools”: a set of scripts developed by Creative Lighting: Archviz Masterclass | Creative Lighting
One of these scripts allowed me to rename and rearrange the lights order in the Corona VFB. So far as I remember lights values were not changed.
Maybe you can get in touch with Nikos and see if he’s willing to sell you the tool?

Yes you can rearrange the list without losing values, though it’s a slightly fiddly work-around.

Just delete the render element (or multiple) and then Ctrl+Z and it will bring it back at the end of the list with name and values intact (works in Max2025).

In this way you can sort of shuffle them into order.

Here is a script ChatGPT wrote for me. I didn’t thank him to save energy, so let’s thank him here.
It can be used to move render elements up and down. You need to re-render to see the effect in the VFB though.
render-element-manager.ms (2.6 KB)

Great maru, very useful, thank you.
The perfection would be ..see attached image.

Feel free to add this as an idea at https://chaoscorona.ideas.aha.io/
We already have this folder like structure in VFB for tonemapping or | Corona Ideas Portal but the description isn’t very detailed, so I think it’s fine to start a new idea with proper description of what you would find useful.

I always find incredible how people manage to receive something useful with ChatGPT, I have used it in many situations with no success

I used one of the paid models (o4-mini-high) with its deep research feature turned on.

Ohhhh, I have heard something for that, well thanks for the Script, its pretty useful, the only thing that needs is an scroll bar to adjust the size, I have done it manually.
This is something I had request in 3d Max forums but no luck with Autodesk to improve Render Elements, it needs a redesign, its pretty old.

The free version of ChatGPT isn’t good to create 3ds Max scripts. I’ve tried it several times with no luck.
Thanks for your advice and the script Maru.

@CharlyRT: would you mind sharing the updated script? I have many render elements and the lightmix isn’t accessible as it’s too far in the bottom of the list and there’s no scroll bar in Maru’s script.

@tom
Sure, I also edit it to be macro you can find it as “Render Elements Organizer”
Im trying to add a button to rename elements too but I cannot find a way to do it, the only script that I have found is too old and its not really what I expected
Render Element Organizer.ms (2.71 KB)

Thanks CharlyRT!

what i meant is to be able to group (organize) the elements of the Lightmix. It would be very useful in complex projects.

I think that’s clear. But you can already do a lot by naming with a prefix and sorting. So let’s continue our little sprint here: I have a snippet I call to sort render elements by name and added it to the script (button “Sort”). Additionally added buttons for refresh (re-reading the elements from the scene) and a rename option. Changed layout, added versioning, added some macro event handlers, added icon definition, added dockable option. Did not change category, so it’s still to be found at category “RTstudio” as “Render Elements Organizer”.

Everyone feel free to further improve/extend it :smiley:

Good Luck

Edit: removed obsolete script

Thank u so much Frood this is what I was looking out for!!!
Its working beautifully in Corona, but…
I have tested on Vray and its giving me an error.

Sorry, that’s up to some vray user to fix. Looks like (some?) vray render elements have no “name” property. I have no license any more and cannot solve this right now. Possible solution would be a fallback to the class name as it is done in the collect section above and to test for the name property every time.

Good Luck

Thanks a lot, Ill try by myself, if not Ill try in the forum.
Thanks again i really use this more from Corona because of all the Lightmix render elements that needs to be included.

Thanks for this Frood, it works nicely.
However when I restart 3ds Max the script isn’t found.
I checked the folder ‘C:\Users*myUserName*\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usermacros’ and I can see the file ‘RTstudio-RenderElementsOrganizer.mcr’ in there so I don’t understand what’s wrong.

Thats strange Tom, I didnt have any issues, at all
Have you tried, delete it from User macros and drag again to viewport to intall it again?