zzzen Posted June 20, 2018 Share Posted June 20, 2018 When wireframe is enabled, the model becomes transparent. https://www.babylonjs-playground.com/#IUKB9V I want the model to be solid in wireframe mode, like this demo with "See Through" disabled. Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted June 20, 2018 Share Posted June 20, 2018 Hi, It can work if you use "edgeRenderer" on the mesh, instead of wireframe on the material. https://www.babylonjs-playground.com/#IUKB9V#2 (also, there's a call to "convertToFlatShaded()", otherwise some non-seam edges might be invisible) Quote Link to comment Share on other sites More sharing options...
zzzen Posted June 21, 2018 Author Share Posted June 21, 2018 Thanks for your suggestion, but "EdgeRender" is really slow when the model has millions of vertices, it takes about one minute to calculate edges. @SvenFrankson Quote Link to comment Share on other sites More sharing options...
Guest Posted June 21, 2018 Share Posted June 21, 2018 Or you can clone the mesh and render one in wireframe on top of the solid one Quote Link to comment Share on other sites More sharing options...
zzzen Posted June 22, 2018 Author Share Posted June 22, 2018 I've tried wireframeMesh.scaling = new BABYLON.Vector3(1.01, 1.01, 1.01) But it doesn't work well because these two meshes will collide everywhere. @Deltakosh Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 22, 2018 Share Posted June 22, 2018 Hiya zzzen. You might need to set the wireframe "overlay" mesh... .checkCollisions = false; Or, if physics-colliding, make sure it has no physics impostor. You might also want to set the wireframe mesh.parent = actual mesh. Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 22, 2018 Share Posted June 22, 2018 @zzzen Why not utilize line2d to draw lines using an array of your mesh's vertices'? This will give you variables to customize as well, and it can be dynamic in many other ways. DB Quote Link to comment Share on other sites More sharing options...
Guest Posted June 22, 2018 Share Posted June 22, 2018 @zzzen: You just need to set this: wireframeMesh.material.zOffset = 1. This will avoid the depth fight dbawel and zzzen 2 Quote Link to comment Share on other sites More sharing options...
zzzen Posted June 23, 2018 Author Share Posted June 23, 2018 wireframeMesh.material.zOffset = 1 It works like a charm. You guys are really awesome. Thanks! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Eranda Posted May 23, 2019 Share Posted May 23, 2019 In the Inspector Pane, under the Properties Tab and then in Debug, there is the option to "Render wireframe over mesh". Is it possible to access this feature programmatically? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 14, 2019 Share Posted June 14, 2019 We have a new forum: forum.babylonjs.com 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.