Transparency shadow threshold
-
Up to V3 (I think) there was a control for adjusting the threshold at which transparent surfaces would begin to cast a shadow...you could take it above or below the now-standard 70%. As with the present fixed value, it was a global control.
Given that so much junk still resides within the program (like old splash screens and Elmer Fudd), I was just wondering if it was still possible to call the appropriate routine via a Ruby (assuming it could be found)...much like the Fog script did before the control was eventually taken off the debug menu and built into the program proper.
I'd have thought that the ability to adjust the shadow threshold would have been quite useful in some circumstances. I can't imagine why the facility was dropped.
[Alan Fraser]
-
I agree Alan...
bring it back...
-
I got inspired to try this and after some help I got it working.
I ended up writing two scripts:JS Shadow Threshold
Set the threshold for when a transparent object will cast shadows.
Works on either entire model or a selection.JS Shadow Control
Set if a selection should cast or receive shadows.Get them at my site: http://www.pixero.com
Enjoy!
Jan
-
Sweet... thanks sooo much!
-
Excellent, Jan. The original function was a global control. The ability to now apply it to selected items will be very useful.
[Alan Fraser]
-
Jan, Thank you for this but I must be doing it wrong.
I drew a vertical rectangle so that it would cast a shadow on the ground. I applied a texture to it and made it a group. I've tried setting the threshold to .5 but I still don't get a shadow when the opacity slider is set below 70. Or is this only functional on textures imported with transparency?
-
yea even i dont get it.. how do we actually do this threshold thingy? should we make the object into a group???
-
You have misunderstod its purpose.
It's for setting objects with transparency to cast shadows or not.
The only way to get SketchUp to cast shadows matching a texture with alpha channel would be to "cut it out" in the shape of the image. -
So, in other words this doesn't change the opacity level at which materials/textures applied in SU cast shadows. Instead it would be used to prevent the transparent parts of components from casting shadows. Maybe like in the case of the 2D trees?
-
No Dave, I think the other way round. This does not change SU behaviour with png files and alpha transparency but should let you decide when to cast shadows and when not (not just at the 70% threshold).
-
But apparently not with texture/materials applied to geometry in SketchUp?
-
I don't know - haven't tried.
Try with a simple colour first to see... -
I did. I applied a color to a face. I selected it and then tried setting the threshold to .5 and then adjusted the opacity slider in the Edit materials box. As soon as the opacity dropped to 69 the shadow disappeared.
-
-
Yeah, I get the same results (downloaded it finally).
Hm... -
Hmmm... there seem to be a problem. Now it doesnt work the way it did when I tested it.
I'll try it more at work tomorrow.
For now you can use the other script, jsShadowControl, to turn shadow casting and shadow receiving on or off. Even for non transparent objects.
Advertisement