• Content Count

  • Joined

  • Last visited

About Zrokky

  • Rank

Profile Information

  • Gender
  • Location
  1. I seperated them into different meshes. Works perfectly, thanks for the help!
  2. Nope, I want the green to be half transparent But I kinda' understand the sorting problem. Should I use multimaterial on the red-green mesh (or seperate the two planes into two meshes) or is there any easy way to keep the green and red planes in one mesh and do something similar like setting the vertex alpha and get the green plane drawn as half transparent and the red as non transparent?
  3. Hy everyone! I'm making a game and need a little help with the transparency stuff. So, in the game I have one material that has a texture (a png image that contains transparent parts). The mashes are made out of planes, merged together and the planes shows parts of the texture (think about it like Minecraft). I can set the colors of each plane in the mesh with the colorKind vertexdata.. except the alpha part. So I tried to find some topics about it and saw somewhere a tip to set the hasVertexAlpha on the mesh to true and add the texture to the opacityTexture. That worked, now I can set the RGBA on any parts of the mesh but the rendering order goes wrong Here's an image: the red and the green are one mesh (that has two planes, the green is above the blue), the blue is the other mesh. The green is half transparent using the colorKind alpha : It's cool, this is the result I'm looking for! But when I rotate the camera, the blue is displayed above the green. And here is playground link to what I'm experiencing in the game: https://playground.babylonjs.com/index2_5.html#8XDI7F#2 So in short, I want to have a material with a diffuseTexture that has transparent parts and use the colorKind RGBA on every plane in every mesh. What am I doing wrong and how can I fix it? Thanks for the help!