ozRocker 281 Report post 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 Share this post Link to post Share on other sites
Wingnut 2301 Report post 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 Share this post Link to post Share on other sites
Pryme8 735 Report post 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. 1 max123 reacted to this Quote Share this post Link to post Share on other sites
Pryme8 735 Report post 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 Share this post Link to post Share on other sites
Deltakosh 4315 Report post 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 Share this post Link to post Share on other sites
Pryme8 735 Report post Posted April 1, 2016 There we go delta thank you, I was wondering why I could not turn off its texture 1 Deltakosh reacted to this Quote Share this post Link to post Share on other sites
Sebavan 610 Report post 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 1 jerome reacted to this Quote Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites
NasimiAsl 1131 Report post Posted December 2, 2016 maybe it is not a solution for your question but can help http://www.babylonjs-playground.com/#JB4YW#18 1 adam reacted to this Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post 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 Share this post Link to post Share on other sites
ozRocker 281 Report post 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 1 Raitch reacted to this Quote Share this post Link to post Share on other sites
Nabroski 250 Report post 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 Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites
Nabroski 250 Report post 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 Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites
Deltakosh 4315 Report post 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) 1 NasimiAsl reacted to this Quote Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites
max123 53 Report post 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 Share this post Link to post Share on other sites
Deltakosh 4315 Report post 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 Share this post Link to post Share on other sites
ozRocker 281 Report post Posted December 8, 2016 yes please tris are not useful for showing the topology Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post Posted December 13, 2016 What about this: http://www.babylonjs-playground.com/#10OJSG#13 Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post 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 Share this post Link to post Share on other sites
Nabroski 250 Report post Posted December 13, 2016 offtopic: @Deltakosh you make a change 30min ago, all CreateLines are broken.http://babylonjsguide.github.io/intermediate/Parametric_Shapes Quote Share this post Link to post Share on other sites
ozRocker 281 Report post 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 Share this post Link to post Share on other sites