Planetside Software Forums

General => Terragen Discussion => Topic started by: badamsfx on November 19, 2014, 11:50:26 PM

Title: Is it possible to break apart cloud renders?
Post by: badamsfx on November 19, 2014, 11:50:26 PM
Hi All, I am trying to separate a cloud render into different layers like fg, mid, and bg but am having no luck. I want each layer to affect the lighting of the other layers but be broken out into its own image for later compositing. I tried adding a Render_layer node to the Render node and then putting each set of cloud generating nodes into its own group and then referencing each group in the Object group lines in the Render_layers node but that didn't work, in fact the clouds disappeared from the render. I was hoping to be able to render them all at the same time but even if I have to do each one as an individual render I would be fine with that as long as they still interact with each other. The clouds are set up as volumetrics so is the problem that the Object group categories only work with hard geometry and not volumes? I'm not sure how else to approach this.
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on November 20, 2014, 12:10:12 AM
Yes, exactly, the object groups are literally for objects only, they do not work for any other shaders or non-object elements. You can find documentation on the render layers and elements system here:
http://planetside.co.uk/wiki/index.php?title=Render_Layers_and_Render_Elements

To achieve what you want, I think you'll need to do separate renders. What you can do is turn off "Enable Primary" in each cloud layer that you want to hide, and that should keep its secondary effects (shadows, etc.), while making it invisible. So to render each layer separately, you'd turn off 2 and leave 1 enabled (in the case of foreground, midground, and background). But you would of course need to define your fore, mid, background cloud areas *in separate cloud layers* for that to work.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: badamsfx on November 24, 2014, 05:30:52 PM
Awesome, this is exactly what I needed and works great. Thanks Oshyan. Any chance that Terragen will someday be able to export cloud data in vdb or field 3D format?
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on November 24, 2014, 05:59:14 PM
It's possible, but we have no specific plans to do so yet. We are more likely to support Deep Compositing EXR output in the future however.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: Matt on November 25, 2014, 09:47:17 PM
Another way to do this is to set near and far clipping distances in the Render Layer. In some cases that might be an easier way to go.

There is a way to get object groups to work with cloud layer - you would attach the clouds to separate planet objects and then use object groups to select the planets.

Matt
Title: Re: Is it possible to break apart cloud renders?
Post by: goldfarb on November 26, 2014, 11:35:21 AM
Quote from: Oshyan on November 24, 2014, 05:59:14 PM
It's possible, but we have no specific plans to do so yet. We are more likely to support Deep Compositing EXR output in the future however.

- Oshyan

interesting...
I'd strongly suggest VDB export (and import ;) ) first...
deep compositing, while very cool, isn't something that many people/studios will (or can) use in the near future, but VDB is quickly becoming the standard and it would be amazing to be able to import volumes for things like fog and FX type stuff...and then just deal with holdouts the way we've been doing it all along...then have deep compositing come along later...

just my 0.02...
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on November 26, 2014, 04:39:42 PM
Good to hear that VDB is gaining traction. It's something we're also looking at.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: badamsfx on December 09, 2014, 09:42:59 PM
Quote from: Matt on November 25, 2014, 09:47:17 PM
Another way to do this is to set near and far clipping distances in the Render Layer. In some cases that might be an easier way to go.

I tried that initially but it gets tricky because I'm rendering with a spherical camera to make skydomes. I would have to make circular clipping planes which someone showed me how to set up but it's harder to control than just putting layers of clouds at different altitudes.

Quote from: Matt on November 25, 2014, 09:47:17 PM
There is a way to get object groups to work with cloud layer - you would attach the clouds to separate planet objects and then use object groups to select the planets.

Matt

I will have to look into this. Thanks!
Title: Re: Is it possible to break apart cloud renders?
Post by: badamsfx on December 09, 2014, 10:20:58 PM
Another question regarding render layers. The cloud rgb pass renders out fine and when I add the cloud and sky's rgb together the image exactly matches the "all in one" render. When I look at the cloud alpha pass though it has color in the various channels. Which channel accurately represents the cloud's alpha? In my particular render the red channel has the most information in it. Or should I do a lumakey of the alpha image? Traditionally the alpha would just be a grayscale image.
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on December 10, 2014, 01:40:26 AM
TG does alpha for each channel respectively. In other words it is the appropriate level of transparency for each of the Red, Green, and Blue channels. I think you'd want to mask each channel by its corresponding mask if possible, otherwise I believe you'd merge them to operate as a single mask on an RGB image.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on May 30, 2017, 02:59:55 PM
Quote from: Oshyan on November 20, 2014, 12:10:12 AM
But you would of course need to define your fore, mid, background cloud areas *in separate cloud layers* for that to work.

- Oshyan

I know this is an older post, but I hope still relevant information. I need some help "extracting" a cloud for post comp. I want to add png people in between a pure render (without cloud) and a low cloud layer. That way the people will get less distinct the more "in the cloud" they are. So I understand to uncheck Enable primary to get the shadow but no clouds, but what do I do with the rest? Something in the Render layer I'm guessing. Do you mean to make the Object group 1 to Atmosphere? Then what? Hope you can step me through this, thanks.

I tried the second planet thing, but I had nothing to plug the cloud layers in to. It only had an output plug.
Title: Re: Is it possible to break apart cloud renders?
Post by: Matt on May 30, 2017, 03:27:40 PM
Quote from: dorianvan on May 30, 2017, 02:59:55 PM
I tried the second planet thing, but I had nothing to plug the cloud layers in to. It only had an output plug.

