Jump to content

Wireframe options


ozRocker
 Share

Recommended Posts

I checked out the current wireframe option on the material and its pretty neat.  I was wondering if there was a way to show my model in quads instead of triangles, like how Blender or Sketchfab would show quads if it was made with quads.  Also, is it possible to overlay the wireframe over the texture?

Link to comment
Share on other sites

Hi ozR, good to hear from you again.

http://www.babylonjs-playground.com/#1GEYSB#3

Here, I was trying some experiments with edgesRenderer... seeing if I could get a decent quad-like wireframe look.  But, I couldn't make it happen on the rabbit.  Only on the sphere.  hmm.

WAY back when I was doing simple plotting, Deltakosh suggested that I clone the model, set wireframe on the clone, and then overlay the two models.  (half-wireframe) :) It worked pretty well, but yes, it doesn't "feel" right, eh?

Another way... is to code some ugly linesMesh drawing thing.  If it was "smart", it could avoid drawing diagonal lines, but still place lines on all the other edges (quad-wireframe).

Okay, that's all I have for you at this time.  Better ideas are nearby, I just know it.  Possibly a shader.

Link to comment
Share on other sites

Ill take a look because I need this as well... just didn't bother yet cause there were more pressing matters, but if you need it as well lets get this figured out.  I need to finish up my paid work for the day but tonight Ill do some BJS hacking.

There is the grid shader the one guy released in demos not to long ago, but thats more a global grid then the lines between points.

Link to comment
Share on other sites

15 hours ago, Sebavan said:

Hello,

I usually use the grid material for this:

Yeh, I need to show the actual topology so I can't use the grid material.  I'm trying to show the wireframe on top of the texture like this image:

madeleine_3Dscan.jpg

Link to comment
Share on other sites

  • 7 months later...

Did anyone have any luck with this?  I tried using both .OBJ and .BABYLON file from Blender and both.material.wireFrame and edgesRenderer will show tris instead of quads (though I prefer edgesRendered because it shows the wireframe over the mesh).

My Blender file is using quads and other programs will render the .OBJ as quads.

Link to comment
Share on other sites

12 hours ago, Deltakosh said:

Unfortunately I see no easy way to display quads instead of triangles using wireframe mode. Can you share a PG with one of your objects and the edgesRenderer to see if we can improve the result

ok, I put up a playground here http://www.babylonjs-playground.com/#19K1J2#4

I've seen it done with webGL before, I'm just not sure how to do it with babylon.js

Link to comment
Share on other sites

1 hour ago, Nabroski said:

you a good modeler why not solving it in your software ? their are some good tutorials about it you can read on the web. 

It is in quads when I load it in Blender and when I upload to Sketchfab.  There is nothing more I can do with the software.  I just attached an image of how the wireframe looks in Sketchfab

quads.jpg

Link to comment
Share on other sites

On 03/12/2016 at 0:52 AM, NasimiAsl said:

maybe it is not a solution for your question but can help

http://www.babylonjs-playground.com/#JB4YW#18

ok, I tried this shader on my models

.babylon file - http://www.babylonjs-playground.com/#JB4YW#19

.obj file - http://www.babylonjs-playground.com/#JB4YW#20

unfortunately I can't get them to show just the quads, but I'm not very good at shaders.

 

I made sure to test with the .obj file because I know for sure Blender and Sketchfab will render its wireframe as quads

Link to comment
Share on other sites

On 02/12/2016 at 4:39 PM, Deltakosh said:

Unfortunately I see no easy way to display quads instead of triangles using wireframe mode. Can you share a PG with one of your objects and the edgesRenderer to see if we can improve the result

Could definitely be useful for architectural/industrial/engineering stuff... I could use the feature today! :)

Link to comment
Share on other sites

1 hour ago, Deltakosh said:

To get better result we would need to add a list of quads per meshes. Which implies to change all exporters, the file format and the engine rendering pipeline :(

What if you just try with the .OBJ file?  I know this one has quads in it cos its the same file I uploaded to Sketchfab

http://www.babylonjs-playground.com/#JB4YW#20

 

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...