zhutq Posted January 9, 2017 Share Posted January 9, 2017 Hi, I want to draw triangle wireframe on a shaded mesh, to produce the result like: I have tried two ways, but neither achieves the effect I want. 1. material.wireframe = true; Get perfect wireframe but the shaded surface is gone. 2. mesh.enableEdgesRendering(10); This renders both wireframe and shaded surface, but has one problem: the wireframe is not hidden by the shaded surface if I use multiple render groups. (I add another render group to render 3d objects that ignores depth of previous groups, to render something like a x-y-z coordinate.) Playground: http://www.babylonjs-playground.com/#OM44I#0 How can I render a triangle wireframe on a shaded surface and make it correctly hidden? Thank you very much! Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 9, 2017 Share Posted January 9, 2017 Hi zhutq, maybe you can simply clone your object, scale it a bit and display it as wire frame over your original object? http://www.babylonjs-playground.com/#OM44I#1 GameMonetize and NasimiAsl 2 Quote Link to comment Share on other sites More sharing options...
zhutq Posted January 10, 2017 Author Share Posted January 10, 2017 13 hours ago, iiceman said: Hi zhutq, maybe you can simply clone your object, scale it a bit and display it as wire frame over your original object? http://www.babylonjs-playground.com/#OM44I#1 I see. I will go this way if I can't find any approach to avoid the clone.. Thank you very much! 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.