ozRocker Posted March 31, 2016 Share Posted March 31, 2016 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? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 31, 2016 Share Posted March 31, 2016 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. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 31, 2016 Share Posted March 31, 2016 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. max123 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 31, 2016 Share Posted March 31, 2016 http://www.babylonjs-playground.com/#19K1J2#0 there is something up with this rabbit model, lets try a different model. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 1, 2016 Share Posted April 1, 2016 If you open the debugLayer and enable Meshes Tree you will see that there is more than 1 object in your scene and the rabbit you want is not the one you selected Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 1, 2016 Share Posted April 1, 2016 There we go delta thank you, I was wondering why I could not turn off its texture GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 2, 2016 Share Posted April 2, 2016 Hello, I usually use the grid material for this: http://www.babylonjs-playground.com/#19K1J2#3 You can find the doc here and may fit if you are not trying to directly highlight your mesh geometry but only wrap it: https://doc.babylonjs.com/extensions/Grid jerome 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted April 3, 2016 Author Share Posted April 3, 2016 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: Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 2, 2016 Author Share Posted December 2, 2016 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. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 2, 2016 Share Posted December 2, 2016 maybe it is not a solution for your question but can help http://www.babylonjs-playground.com/#JB4YW#18 adam 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 2, 2016 Share Posted December 2, 2016 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 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 3, 2016 Author Share Posted December 3, 2016 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 Raitch 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 4, 2016 Share Posted December 4, 2016 you a good modeler why not solving it in your software ? their are some good tutorials about it you can read on the web. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 4, 2016 Author Share Posted December 4, 2016 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 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 4, 2016 Share Posted December 4, 2016 okay. someone has to write a shader for it. i mean old school render a texture in wire frame mod and export it. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 4, 2016 Author Share Posted December 4, 2016 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 5, 2016 Share Posted December 5, 2016 I know htat Sketchfab supports square rendering. But unfortunately we don't (as we did not see a big traction on it before this post) NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 8, 2016 Author Share Posted December 8, 2016 I think this shader does quad wireframes (I could be wrong), but I'm not sure how to implement it in babylon.js http://stackoverflow.com/questions/24839857/wireframe-shader-issue-with-barycentric-coordinates-when-using-shared-vertices Quote Link to comment Share on other sites More sharing options...
max123 Posted December 8, 2016 Share Posted December 8, 2016 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! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 8, 2016 Share Posted December 8, 2016 If people really need I can spend sometimes next week to provide a support of it in babylon.js Just let me know Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 8, 2016 Author Share Posted December 8, 2016 yes please tris are not useful for showing the topology Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 13, 2016 Share Posted December 13, 2016 What about this: http://www.babylonjs-playground.com/#10OJSG#13 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 13, 2016 Share Posted December 13, 2016 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 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 13, 2016 Share Posted December 13, 2016 offtopic: @Deltakosh you make a change 30min ago, all CreateLines are broken.http://babylonjsguide.github.io/intermediate/Parametric_Shapes Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 13, 2016 Author Share Posted December 13, 2016 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 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.