Jump to content

Layering Passes in Combustion with Z Depth


JamesTaylor
 Share

Recommended Posts

When layering passes in combustion inconjunction with a Z Depth pass is it possible to calculate / match the required Z Offset and Z Scale values to the scene which has been rendered or is it a case of trail and error to find the appropriate values?

Not sure exactly what you're asking James, if it is setting the depth of field within combustion you click on the little cross next to the value and this allows you to click on objects within your scene to set the value (keep blur setting to 'box' type for faster updates while setting this).

 

If you mean setting the min/max z-depth information within max, I always use scanline for this. Check the update box within the z-depth render element rollout then render your scene. This sets your min/max values. Then uncheck the box and render again.

 

If I'm off track here, give me a bit more info on what you're trying to do.

Link to comment
Share on other sites

I'm not dealing with DOF at the moment, perhaps in the future but for the time being i'm just wanting to use the z depth inorder to composite 2 passes together and have appropriate elements of the different renders appear to pass either infront of or behind each other dependant upon their z depth value.

 

i've attached a few screen grabs to try and illustrate what i'm getting at. the 1st is the schematic view of work space and the following 3 are the results when using different Z Offset values. the 1st is set at 450, the 2nd at 100 and the 3rd at 1000.

 

I also notice that i have the ability to assign a near and far z value to the G_Buffer Builder and and a Z Offset value to the RPC Layer node (see schematic view). On top of these 2 there is also the min max value that can be assigned when rendering from max.

 

What i'm tring to understand is howthese value interact and effect each other, is there a logical method that follows through them all (i would hope there is) or is it a a case of trail and error with the value so that the 2 branch's of the composite merge together correctly.

Link to comment
Share on other sites

Okay, I see where your going now! Things seem a little confusing in terms of your setup though. I assume what you want is for the RPCs to appear at the correct distance relating to their position in your original scene. To achieve this you will need to render a seperate z-depth pass for the rpcs. Otherwise it will be treated as a flat plane which can move in and out relative to your other layer. Secondly are you rendering to RPF? If so, you shouldn't need to use the g-buffer builder. I'll have a go at a similar scene setup and see how I get on. :)

Link to comment
Share on other sites

Cheers Stephen, you've got my intentions spot on. Its the 1st time i've looked at using this technique and i'm also new to combustion so it doesn't suprise me that my setup is strange!

 

i've used RPF files previously and will eventually be looking at using RPFs for completing this task also, however i would like to get it working using the rendered passes as i'm tring now even though i appreciate it is perhaps an older more drawn out method than the RPF technique.

 

its much appreciated taking the time to have look at a similar setup.

Link to comment
Share on other sites

Okay, just had a go with it. Render out your boxes as RPF and include z-depth and alpha OR render to jpeg etc and render out seperate z-depth jpeg and use g-buffer builder. Do the same for your RPCs, then import both layers into combustion. Check the 3d depth button as you have done for both layers and that's it! You can adjust the offset to move each layer back and forward relative to the other, though obviously the perspective will be off. Scale just scales up the depth of the scene by a specified factor eg objects that are 2m apart will now be 4m apart if your scale is 200%.

 

The values would appear to relate to your system units in max and not your display units so check what you have set up. One thing about rpcs is that they tend to display as planes in the z-depth map, so if any are occluded by another, you will not have the information for that particular rpc. You can get round this by splitting them up into 2 or 3 seperate passes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...