Ink'n'Paint vs Transparent Objects vs Mat IDs


#1

I have a scene that is almost 100% rendered with Ink’N’Paint materials:

There are also a few objects which are using Standard materials, but with one form or another of translucency, be it with maps or rendering a mesh as Wire (which apparently does not actually render wireframes at a certain thickness, but rather seems to apply an Opacity effect similar to a Face map; more on that later).

Whenever one of these Standard-material objects is between the camera and an Ink’n’Paint object, the Ink’n’Paint object will render as black wherever it is covered by the Standard-material object, even though it is translucent:

Doing experiments, I’ve found this:

1 - Material IDs matter
Any object that uses Multi/Sub-Object materials will still render Material ID #1’s Paint as normal when it is behind a transparent object…but the Ink will not render
Ink’n’Paint Material IDs greater than 1 will render as all-black.

2 - Normals matter
When the normals of the Standard translucent object are pointed at the camera, the Ink’n’Paint object behind it will render a bit darker than one would expect, but at least not completely black.


(Transparency created with Opacity map)

However, when the normals are facing away from the camera, you see the no-ink/black-paint effects I’m describing.


(Same render; only change is the normals are flipped on the green-grid plane.)

Rendering the Standard object with “2-sided” checked will also make the Ink’n’Paint object render as seen above. However, two actual planes made of entirely separate geometry (and the material does not have 2-Sided checked) will still produce the all-black effect.

3 - “Render Occluded Objects” doesn’t help
Checking that box on any of the objects, all of the objects, or any combination has no effect, alas. You’d think it might, but no.

Also, no ‘Clamp’ checkbox helps, either.

GOALS
1 - For all Ink’n’Paint objects to render as well-lit as they would have if the translucent object isn’t there.
2 - For the translucent object to look in the final render as it would have were it not causing issues with Ink’n’Paint.
3 - To achieve the above 100% ‘in-camera’, without compositing in post, which would be incredibly impractical for various reasons I’d rather not argue about.

Basically, I need to make the top of the image below look more like the bottom, correcting those odd rendering quirks, all 100% within MAX itself.

How can this be done? Thanks.


#2

Guys, seriously…I could really use some help on this one; it’s kind of messing with a big project. Please?


#3

Put some Max scene file example here…


#4

Well That Is Just Messed Up.max (8.3 MB)

Thank you.

I’ve uploaded the file, but experimenting with it, I think I’ve figured out…well, something.
It seems that Material IDs aren’t passing through the wireframe object (wireframe through the Material rather than actual wires), so that any MatID that isn’t #1 will render as black. (That took a little figuring out.)

However, putting a transparent object between the wireframe object and the Ink’N’Paint object makes everything render normally. And the MatID of the transparent object doesn’t matter; I checked. However, which way the normals are facing matters a great deal, it seems; the normals for the far planes must point at the camera or it doesn’t work and everything renders as black still.

So, I found a kind of kludge-y solution, of sorts: I made a transparent bounding box out of a cube in order to surround the problem-causing object, with the normals facing inward (thus ensuring there is at least one visible-to-the-camera transparent plane between the object and anything behind it.

The result:

It works!

Is this a great solution…? No. I can foresee how it might cause problems in the future, should something have to pass through that bounding box (unlikely for this project, but…not for certain); perhaps I could make something that more closely matches the shape of the object.
But it does perform the function I need, so…yay!

Still, if anybody has a better solution, I’m open to it.Thanks in advance! :slight_smile: