# Non-self Occlusion

**URL:** https://forum.highend3d.com/t/non-self-occlusion/45612
**Category:** Maya
**Tags:** mental-ray
**Created:** [April 16, 2007, 3:06am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612 "2007-04-16T03:06:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [April 16, 2007, 3:06am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/1 "2007-04-16T03:06:38Z")

</div>

So here I am trying to add an occlusion pass to my teeth.  
Right now it looks like this:

![](http://img.villagephotos.com/p/2007-4/1253540/teeth_occlude.jpg)

Thing is, I don't want the teeth to self-occlude, I'm only interested in the occlusion between the lips and teeth. Teeth self occlusion adds dark lines between the teeth which is fighting my subsurface scattering shader which is there specifically so there AREN'T dark lines between the teeth.

I saw there is a parameter in the ambient occlusion metnal ray tab called id\_nonself. I looked it up and found this:

QUOTE  
id\_nonself works similar to id\_inclexcl in that it is an object instance label determining which objects do not self- occlude. Set to 0 it has no effect. Set to a positive integer will prevent any object with that label from occluding other objects with the same label. This is useful for "matte" or "stand-in" objects that represents existing geometry in a photographic background since any inter-occlusion between such objects are already present in the background photo. Simple exclusion by id\_inclexcl cannot be used in this case because occlusion cast by "stand-in" background geometry onto foreground geometry and vice versa is both desired - only background-to-background occlusion needs to be prohibited.

So I get that.... But what is an "object instance label" and how do I set it?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [April 16, 2007, 10:05am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/2 "2007-04-16T10:05:08Z")

</div>

well its not quite what you want, especially if your teeth are separate objects. Easiset way here is just to unchek raytace visibility for the teeth objects (or use raytype shader)

Anyway for gods sake dont multiply your occlusion in on toip of lithning. thst would oviously casue ths behaviour. And quite frankly the teeth are occlused.

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [April 16, 2007, 10:11am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/3 "2007-04-16T10:11:57Z")

</div>

not sure what you mean by

QUOTE  
Anyway for gods sake dont multiply your occlusion in on toip of lithning. thst would oviously casue ths behaviour. And quite frankly the teeth are occlused.

if you're saying I should use occlusion as a matte to color correct the beauty pass, that's fine, I can do that.

at any rate - my teeth are not separate objects. The whole of the teeth + gums is one poly object so if I could stop it from self occluding it would actually give me exactly what I need... but do you know what an instance label is?

The end result that I need would look something like this:  
[sloppily done in photoshop in 2 seconds just to be clear]

![](http://img.villagephotos.com/p/2007-4/1253540/teeth_noselfocclude.jpg)

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [April 16, 2007, 10:39am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/4 "2007-04-16T10:39:21Z")

</div>

While we're at it I might as well be clear on what I'm trying to do.

Here's  
occlusion \* beauty = comp.  
why not do it this way? As you can see the problem is the black gap between the front upper teeth (subtle here but much more visible in wider shots)

![](http://img.villagephotos.com/p/2007-4/1253540/teeth_comp2.jpg)

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [April 16, 2007, 10:45am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/5 "2007-04-16T10:45:32Z")

</div>

QUOTE(holographix @ 04/16/07, 01:11 PM) [snapback]264162[/snapback]  
if you're saying I should use occlusion as a matte to color correct the beauty pass, that's fine, I can do that.

Well im not saying thyat because thats not what your supposed to do either. (altough it can work)

your supposed to multiply the ambient occlusion with the color pass (without lighting affects) and weighted ADD it to the light/ diffuse + specular pass. The light pass should also possibly be toned down by ntch too.

light is jsut a additive chain.

QUOTE  
but do you know what an instance label is?

yes, its basically just a numeric identtifier for the object you can set it nmanually if you wish, go to [http://www.lamrug.org/](http://www.lamrug.org/) for more info

[http://www.lamrug.org/resources/maya6tips.html#customlabels](http://www.lamrug.org/resources/maya6tips.html#customlabels)

to be specific

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 1, 2007, 9:34am UTC](https://forum.highend3d.com/t/non-self-occlusion/45612/6 "2007-05-01T09:34:31Z")

</div>

okay so I've been reading this link, but I can't make sense of it. Any pointers you can give me here to get started?
