How Can I Create A Light Switch from A Set of Lights?

   4668   11   2
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
Hi,

Everyone how can i create a light switch from a set of lights? I have 3 lights + a skydome in the first set,and the same amount of lights with different settings in the second set.How can I make two groups and switch between them?Instead of enabling and disabling each individual light on each set that I want to use.I've tried a few configurations,but have not been able to make them work.If anyone has any ideas I will deeply appreciate your help?

Thanks
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you can make a control object - and build a UI that drives all your lights…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
What type of operator node do I use? I tried a null,Geo node,and a light node and copied the lights inside.Also put them into subnets,and into a LightBank assigned a group to each set in the LightBack,but couldn't figure out how to link the LightBank list groups into a node.Each light node shows its part of a group. :?:
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you can simply make a null
then edit it's parameters (the gear menu)
add a toggle (call it LightSet1)
then RMB on the new toggle and select Copy Parameter
now RMB over the “Enable” parameter of your light - select Copy Relative Reference

now when you toggle LightSet1 it will turn on/off your light….
just keep doing this for whatever parameters you want…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
THANKS…!!! That did the trick AWE…! I got the Hda,interface,and icon made just trying to figure out how to link the hdr image that I embedded into the hda to the skydome light's color texture parameter so I can share the hda. Had no problem linking the icon,but the hdr won't link. Here is the the path,( opdefObject/my_hda_name?my_hdri.hdr )With the actual hda and hdr file names of course i tried different operator types still no link? The Object op worked for the icon. This is an Arnold light rig by the way don't know if it makes a difference. Any suggestions?
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
where ever you have a file chooser you can browse to files located in hdas
just use the built in path - top left
opdef
then, in this case choose Object
then scroll down to your hda
and you should see the list of Extra Files in that hda..

if you're still having issues you can upload your hda and I'll have a look (I can supply my own hdr)
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
Arctor I've done that don't know what's happening or what I'm doing wrong? I attached the Hda file and an image of each light set. I use it to build Arnold materials. HtoA render settings are at default except for ray depth in the refraction parameter it's set to 4,and light samples are set to 4 on the lights.

Arctor can you please take a look at it, and see what I'm doing wrong?
THANKS ALOT FOR YOUR HELP!

Attachments:
Alch_Arnold_Light_Rig.hda (22.0 MB)
LightSet1.jpg (316.4 KB)
LightSet2.jpg (343.7 KB)

User Avatar
Staff
3455 posts
Joined: July 2005
Offline
I can't test this as I don't have arnold - but it doesn't look like you're doing anything wrong….
maybe the arnold forums?

also - does the hdr work when used just by reading from disk?
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
Yes, if I add the hda and then point to the hdri it woks. So…I really don't know what's up? The asset is functional just won't be able to share it with a default hdri embedded.

THANKS FOR YOUR HELP MAN
User Avatar
Member
99 posts
Joined: July 2007
Offline
Hi,
i dont think HTOA supports “opdef ” its an internal path and HTOA would have to export the embedded hdri to .ass and i'm not sure that .ass supports images in it. I might be wrong thou.
User Avatar
Member
10 posts
Joined: Jan. 2015
Offline
Thanks,

OwlYzarc My main focus was really to be able to switch between a set of lights. The HDRI thing was just something extra that I wanted in the hda. This rig is just to build materials for Arnold. The HDRIs are always in the same spot so they will load in any scene I add the hda. The asset fully functional if guys decide to use it just add your own HDRIs.

Arctor
Thanks again for your help
User Avatar
Member
13 posts
Joined: June 2018
Offline
goldfarb
you can simply make a null
then edit it's parameters (the gear menu)
add a toggle (call it LightSet1)
then RMB on the new toggle and select Copy Parameter
now RMB over the "Enable" parameter of your light - select Copy Relative Reference

now when you toggle LightSet1 it will turn on/off your light....
just keep doing this for whatever parameters you want...

Thank you for this answer, it is working.

What about having a larger set of lightings to switch on/off and wanting to use an int slider (basically like the switch node)

Then the different lighting presets can also be used with 'Tops'
Edited by paulfe - Aug. 28, 2023 15:14:46
  • Quick Links