I wish to apply a custom material to the generated meshes that has a texture with transparency. Think something similar to the grid texture that is applied by default to the plane finding in the example scenes.
Unfortunately it seems that no matter what I do or what kind of shader I use, as soon as I apply a texture to a transparent shader material, the mesh goes entirely solid with no sign of the actual texture.
There was another thread created that was a similar problem, but the OP never responded and so it didn’t go anywhere. The documentation link that was posted in the thread also seems to be broken.
My guess is that this mesh is being generated without proper UV mapping, but how am I meant to get around this? It’s especially annoying that I can’t find anything in the documentation that mentions anything about this.
Solid color transparency working fine.
Transparent texture not even showing.
Even a normal, non-transparent texture doesn’t show.
Thank you for reaching out to Lightship Support! If I understand correctly, you want to overlay the “sky” mask with a transparent texture but aren’t seeing the expected result. You also mentioned that there was another thread on the forums with a similar issue that was unfortunately left with a cliffhanger. Could you please send me the shader code, the texture you’re trying to apply, and the link to the thread you’re referring to? If you would prefer to keep your content private, feel free to DM me instead. In the meantime, I will try to reproduce your issue to the best of my ability.
As for the shader and texture, that isn’t necessary. I tried every shader that comes packaged with Unity and every combination of import settings for multiple different kinds of texture files.
Once again I want to thank you for bearing with me here. I have excellent news! I was able to find a solution! Due to the mesh chunking, you can’t just apply the material to each chunk and expect the result you’re anticipating. You have to write a shader that draws your texture based on world space coordinates so you get something that covers the entire mesh. I’ve written a sample shader that accomplishes this and supports tiling and the alpha channel. You can use this as a reference for your own.
In my testing, my goal was to overlay a transparent texture of a basketball over the mesh.