I guess I’m not understanding what you’re asking here…
A shadow color of BLACK used at 100% Intensity will yield black shadows.
If you had an Intensity slider, and set it to 50%, then black at 50% intensity will yield gray.
So what is the difference between setting something to 50% and simply setting the color to gray? You get exactly the same result. The same thing applies to any color… If you use solid RED as your color (i.e. RGB(1.0, 0.0, 0.0)) and set the Intensity slider to 50%, then you’re going to get something that is 50% of red (i.e. RGB(0.5, 0.0, 0.0)). So again, what’s the difference between setting a slider, or just computing the color yourself and setting that color?
There is a difference now in Rhino as it looks like your shadows are not in :Multiply" mode, so gray shadows actually can get brighter than the surface they are being cast on. This is not good.
The “intensity” would be a percentage of the opacity of the shadows.
The last one (intensity 50%) is achieved by a trick - somehow in Rhino sun settings file saves shadow intensity as part of the settings file and applies it when loaded back if edited, this is just not exposed in UI: (see script here)
Left image shadow color is 100% black (RGB 0,0,0).
Center: RGB 128,128,128 (That’s my 50% Gray)
The last one must be RGB 0,0,0 but with 50% opacity which is the effect we are after with the original request (I guess!)
What should you get if your shadow color is white? Certainly not something that is darker That’s the whole point of the shadow color… to produce an effect that is otherwise not possible. Just like if you try to cast/see dark shadows in a dark environment, then you’re just asking for failure… So if you try casting light shadows in a bright environment, again, you’re asking for trouble… If you use a “lighter” shadow color, then you better plan on using a darker environment.
Ok that is cool, but I was simply trying to point out that suggesting making shadows grey doesn’t solve the request for shadows intensity. Which is “transparency” of your shadow pass applied in the viewport, regardless if it’s white, black or pink.
Ok maybe it’s Friday night effect. No worries I will give up soon. But maybe check the script I linked above. Make a simple scene with sun, have your shadows whatever color you want. Run the script and try values below 1 for shadow transparency. Somehow it works with that workaround using by saving the Sun data file, editing outside Rhino, importing back (the script merely automates it). It just would be nice if apart form the color of the shadow, there was a slider or a text field for shadow transparency, intensity… whatever you want to call this. This is certainly different than shadow color.
In this case, the less “intensity” the more gray shadow would look like…
Imagine your shadow is just a separate image your overlay over your view (which I think you are in Rhino display pipeline since it is a map).
So, now imagine the intensity controls the Alpha (transparency) of that shadow image. Just makes it less.
As if you were changing shadow layer transparency in Photoshop, but dynamically in Rhino display pipeline…
Does it make sense? For some reason I can’t record a video now but the script above pretty much illustrates it, too.
I think I’m starting to understand… however, if I approach it like a layer in PS…then that means you can get a result that is 100% shadow map only…right? Which is not a desirable result (IMO), and is not really the same thing as a shadow’s “intensity”… I’ve actually just tried mocking this up using PS…
Which is just the shadow map again… and I don’t think that “100% shadow intensity” means “only the shadow map”… So there has to be more logic in there somewhere that only applies to actual shadow pixels… which now makes this more than just a simple multiply.
When I learnt to paint, I was told that shadows are not a specific color but the color of the surrounding and also that shadows are always darker than the original surface. With these two basic principles you can realistically paint any shadow. So for example, if we have green grass on a sunny blue day, what color is the cast shadow on that grass. In this case the shadow should be a mixture between green and blue and always darker than the original green of that grass. How much blue should we use? well that’s what I think @Holo and @Jarek are referring as density here. How much of that blue you want to see on that grass but always making it darker.
Ok, I gave it some more thought and digging. The ultimate goal did not change for shadow intensity, but maybe I was wrong how to get there, not understanding how Rhino display pipeline is handling applying the shadows pass in the viewport. If we were offered only black shadows, then obviously just applying the shadow map in Multiply mode with some opacity would be enough, but with color shadows it gets a bit more tricky.
… and use it as information of how much of the Shadow Color (Black, Cyan, whatever) gets applied on top of the No-Shadow image (the more white, the more opacity of the Shadow Color), We ca reproduce what Rhino currently does:
Full Cyan Color with Inverted Shadow Map as Alpha Mask over No-Shadow image:
Now, this is somewhat confirmed by the “Sun Shadow Intensity” hack script mentioned above. We are exporting Sun Settings to .rsun file, and messing with this setting before reimporting it (script automates it):
In conclusion, the desired effect is just “less” shadow, whatever color we chose it is.
As if we took the first “No Shadow” image in Photoshop, put the one With Shadow on top of it, and just control the top layer transparency…
From the above maybe under the hood it is playing with the brightness of the Shadow Map pass shown by TestShowShadowMap. I don’t know. But I hope this explains it a bit better and may give you some idea what we are after and how to implement this…
hi José, that’s how I thought it works since I almost never touch Shadow color in Rhino, but with the option of any shadow color the Multiply mode will not cut it. The implementation in Rhino must be a bit different. Maybe the above helps. Intuitively I thought this is pretty straight-forward request but clearly there is more to it.