Foreground alpha channel?

Started by N-drju, March 22, 2017, 12:54:41 PM

Previous topic - Next topic

N-drju

I am going to make a composite image - DS rendered object and people and TG generated environment.

The problem is that there are some plants (tall grass and ferns) between the camera and the supposed location of the house and people. I can't just carelessly paste the DS render over these plants...  ::)

The question then is - how can I capture the shapes of those grasses as an alpha channel and then erase those parts of the DS render that collide, thus, bringing the front vegetation back into the final product?

Thanks for help and ideas. :) Reference image below, so you can see what I'm trying to do:


"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

I think you could use the depth pass and work on the greys in PS to 'cut' out (make very white, rest black) only the front grasses and use that as blending mask.

N-drju

Aaah, I cracked it. In Terragen. I posted this topic because I thought something changed from TG2 to TG3 but it's the same. A little more complicated maybe, but it's just the same.

If you dig deep enough in your Terragen 2 and "My documents" folder (yeah, I know - sorry Apple users :P) you can find extra white-out images. White color is put in place of everything, terrain, objects, except for the sky. This can later be used as a mask for whatever purpose you desire. That is, if you control it appropriately.

In Terragen versions starting from #3 you need to do the following to get an "alpha mask" for composite renders:

1. Deactivate all objects except the ones that you want "alpha masked". If it is a part of one or more populations just mask the relevant area with SSS or painted shader, I don't know...
2. Deactivate the planet surface. The population will be planted correctly, so don't worry.
3. In the Render tab open your render settings. Go to sequence/output tab.
4. Check "Extra output images" - this is the crucial point!
5. Pick a directory where the said extra output images will be created.
6. Hit the "Render all to disk" button (as of TG3).
7. Go to the directory that you chose for extra output images. You should see a duplicate full-color image and also another black image with white mask painted exactly in the spots where your "alpha-masked" objects are sitting.

Then, use PS or any other program and composite the image. It may require some adjustments as far as the edges of the foreground objects are concerned but this is actually the easiest part, trust me!
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Matt

#3
Just like TG2, in TG3 and TG4 you can have renders automatically saved to My Documents (or any other location of your choice). It's an option in Preferences -> File Saving. It is turned off by default.
Just because milk is white doesn't mean that clouds are made of milk.

N-drju

"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Matt

As with TG2, if you enable the option to automatically save renders then it saves two images: RGB and alpha.
Just because milk is white doesn't mean that clouds are made of milk.

luvsmuzik

Well, now this is nice to know. Thanks for asking that!