VRayDirt exclude problem

Hey all,

According to the docs, “Excluded object will always be rendered with the Unoccluded color.” but every time I render, the excluded objects are black, not the unoccluded color, which isn’t black. The excluded objects are supposed to be the unoccluded color, correct? Does anyone else have this problem? What am I missing here?

The documentation is incorrect here, will make a note to fix it.

Best regards,
Vlado

In which case, can I request that be a feature? It would be most excellent!

For simplicity, I have a box on a plane. Inside the Extratex (vraydirt) element, I want the box to be pure white so that the object is ‘invisible’ when I comp it. I would like to avoid kicking out a matte pass just for this… What would be the easiest way to get that affect? Thanks!

Box Object Properties > Turn OFF Visible to Camera
If you don’t want to see shadow/reflection/refraction of the box you can turn off - Cast Shadows / Visible to Reflection-Refraction - etc.

For clarification, I mean to say I want the object to be the unoccluded color. If it’s hidden, objects behind it will show through, where I want the object to matte out. For now I’m just having to save a duplicate scene file just for an AO pass - everything has dirtmap on it with the matted objects having a solid white material applied. It would be swell if I could just keep it all within one scene - the excluded objects being the unoccluded color instead of black. :slight_smile:

Hello there.

You can easily achieve this effect with 2 VrayExtraTex Render Elements - and a very simple compositing technique.
Here you can find out how to do it : http://www.youtube.com/watch?v=pkSCThyNYew&feature=youtu.be

If you are using black and white colors - a simple trick can be applied by swapping the colors and generating Inverted AO pass - and at compositing stage you can invert this pass again - achieving a normal AO pass and the excluded black box will be now white:

And one more solution is to use Scene States - you will need two states - one with AO , and another one for Normal Rendering - and you can swap between them instead of using two separate scenes.

Wow, all of those are great ideas. Thanks for taking the time in helping and creating those videos!!

Yeppp, thanks so much for clear/direct explanation.

I was looking time ago how could i exclude scattered grass (with MultiScatter) to not be affected by VrayDirt in ExtraTex pass but it seems not possible yet? you can exclude either the grass or the MultiScatter object but the grass has still AO…(this is really time consuming, and you dont really need ao pass for grass, thus my aim to exclude)

Found another solution.

So flipping the occluded/unoccluded colors didn’t produce a good result because for some reason the gradient between occ/unocc renders differently - the terminator is stronger. Not sure why it would be different, but I have to apply a curve adjust with an arbitrary exponent to get it to look similar.

However, a clever guy I work with came up with a solution:
Instead of just a vraydirt shader piped into extratex, use a VRayMultiSubTex (using object ID). Pipe in VRayDirt to the Default value and use a white value for your matte object’s object ID. Also be sure to add the object to your VRayDirt’s Result Affect so it doesn’t calculate. It would be nice if the exclude color would be unoccluded, but this workaround seems to be the least invasive - you just have to reserve the object ID for this pass.

Thank you very much for the feedback!
It is very effective solution :slight_smile: