Seba Posted May 24, 2018 Share Posted May 24, 2018 Hello guys, I have troubles with showing shapes that have an opacity < 1 and which are behind a sprite that also has an opacity < 1. I attach a screenshot and here the playground As you can see the shapes behind the sprite disappear I tried differents options with material's shape such as : forceDepthWrite needDepthPrePass separateCullingPass zOffset But nothing works, and on the Sprite side we don't have a lot of parameters to play with. I wonder if it's not due to a kind of optimization of babylon to not drop down the render. Quote Link to comment Share on other sites More sharing options...
Seba Posted May 24, 2018 Author Share Posted May 24, 2018 Ok I found how to fix it by using renderingGroupId parameter from the meshes and the sprite manager. set 0 to meshes and 1 to sprite manager. But it's not perfect, if we set the camera position under the plane (grass) we have the sprite drawn before the plane. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2018 Share Posted May 24, 2018 Perhaps you can use billboarding instead of sprites? Quote Link to comment Share on other sites More sharing options...
Seba Posted May 24, 2018 Author Share Posted May 24, 2018 Hi Deltakosh, Thanks for your reply. Do you mean something like using a mesh instead of a sprite like a plane, then set my texture to this plane and set plane.billboardMode to BILLBOARDMODE_ALL? I have a lot of sprites. My project is a Map in 3D of a building let's say a shopping center and each shop is represented by a mesh in 3D and floating above a sprite which is the shop's logo. I'm affraid that using meshes instead of sprites will drop down the rendering. Quote Link to comment Share on other sites More sharing options...
jerome Posted May 24, 2018 Share Posted May 24, 2018 If you have plenty of billboarded planes, you could use a SPS : http://doc.babylonjs.com/how_to/solid_particle_system Quote Link to comment Share on other sites More sharing options...
Seba Posted May 24, 2018 Author Share Posted May 24, 2018 Hello Jerome. Thanks for your reply. Ok I was really hoping to keep my sprites system, but I'll try either your solution or Deltakosh one. 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.