TG3 - black/white render mask

Started by shadow92, June 14, 2014, 11:50:40 AM

Previous topic - Next topic

shadow92

Hi folks, Im in a process of rendering an animation, its a simple camera movement and I would like to make another render containing only black and white mask of selected objects. Here I put a static image from the middle of animation to make more sense for you:


What I want to do is separate a castle, terrain and trees from the sky, because Iwant to play with the sky little bit in after effects so I need to render a mask that will define its borders. I know there are some options to render elements but I cant figure out how to set it up for this one.

Every help is appreciated. Thanks

Tangled-Universe

Hi Shadow,

Quote from: shadow92 on June 14, 2014, 11:50:40 AM
What I want to do is separate a castle, terrain and trees from the sky[/b], because Iwant to play with the sky little bit in after effects so I need to render a mask that will define its borders. I know there are some options to render elements but I cant figure out how to set it up for this one.

Instead of creating masks for objects terrain etc. which allow you to play with the atmosphere in post, it would be much easier to just generate a mask for the sky itself.

Fortunately the render elements allow you to do this and also fortunately it always works the same ;)

How it works is a bit funny/weird, because you have to set it up in 2 places and you need to treat the thing like if it is you're rendering a sequence of frames.
I hope some day a single menu/tab will be created which allow you to set up render elements more straightforward and easily, especially for stills instead of animation.

Anyway, here's how:

1) In the "Sequence/Output" tab of the renderer enable "extra output images".
2) Specify the folder to save the render elements in and usually I don't change the filename convention TG is suggesting, but I do change the extension from .bmp to .exr.
(I'm not entirely sure if render elements are automatically being written as .exr, so just to be sure I always change the extension therefore)
3) In the "Layers" tab of the renderer click on the green plus symbol and create a new render layer.
You should now have a new render layer called "Render Layer 01". It is automatically assigned to the renderer, otherwise you wouldn't see it show up.
4) Click again on the green plus symbol and select "Go to "Render Layer 01"".
5) Skip the first 3 tabs, for your purpose of generating an atmosphere mask it is set up correctly, so go to "Render Elements"
6) Enable export of "Atmosphere Alpha".
7) Optionally you can also export the Surface Alpha as an inverted mask.
8) Render your image, but do NOT use the "Render image" button!
9) Render your image using the "Render sequence" button in the "Sequence/Output" tab where you started at step 1.
Also, set "sequence first/last" both to 1, otherwise your image will be rendered 100 times ;)

Yes the latter is the awkward way of doing this I mentioned before...but it works.

Advanced suggestions/ideas:

Also export:

RGB
cloud indirect
cloud direct
atmosphere indirect
atmosphere direct
surface indirect specular
surface direct specular
surface indirect diffuse
surface direct diffuse


In Photoshop stack the render elements in the order I mentioned right above here and set all the layers, including the base layer(!) to "Linear Dodge(Add)".
Set "RGB" to normal though and make it invisible.

With all the layers set to additive mode they should effectively reproduce the "beauty pass" = "RGB".
So you can check this by activating the RGB layer in your Photoshop document and compare visually.

Now you have full control over how strong your shadows will be for example.
Say you would like a bit more detail in shadow, then simply duplicate the "Surface Indirect Diffuse" layer and you have twice as much going on in the shadows.
As a consequence, you can now also tinker with the clouds seperately, without affecting the colour of the sky!

Good luck and enjoy!

Cheers,
Martin

shadow92

Hi, thanks for your answer. Tryed your suggestions right now but unfortunately it didnt bring desired results, maybe we misunderstood eachother  :D
When I set it up as you suggested (followed step by step), when hit Render Sequence it renders also beauty pass, I mean entire scene and all I need is to render that black/white "pass" or whatever we call it :D And I need it as animation, too.
My animation is 120f long and I already rendered it all as beauty pass (dunno I use right name, simply rendered scene classically), it took like 55 min for frame and for that reason I can not afford render it all again + black/white pass, I just need the second one. Maybe I set up wrong something, but generally, it always renders beauty pass, too. And I dont need that one, because I have him already

bobbystahr

Quote from: shadow92 on June 16, 2014, 05:49:09 AM
Hi, thanks for your answer. Tryed your suggestions right now but unfortunately it didnt bring desired results, maybe we misunderstood eachother  :D
When I set it up as you suggested (followed step by step), when hit Render Sequence it renders also beauty pass, I mean entire scene and all I need is to render that black/white "pass" or whatever we call it :D And I need it as animation, too.
My animation is 120f long and I already rendered it all as beauty pass (dunno I use right name, simply rendered scene classically), it took like 55 min for frame and for that reason I can not afford render it all again + black/white pass, I just need the second one. Maybe I set up wrong something, but generally, it always renders beauty pass, too. And I dont need that one, because I have him already

TG3 does render, without asking it, an alpha render of sorts. I've attached one from a scene with no clouds( you could turn yours off for the render to get this) and it may do what you need ...it's in colour so you'd have to tweak it in PS tho to get a B&W mask. Hope this is helpful.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Tangled-Universe

Quote from: shadow92 on June 16, 2014, 05:49:09 AM
Hi, thanks for your answer. Tryed your suggestions right now but unfortunately it didnt bring desired results, maybe we misunderstood eachother  :D
When I set it up as you suggested (followed step by step), when hit Render Sequence it renders also beauty pass, I mean entire scene and all I need is to render that black/white "pass" or whatever we call it :D And I need it as animation, too.
My animation is 120f long and I already rendered it all as beauty pass (dunno I use right name, simply rendered scene classically), it took like 55 min for frame and for that reason I can not afford render it all again + black/white pass, I just need the second one. Maybe I set up wrong something, but generally, it always renders beauty pass, too. And I dont need that one, because I have him already

The renderer *always* renders the beautypass when you do it the way I describe. The beautypass simply means the end result as rendered.

But I also explained how to enable output of masks and other elements. The folder should also contain subfolders now called things like "tgSurfDirectDiff" or "tgAtmoAlpha" etc.
The way I described it was to enable it for a single frame, since you didn't mention it was for animation.

If it is for animation then you can still follow the steps except that you need to change "sequence last" to 120.
I guess since you have already rendered your animation before that you know how these things works.

Thus, as it seems now, you need to re-render your scene, because you basically forgot to write out the elements you needed.

Perhaps next time, without even being sure you need them, render the elements out anyway. Better be safe than sorry, especially with animations.

Matt

When you re-render, you could turn off all lights and atmospheres to make it render faster.

Matt
Just because milk is white doesn't mean that clouds are made of milk.