Give shadows to transparent material ??
-
Is anybody knows if it is possible to overpass the native SU limitation to cast shadows for transparent materials ?
- a note taken in SU guide:
Note - Faces with less than 70 percent opacity are considered
transparent, and do not cast shadows. Faces with 70 percent opacity or
greater cast shadows. Transparent faces cannot receive shadows. The
following image shows a transparent (less than 70% opacity) rectangle that
does not cast a shadow (left) and a opaque (70% or greater opacity) rectangle
that does cast a shadow (right).*simon
-
If you want a 75% transparent thing to cast NO shadows then group it and in its 'Entity Info' set it to 'cast no shadows'...
If you want a '50%' transparent thing to cast a shadow then you need to apply a transparent png texture to the material of the faces, that will cast a shadow even though it's completely transparent - you will need to change its transparency to ~75% to make a shadow BUT it will still appear transparent anyway... If you want the level of transparency to vary then adjust that etc in a copy of the png...
I've attached a png for you to try, it's fully transparent, but can be adjusted in an image processor...
-
Dear Tig,
@unknownuser said:
If you want a 75% transparent thing to cast NO shadows then group it and in its 'Entity Info' set it to 'cast no shadows'...
@unknownuser said:
If you want a '50%' transparent thing to cast a shadow then you need to apply a transparent png texture to the material of the faces, that will cast a shadow even though it's completely transparent - you will need to change its transparency to ~75% to make a shadow BUT it will still appear transparent anyway...
Hum ! It seems to be an excellent tip, but I don't succeed to make it work!
I have tried this in several ways: to import the transparent PNG as a picture, as a texture, and to paint the faces or to project it.
The picture appears each time black and I have to modulate its transparency. The shadows disappear under 75%.
And I don't know how the complete transparency with shadows had work one time, but I can't redo it.maybe a little more help ?
-
@simon le bon said:
Dear Tig,
@unknownuser said:
If you want a '50%' transparent thing to cast a shadow then you need to apply a transparent png texture to the material of the faces, that will cast a shadow even though it's completely transparent - you will need to change its transparency to ~75% to make a shadow BUT it will still appear transparent anyway...
Hum ! It seems to be an excellent tip, but I don't succeed to make it work!
I have tried this in several ways: to import the transparent PNG as a picture, as a texture, and to paint the faces or to project it.You want to use an alpha .PNG file with the transparent channel set to 80% transparency. This will be a solid color image, with the transparency of the entire image set to 80%. Then when you place in SketchUp as a texture, you will make the texture 100% opaque. The 100% opaque will cause SketchUp to cast a shadow from the entire face. The 80% alpha transparency on the .PNG will cause 80% of light to pass through the face.
-
Simon - no need to import as image etc. Make a new material, edit it and add the png image to it as a texture. Done.
I've attached a working .skm for you... It's in a zip file - simply unzip it into the skm format file and put that file into one of your Material Folders that's listed in you Materials Browser and then you can just use it on faces. It's then in the Model... As Al said you must have the Material's opacity at 70%+ - this one is 100% which is probably best as that will definitely cast a shadow ! I think we have been confusing Opacity and Transparency !
Hope this helps...
TransparentDummy.zip -
I think you should be able to attach skm files here (btw since they are zip files actually, a simple "rename" should also work in case you cannot).
I have a transparent material for this purpose only - it's 1 pixel x 1 pixel (so shouldn't overload your system) but keep losing it all the time. Thanks TIG for sharing one again (now I will be too lazy to make my own)
-
Pixero (Jan Sandström) has a Ruby called "JS Shadow Threshold", the explanation goes;
"Set the threshold for a transparent object to cast shadows. Works on either entire model or a selection."
But this plugin never worked in my environment. It might work in some other, though.
http://www.pixero.com/downloads_sketchup.html -
@takesh h said:
Pixero (Jan Sandström) has a Ruby called "JS Shadow Threshold", the explanation goes;
"Set the threshold for a transparent object to cast shadows. Works on either entire model or a selection."
But this plugin never worked in my environment. It might work in some other, though.I took a look at this ruby. It uses the opacity setting on a material (0.20 means 80% transparent) and set the "cast shadows" setting on the surface containing the material based on the opacity of a material. This would let you mark items containing material more than 70% opaque (less than 30% transparent as "non shadow casting", but would not do the opposite - make materials less than 70% opaque (more than 30% transparent) cast shadows.
So it would not help with the original problem (in simon's second post): "How to make a 80% transparent (20% opaque) material cast a shadow."
-
Dear Tig and Al Hart, Gaieus and Takesh
Thanks a lot for your help. I still need to understand one or two things:
- like to study Alpha Channel in Photoshop,
- why two different transparent png registered as different materials inteferes,...
- just+a+shadow.png and TransparentDummy.png (1by1 pixel!) react differently.(> see pictures)
But the principle is now clear in my mind, and I shall be able to work on it.
@unknownuser said:
Simon - no need to import as image etc. Make a new material, edit it and add the png image to it as a texture. Done.
working perfect !
@unknownuser said:
I've attached a working .skm for you...
I appreciate a lot
(Transparent for Dummy )
(I have found this not very far from what we are talking about: Using Images with Alpha Transparency as Components in SketchUp)
And I can now use this tip in my next production: two glasses for the Rum Pitcher
**simon.
-
I just realised that TransparentDummy.skm could be taken two ways !
It's "a material that's not really a material at all since you can't see it" ( i.e. 'it's a dummy'): it wasn't meant to be "a transparent material for a dummy" ! BUT as we say in Northern England, "If the cap fits wear it..." -
@tig said:
"If the cap fits wear it..."
This cap fits very well to me . I have still a full basket of newbie questions. It seems that the more I learn, the more the boundary of knowledge recedes.
So I have taken your TransparentDummy.skm as a friendly to me.
simon.
-
"If the cap fits wear it..." - said to M. Bonnet*
I hadn't even thought of your surname* when I typed that line !
But I keep putting double meanings into everything I type/say lately - my brain must be splitting in two - that's either multi-tasking or schizophrenia ? ...
Advertisement