Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on December 07, 2019, 01:30:50 AM

Title: render elements; objects and just shadow?
Post by: Dune on December 07, 2019, 01:30:50 AM
I need to make a semi transparent render of objects (houses, trees, people) in a landscape, but without the ground. Shadows need to rendered though, semi-transparent, so the render can be comped into an aerial photo or map, effectively sitting the objects on it, with shadows cast. And no, I can't have the maps/photo's as an image map projected onto ground; it should be added later.
I've never done much with render elements, and will do some experiments later, but I thought I'd ask first. Any idea if this is possible and how?
Title: Re: render elements; objects and just shadow?
Post by: Dune on December 07, 2019, 03:36:45 AM
This is what I need; houses/objects opaque, shadows semi-transparent, so they can be merged into a background, effectively darkening it. I've tried a few things with render elements, but can't find what I need. Also tried rendering on black surface and on white, trying merge stuff in Photoshop, but there must be a faster and better way from within TG.
Help urgently needed!
Title: Re: render elements; objects and just shadow?
Post by: cyphyr on December 07, 2019, 05:14:35 AM
The only way I can see how to do it is to render the buildings as one pass and then do another pass with the buildings hidden but casting shadows (use a shadow catcher node maybe) and then in Photoshop use the cast shadow as its own layer mask by inverting it (Ctrl I) which basically looks like what you have done here.
Unfortunately I can't see a way in TG to convert shadow to alpha.
Attached a photoshop file for clarity.

ChurchShadowMatte.zip
Title: Re: render elements; objects and just shadow?
Post by: Dune on December 07, 2019, 05:48:50 AM
Thanks Richard. In the meantime I have found a way to do this with (indeed) two passes (see screendump), but I was hoping for a single pass making this possible. Luckily the renders to be delivered aren't huge, but still...
Title: Re: render elements; objects and just shadow?
Post by: Tangled-Universe on December 07, 2019, 08:39:40 AM
That's some great info here, thanks for sharing your knowledge guys, I would not have had a clear idea right away how to approach this!