Plane with BABYLON.Mesh.BACKSIDE does not seem to use backUVs

I’m trying to flip the texture for a backside-only (and frontside-only) plane but I can’t get the backUVs to work (works fine for double sided). There must be something I don’t understand.

Simple Playground example. https://www.babylonjs-playground.com/#VA2AC#196

The plane in the middle (you need to rotate scene to see it) is not correct (should be flipped by the backUVs.

—bjorn

See the doc, frontUVs / backUVs only work when the material is double sided.

Got it, but why isn’t there a way to flip when single sided?

As single sided is not supported, the result is simply undefined and it’s illegal to use backUVs and frontUVs in thise case.

You can clone the material and apply some transformations (v mirroring) to achieve what you want in the single sided case:
https://www.babylonjs-playground.com/#VA2AC#197

Awesome, thanks!

I was celebrating too early. I’m actually using a dynamictexture for the plane, drawing text, setting the vScale gives me a blank texture. When trying to create a Playground sample I stumbled on a similar issue, setting the plane to BACKSIDE and drawing text with a dynamictexture you end up with a black box, you probably have a quicker on that, I hope: https://playground.babylonjs.com/#TMHF80#536

This one is easier indeed, it’s because your light only lights a single side of the plane:
https://playground.babylonjs.com/#TMHF80#537

Note that I have added a vAng rotation, else the text is written from rigtht to left.

The light issue was embarrassing but the life saver was the vAng rotation, now things works great. THANK YOU. —bjorn

Just wanted to share a video highlighting what the plane issue was about.

The video is an example of using back side and front sides of a plane shape. The labels in the front are front side only and placed beneath the ground to not obstruct the chart. The labels behind the chart are back side only and placed above the ground. The nice feature of the difference between sides is that the labels automatically disappear/appear when the camera is moving around the scene.

Thanks again for the help,
----bjorn

2 Likes