Jump to content

How to draw triangle wireframe on shaded mesh?


zhutq
 Share

Recommended Posts

Hi,

I want to draw triangle wireframe on a shaded mesh, to produce the result like:

images.jpg

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...