This is a question for @DavidEranen, but it’s basically degradation values I believe…but David will be able to add the details…
Jarek, get out of that dialog!
@Jeff, i’d love to! But it’s too intriguing I didn’t try changing any of these settings for Skylight shadows, but the reason I am interested is the problem with the way they are implemented now. I think I mentioned that before but so far don’t see a solution, so maybe it is in these settings?
Basically, Skylight and Cast Shadows quality is tied under one quality slider. Unfortunately what looks OK for one is not true for the other. This UI simplification is not a great idea…
Skylight shadows looks pretty good even in lower values and not much difference is noticeable between middle and max of the slider, whereas Map-based Cast Shadows, unless Max or close too max, look…well, BAD. Sometimes I even have to set them to beyond allowed slider range via script to get the quality OK. But my point/problem is, when both Skylight and Cast shadows are ON, for example in render mode, it is impossible to have good looking viewport with good performance. Ideal combo would be low-quality Skylight + high-quality Cast Shadows, for speed and look.
That’s why I was hoping these settings could help to reduce Skylight quality even if the Shadows slider is set to Max, so we can have good speed of theviewport navigation.
In the long run, I hope you can consider separating UI sliders for Skylight and Cast Shadows quality.
So looks like these settings do exacly that - reduce the size of the SkylightMap, independently of the slider.
Defaults are 1,2 - if changed to 2,3 - good speed improvement in display modes with skylight and cast shadows with high quality shadows - still sharp cast shadows and almost unnoticeable quality difference of skylight. 3,4 even faster, with slight degradation visibility. Changing these actualy makes the AO+CastShadows workable in real-time. I’m really glad I found this : )
Was this added recently?
Are these two settings available to Get/Set via RhinoCommon ? (if not, please consider this a wish)
Here’s how they work:
SkylightShadowResolutionScale and SkylightShadowResolutionScaleDynamic control the resolution (i.e. the amount of pixels) the skylight shadows are rendering at.
Valid values are between 1-3.
SkylightShadowResolutionScale = 1 means native resolution. A value of 2 means the pixel resolution is halved, a value of 3 means it’s one quarter of native resolution.
SkylightShadowResolutionScaleDynamic is the same as above, except this one is used when rendering a dynamic display, for example when a user is rotating the viewport camera around.
As you can see, by default we render at native resolution and half the resolution during dynamic draw for more responsiveness. If you’d like to render at full resolution during viewport manipulation, just change SkylightShadowResolutionScaleDynamic to 1.
Thanks David, I actually like lowering the quality so for high quality cast shadows slider, Skylight shadows don’t slow down the display (for the reasons noted above).
Would you know how to change these settings from a script / RhinoCommon ?
I’m not very good with Rhino scripting. @nathanletwory might know.
I forgot to mention: On high-DPI displays we do an additional halving of the render resolution during dynamic drawing. So even though the values are 1 (normal) and 2 (dynamic), on high-DPI displays it’s acting as if it’s 1 (normal) and 3 (dynamic).
This is why this is an advanced option: because it’s not completely obvious and intuitive. It’s there so that if some people experience a very slow display, there is a way to overcome it.
Thanks David, I have normal DPI display and decent video card, but a combo of high-qualiy cast shadows and skylight kills the performance in render mode. Each of them separately in high quality works very fast, but with both on, it slows to a crawl. Great to have this setting to handle that case, too!
It should go along the lines of other setting fiddling you have done in the recent history.
I can only see AA settings in OpenGL appsettings:
Also, searching for “skylight” in RhinoCommon help doesnt show anything related to the above settings. Is it possible that it is not changeable from RhinoCommon at this point?
Well, less then a year is almost like recent history (:
Yes, NOW I remember that this was more convoluted than simple search in RhinoCommon help! Didn’t use it ever since that one. Thanks for the refresher and sorry abount asking the same question again and again.
import Rhino settings = Rhino.PlugIns.PlugIn.GetPluginSettings(Rhino.RhinoApp.CurrentRhinoId, False) s = settings.GetChild("Options").GetChild("OpenGL") s.SetInteger("SkylightShadowResolutionScale", 2) s.SetInteger("SkylightShadowResolutionScaleDynamic", 3)
is the best way to learn.
(it’d be useful if some of the information also were retained by the brain - in this case yours - eventually, of course )