General Category > General Anim8or Forum

Transparent material that can receive shadows?

<< < (2/3) > >>

thecolclough:

--- Quote from: ronaldefarmer on January 03, 2016, 05:32:41 pm ---...but what I'm trying to do is capture the shadows of objects while saving to PNG with transparent background.
--- End quote ---

how i'd do it (admittedly involves a 2-pass render process, and a medium/advanced graphics package):

* do two new versions of the render, saving both as RGBA PNGs:
* #1: one which has the yellow object, but change its material so that both its diffuse and its ambient are set to RGB 255,255,255 (for this pass, you might have to temporarily change the light type to infinite instead of local, to prevent that funny extra ring of shadow around the edge of the yellow object)
* #2: one without the yellow object
* in your graphics package (personally prefer GIMP, but whatever):
* load render #1
* give it an alpha channel derived from the existing luminance data (if using GIMP, you'd right-click the layer in the layers dialogue, pick 'add alpha channel' from the menu, and then select the 'greyscale copy of layer' option; can't give detailed instructions for Photoshop or other packages)
* invert the alpha data so that the shadows will become opaque and the background transparent (instead of the other way round, which would be the default result in GIMP and possibly in other packages)
* change the layer's brightness, making everything as dark as possible - this should stop the background shadows from having a white feathering around their edges in the final result - but being careful not to change the alpha data again while you're at it
* load render #2, and paste it as a new layer on top of the one you've just modified
* ...and that should do the trick, unless i've been clever and missed something...

thecolclough:
also, don't know if you'd noticed, but in your current setup the right-hand edge of frame is clipping one corner off the shadow of the dodecahedron, and same with the cube at the bottom edge...

cooldude234:
I think we all miss-understood your question  ::)
I think what you are referring to is a shadow catcher... which is not feature.


Ask Steve about it *nudge* *nudge*

ronaldefarmer:


--- Quote from: cooldude234 on January 03, 2016, 07:20:59 pm ---
    I think what you are referring to is a shadow catcher... which is not feature.


--- End quote ---

Yes, shadow catcher. I never heard of it before but that is exactly what I want to do.



This is a little bit closer. I'm experimenting with using a transparency map. I could probably edit this to work, but to get really good results, a special transparent material that only shows shadows would be useful. I will add it to my already lengthy wish list.

Raxx:
Same process as I described before

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version