New planets by default contain an internal network of nodes, and because they are connected internally the plugs don't show on the outside until you connect them to something on the outside. But if you simply duplicate the first planet you'll have a planet with external plugs.
Title: Re: Is it possible to break apart cloud renders?
Post by: Matt on May 30, 2017, 03:36:19 PM
Quote from: dorianvan on May 30, 2017, 02:59:55 PM
I know this is an older post, but I hope still relevant information. I need some help "extracting" a cloud for post comp. I want to add png people in between a pure render (without cloud) and a low cloud layer. That way the people will get less distinct the more "in the cloud" they are. So I understand to uncheck Enable primary to get the shadow but no clouds, but what do I do with the rest? Something in the Render layer I'm guessing. Do you mean to make the Object group 1 to Atmosphere? Then what? Hope you can step me through this, thanks.

If you already have one render with the cloud and another render where it's invisible, perhaps you could comp the people over each render and then simply blend between the two layers? You could eyeball the blend, or use a depth map of the people to control it.

Of course you'll save render time if the cloud render is just the cloud without the rest of the scene (by using a Render Layer to control visibility), but it won't necessarily give you better results than just blending between the with-cloud and without-cloud renders.

Matt
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on May 30, 2017, 04:18:12 PM
Thanks Matt, I was wondering if a z-depth pass would help somehow. Not sure how though. Quickest option sounds like rendering the cloud separate with a different planet. The question remains however, what's the best way to set that up? Render Layer? Settings? Also, I assume I need a new cache for each part, right (with cloud/without)?
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on June 01, 2017, 01:48:10 PM
I created a new planet, turned off the old one, and only had the cloud plugged into it. Created a new group called Planet Test and put the new planet in it. Then in the Render Layer, I put the planet test in Object group 1 and made it Visible. Render Elements has Cloud things checked. Nothing but black for everything. Am I doing something wrong? I just want to export only clouds.
Title: Re: Is it possible to break apart cloud renders?
Post by: Matt on June 02, 2017, 01:34:29 AM
That sounds like it should work. Can you send us a .tgd?

Make sure that the planet node isn't drawn with a double white box around it. That's a warning that means it hasn't been captured by the group it appears to be in.

Matt
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on June 02, 2017, 05:51:07 PM
For those who might come across this thread in the future with similar questions, the problem ended up being that the second planet node was not "captured" by the group that had been setup and linked to the Layer for separate output. This is indicated by a white outline around the node that is not "captured" (even if it is technically in the area covered by the group). We know this is somewhat unintuitive behavior and we're looking into improving it in the future.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on June 02, 2017, 06:40:31 PM
Yeah, Matt told me that the planet wasn't "captured" by the Planet test group, so it wasn't part of the group even though it was inside the group's area (ie. bright white line box drawn around the node in the Network View), easily fixed by either dragging the node out of the group and back in again, or by right-clicking on the title bar of the group and selecting "Group: Capture Nodes". And the new planet should only have the cloud connected to it, not atmo, or anything else. Also I needed to un-check "render surface". For GI he recommends rendering a GI cache on the scene that includes both planets (i.e. no need for a render layer), and use the same cache for all layers so that lighting-wise they all fit into the same environment.

Further, he said that for the cloud render layer, under "All other objects" to set Render to Holdout and enable Cast shadows and other rays. When rendering the layer with everything some settings are reversed. You'd plug the "cloud" planet group into Object Group 1 as before, but set that to Render Invisible. For "All other objects" you want to Render Visible and enable Cast shadows and other rays.

What I'm trying to figure out now is probably simple but now sure which file format/setup will give me an alpha like what a png does.
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on June 03, 2017, 04:02:13 PM
Thanks for providing the details here. Alphas are rendered out into separate files. They're chromatic, so they have unique info in the R, G, and B channels, but you can combine those 3 together for a traditional alpha I believe.

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on June 04, 2017, 12:37:28 AM
Quote from: Oshyan on June 03, 2017, 04:02:13 PM
Thanks for providing the details here. Alphas are rendered out into separate files. They're chromatic, so they have unique info in the R, G, and B channels, but you can combine those 3 together for a traditional alpha I believe.

- Oshyan

How are alphas rendered out into separate files? I don't get it.
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on June 04, 2017, 02:38:21 PM
Check the "Extra Output Images" box. Alphas will be saved as separate files as long as you use "Render All To Disk" or "Render Sequence".

- Oshyan
Title: Re: Is it possible to break apart cloud renders?
Post by: dorianvan on June 04, 2017, 11:05:34 PM
Yes, I knew that thanks. I suppose I wasn't clear enough. When I open up the rendered elemen files in Photoshop, they don't have the png-like background. So I can put it in-between layers. I must be doing something wrong.
Title: Re: Is it possible to break apart cloud renders?
Post by: cyphyr on June 04, 2017, 11:58:28 PM
You should be able to create an alpha channel using the cloud depth render layer. It will match the cloud RGB and alpha.
Tip, set the "Far clipping distance" to something much less the the default 1e+016, maybe as low as 10,000.
Title: Re: Is it possible to break apart cloud renders?
Post by: Oshyan on June 05, 2017, 06:21:53 PM
Yes, the alpha images do not themselves have transparency because they represent the transparency chromatically in all 3 channels. Flatten the image to grayscale then copy the result into the alpha channel of the image you want to mask.

- Oshyan