Hi everybody, I’m a big fan of Omniverse and the Material Definition Language and I could really use some help!
I’ve created a custom MDL for projecting a decal onto an object and it works pretty well except there is a problem where part of the object, which has the projected material attached, is visible when it shouldn’t be. To describe what it looks like, it’s almost as if the shadow of the projected material is visible on the inside of the object. It’s difficult to describe, but I have attached a USD so you can view it yourself. This “shadow” of the material really shouldn’t be visible. I have colored every location which is supposed to be completely transparent in red and, as is shown in the USD file, the “shadow” is showing up red.
I am new to MDL and I suspect I have done something incorrectly in my MDL, I’d really appreciate insight into why this is happening, and how I can fix it.
Thank you!
DecalBugDemonstration.zip (39.0 KB)
1 Like
Thanks for the post, and thanks for the file. Yes this seems normal. The “red” version is the inverse of the texture on the inside face of the cube. The top version is the “positive” face and the red version is the inverted normal of the bottom face of the cube. To solve this, simply apply this mdl to a simple plane and make that the texture. Then bring the plane down on to the top of another plane or cube and you will have a “sticker” effect. You may want to then select the sticker plane and turn off shadows for it, so it does not cast shadows on the cube.
But just for clarification this is not really a “projected” material. It is just a normal mdl using a PNG texture with alpha as a transparency map.
1 Like
Thanks for getting back to me and Happy Holidays! Sorry for the late response; I was taking some time off. To provide some context, I’m trying to apply a decal to any mesh and the box is just an example. The way I intend to use it is to create a duplicate mesh and slightly expand it and then project the material onto that from different angles and locations. For opaque objects, seeing the negative side doesn’t seem to be much of a problem, but if I need to deal with a transparent object, I’m worried that it will become problematic. Are there any solutions you can think of? I really appreciate it, I’ve been trying to crack this for some time now.
P.S. Could you clarify what you mean by this not being a projected material? I’m new to MDL.
1 Like