adam Posted March 22, 2016 Share Posted March 22, 2016 I created a simple cylinder in Blender, removed the top and bottom, copied the vertices and flipped the normals so that I've got a double sided mesh. I've created a PG where I load the mesh, give it a transparent mesh and clone it and position them end to end. http://www.babylonjs-playground.com/#21XUBV It looks pretty good, but there is a disc drawn where the meshes touch. I tried merging the two meshes but it only gets rid of the disc when viewing the meshes from below. http://www.babylonjs-playground.com/#21XUBV#2 http://www.babylonjs-playground.com/#21XUBV#3 If I position the cloned mesh below the original mesh, the disc can be seen from below and not above. http://www.babylonjs-playground.com/#21XUBV#5 http://www.babylonjs-playground.com/#21XUBV#4 If I change the order of the mesh array I send to merge meshes, it also changes the whether I can see the disc from above or below. http://www.babylonjs-playground.com/#21XUBV#6 3 meshes merged: http://www.babylonjs-playground.com/#21XUBV#9 Is there any way to get rid of that annoying disc between the meshes? Quote Link to comment Share on other sites More sharing options...
adam Posted March 22, 2016 Author Share Posted March 22, 2016 I think I figured out a solution that will work for me. http://www.babylonjs-playground.com/#21XUBV#11 Instead of having one double-sided mesh, I have a front-side and a back-side mesh and I use instances (which I should probably be using anyway). Quote Link to comment Share on other sites More sharing options...
adam Posted March 23, 2016 Author Share Posted March 23, 2016 I still have this issue if I need to create an instance of another mesh. http://www.babylonjs-playground.com/#21XUBV#12 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted March 23, 2016 Share Posted March 23, 2016 you can fix it when you set two mesh one for front face and other for back face Quote Link to comment Share on other sites More sharing options...
adam Posted March 23, 2016 Author Share Posted March 23, 2016 Hopefully this example is clearer: http://www.babylonjs-playground.com/#21XUBV#13 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 23, 2016 Share Posted March 23, 2016 I'm not sure this is easy to fix. This comes from the general transparency issue: there is no face ordering (because of performance) Quote Link to comment Share on other sites More sharing options...
adam Posted March 23, 2016 Author Share Posted March 23, 2016 I found a way to do it by merging meshes: http://www.babylonjs-playground.com/#21XUBV#15 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 23, 2016 Share Posted March 23, 2016 Smart! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 23, 2016 Share Posted March 23, 2016 Just wondering, if you gave each of your pieces a separate material with different transparent material, then "merged" it in Blender (join). The problem would be back, right? The reason for the join (select then Object->Join menu) in Blender, is all meshes must be same material to merge in BJS right now. Quote Link to comment Share on other sites More sharing options...
adam Posted March 23, 2016 Author Share Posted March 23, 2016 They are all separate Blender models with separate materials. I merged them using BJS. Merging them in Blender wouldn't fit my use case. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 23, 2016 Share Posted March 23, 2016 Sorry, thought you were done. Was just posing a question, to test the limits of your solution for the next guy who did a search of the word tranpsarency. Quote Link to comment Share on other sites More sharing options...
adam Posted March 23, 2016 Author Share Posted March 23, 2016 No problem. I am done. I'm not sure if what you described would work. Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 13, 2018 Share Posted February 13, 2018 the above link is not working Quote Link to comment Share on other sites More sharing options...
adam Posted February 13, 2018 Author Share Posted February 13, 2018 This thread is pretty old. These days I recommend using SPS with the new depth sorting feature. https://doc.babylonjs.com/how_to/solid_particle_system#transparency-concerns I suppose you could still merge the meshes and use facet depth sort: http://doc.babylonjs.com/how_to/how_to_use_facetdata#facet-depth-sort 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.