How do I best superimpose a rendered image onto a matched photo, keeping shadows?

For all the users of Twilight Render (V1 & V2), to ask questions and get started
Post Reply
Lemures
Posts: 12
Joined: Fri Jul 28, 2023 8:10 pm

How do I best superimpose a rendered image onto a matched photo, keeping shadows?

Post by Lemures » Fri Jul 28, 2023 8:27 pm

I'm trying to render a large scale solar array. Here I have taken a rendered part of it and overlayed it with a drone photo of the area in Photoshop. https://imgur.com/a/vlpVJbU .

Here you can see how I am rendering the array. https://imgur.com/a/shrTwHf . I use Match Photo in SketchUp to get the correct orientation for the render, and then put down a red ("flat" material) ground, and render from there.

My thought is that I can then take the rendered image and put it into Photoshop, and make the "red" transparent, that way I can keep the shadows on the ground appropriately. However, this is introducing issues, such as minor amounts of red reflecting off of the "aluminum" solar racking. If I leave off the ground plane, I don't get any ground shadows, which I need. If I project the Matched Photo onto a plane, it helps get the ambient coloring under the panels correct but it looks terrible when pasted into Photoshop due to the stretching, and I can't quite remove it from the render.

Ultimately, I want to render the solar array using Twilight, then superimpose the image over a preexisting drone shot within Photoshop, keeping shadows. Does anyone have any recommendations for this process? Maybe the shadows can be rendered separately and placed on a layer behind the rendered solar array, or something? Is there a way to "render" an alpha channel, such that any pixel that sees into infinity is just purely transparent when loaded into Photoshop?

Additionally, I would also ideally be able to play with Rayleigh scattering, potentially with either just a gradient in Photoshop or with a "depth render" in Twilight and then finding a way to introduce a light blue "fog" in Photoshop on that layer. However, when I do this depth render, it is ONLY black/gray/white. I almost feel like I once again need a fourth color, an alpha channel, that is purely transparent when that pixel is looking into infinity. Any ideas of how to do this for when superimposing onto an existing matched photo?

Fletch
Posts: 12906
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: How do I best superimpose a rendered image onto a matched photo, keeping shadows?

Post by Fletch » Mon Jul 31, 2023 9:09 pm

Lemures wrote: Fri Jul 28, 2023 8:27 pm I'm trying to render a large scale solar array. Here I have taken a rendered part of it and overlayed it with a drone photo of the area in Photoshop. https://imgur.com/a/vlpVJbU .
teBiLaG.png
teBiLaG.png (2.13 MiB) Viewed 2243 times
Render the Alpha Mask channel of any or all selected objects (be sure to check "render selection only" box in the Render Dialog box... then render with Alpha Channel setting found under the 20) Tech settings. Render it as 2x the size of the final image you need, and resize the image down in photoshop to get clean edges and avoid ghosting on the overlay.
Untitled-1.jpg
Untitled-1.jpg (69.78 KiB) Viewed 2243 times
Lemures wrote: Fri Jul 28, 2023 8:27 pm Here you can see how I am rendering the array. https://imgur.com/a/shrTwHf . I use Match Photo in SketchUp to get the correct orientation for the render, and then put down a red ("flat" material) ground, and render from there.
gNds5EA.png
gNds5EA.png (158.05 KiB) Viewed 2243 times
Render the Alpha channel of any or all selected objects using the Tech settings. Render it as 2x the size of the final image you need, and resize the image down in photoshop to get clean edges and avoid ghosting on the overlay.
Use Post Process "None" with Alpha Mask render setting.
Untitled-2.jpg
Untitled-2.jpg (191.82 KiB) Viewed 2243 times
Lemures wrote: Fri Jul 28, 2023 8:27 pm My thought is that I can then take the rendered image and put it into Photoshop, and make the "red" transparent, that way I can keep the shadows on the ground appropriately. However, this is introducing issues, such as minor amounts of red reflecting off of the "aluminum" solar racking. If I leave off the ground plane, I don't get any ground shadows, which I need. If I project the Matched Photo onto a plane, it helps get the ambient coloring under the panels correct but it looks terrible when pasted into Photoshop due to the stretching, and I can't quite remove it from the render.
Lemures wrote: Fri Jul 28, 2023 8:27 pm Ultimately, I want to render the solar array using Twilight, then superimpose the image over a preexisting drone shot within Photoshop, keeping shadows. Does anyone have any recommendations for this process? Maybe the shadows can be rendered separately and placed on a layer behind the rendered solar array, or something? Is there a way to "render" an alpha channel, such that any pixel that sees into infinity is just purely transparent when loaded into Photoshop?
:idea: :!: Sounds like you want to try the Sky Projection mapping to get the sky to act as a shadow catcher.
Shadow Catcher or Sky Projection Mapping

To match Background image in a rendering follow this video tutorial.


Lemures wrote: Fri Jul 28, 2023 8:27 pm Additionally, I would also ideally be able to play with Rayleigh scattering, potentially with either just a gradient in Photoshop or with a "depth render" in Twilight and then finding a way to introduce a light blue "fog" in Photoshop on that layer. However, when I do this depth render, it is ONLY black/gray/white. I almost feel like I once again need a fourth color, an alpha channel, that is purely transparent when that pixel is looking into infinity. Any ideas of how to do this for when superimposing onto an existing matched photo?
Subject: Making fog?

Lemures
Posts: 12
Joined: Fri Jul 28, 2023 8:10 pm

Re: How do I best superimpose a rendered image onto a matched photo, keeping shadows?

Post by Lemures » Wed Aug 02, 2023 1:12 pm

Hello @Fletch, this was a great set of responses, thank you. I intend to be purchasing Pro soon, so I haven't been able to test this yet. Can I do one of the following?

1. Capture a render of JUST the shadows onto a shadow catcher, and not the rest of the objects, such that I can place the shadows onto their own layer in Photoshop?

2. Have the shadow catcher capture the transparency of the shadows in the alpha channel?

Let's say I just have a single pole standing upright, and the sun hitting it at an angle; The pole will cast a shadow onto the ground. I want to be able to copy that opaque pole and the semi-transparent shadow into Photoshop and paste it over a drone or cell phone photo from the appropriate angle, such that the pole is entirely opaque, and the shadow properly colors the "ground" in the photo due to being transparent.

Is there any way to capture the transparency of the shadows?

Thanks!

Fletch
Posts: 12906
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: How do I best superimpose a rendered image onto a matched photo, keeping shadows?

Post by Fletch » Thu Aug 03, 2023 9:25 pm

There is not a way to catch the transparency of the shadows.
You can create two renderings.
First rendering would be with your HDRI sky with a sun and trees/clouds
The Second would be using a small resolution spherical image 800px wide by 400px high that you create in photoshop that is pure 50% grey and use Sky Projection template to set the 50% grey .jpg sky as the ground. then you get the shadows on a 50% grey background, then you can overlay that in photoshop with "overlay" mix mode on the layer, anything 50% grey and brighter would be ignored and only the shadows would make the ground darker where the shadows would fall on the ground.
Use the alpha mask on that shadow layer to isolate only the shadows and not the geometry of the rest of the scene.

I hope this is clear.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 42 guests