From the lights panel, the Skylight intensity is always shown as 1 and can’t be edited, whereas its intensity in Rendering panel can be adjusted. What am I missing, are these two different settings?
Is there a reason why the exported Sun settings don’t contain the Skylight intensity value? We tend to use this a lot, but the sun-skylight pair is usually correlated for the best effect for various sun time/intensity. It would be great if the skylight intensity can be saved/restored from the *.rsun files as well. Currently many other Skylight settings are in the rsun files, including its on/off state but not that one:
On 1) skylight intensity can be changed in the light panel when an environment for skylight is set that supports it. That said, I think skylight intensity should be always changeable, even for environments that don’t have an HDR as their texture.
RH-65679 Allow changing skylight intensity at all times, but see also RH-64218 Enabe intensity control in skylight even without HDR texture
On 2) the answer is: @andy forgot. RH-65680 Add skylight intensity to rsun
OK - the way this is designed, it can’t be done the way you want it to work…because…
In fact the “Skylight intensity” edit box is really a shortcut to the “HDR multiplier” value in a HDR or EXR texture. The data is actually stored on the texture, not in the document.
We need this number stored in the sun data file to save/load along with other sun settings:
Can the Sun data remember the setting and apply it to the current active texture then?
From user standpoint the sun + skylight is a combo that works together for a specific shading look, so from UI staindpoint I want to save the same “look” with Sun, since Sun also remembers Skylight On/Off.
Low sun needs brighter skylight for example, high sun darker, also depending on sun intensity factor. It is very hard to work with when some settings are saved and some not.
On the document RhinoDoc you can use the property CurrentEnvironment though which you can get the RenderEnvironment used ForLighting, which is the skylight environment. Once you have the skylight environment instance you can use GetParameter with as argument the string "multiplier" to get the skylight intensity.
I think I have somewhere a snippet of code to access this using Python. I’ll try to dig it up. Main thing is that data retrieved using GetParameter is a variant, and that needs to be converted. Not hard once you know, until then it is less fun.
I am failing to get the “multiplier” parameter to change the skylight intensity or read as anything other than zero. Has something changed? I am on Rhino 7.23.
My goal is to use scripting (via a C# component) to turn on and off the sun and skylight as well as change their intensities: I am able to do everything but alter the skylight intensity. I can type in the skylight intensity in the Lights panel and that works as desired, but I want a scripting technique to achieve the same behavior.
You’re looking at the skylight shadowintensity property, but that isn’t used at all anywhere. It is not the same as the intensity setting. In your SkyParams script you need to also use GetParameter on both “multiplier” and “rdk-texture-adjust-multiplier” and multiply those together to get the final intensity. Changing skylight intensity works only for the case where an HDRi environment is used, so you’ll have to go through that route.
edit:
Setting the skylight intensity can only done via the HDRi environment as mentioned. You don’t do it directly on the RenderEnvironment.