jodo Posted January 26, 2016 Share Posted January 26, 2016 I have some problems with the z-Values of the faces of a cube when using the "hasVertexAlpha" on the mesh of the SPS. The bottom shows even if alpha is set to 1.0. and the other faces dont seem to be correct too. I created a material for the sps mesh and set backface culling to false. I recreated it in the playground : http://www.babylonjs-playground.com/#1WP9KY#1. Is this a bug? or am I just doing something wrong? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 26, 2016 Share Posted January 26, 2016 Hello I think there is a misunderstanding here. mesh.hasVertexAlpha means that the vertex buffer contains a color per vertex and this color has an alpha component. This is not related to particles transparency. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 26, 2016 Share Posted January 26, 2016 You can define particle color with transparency like this: http://www.babylonjs-playground.com/#1WP9KY#2 But beware: the SPS is a single object and there is no faces ordering regarding transparency Wingnut 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted January 26, 2016 Share Posted January 26, 2016 Yep, this is the real explanation ! the sps mesh transparency will be ever right compared to any other mesh in the scene, but the transparency between its own faces (so its particles) isn't sorted along z Please have a read here, everything is detailed : http://doc.babylonjs.com/tutorials/Transparency_and_How_Meshes_Are_Rendered jahow 1 Quote Link to comment Share on other sites More sharing options...
jodo Posted January 27, 2016 Author Share Posted January 27, 2016 Ahh, alright, everything make sense now. thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.