Marvin Walters Posted November 21, 2017 Share Posted November 21, 2017 Hello everyone, I'm working on the visualization of custom polyhedra with the Mesh.CreatePolyhedron method. I want them to be outlined with the edge renderer, but if you look at the following PG, you will see that the top and bottom faces are cut. I've realized that this problem occurs because 2 edges are overlapping each other. Is there any solution for this shape not being cut? Or is there anything I'm doing wrong? PG: https://www.babylonjs-playground.com/#IKFFEZ Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 21, 2017 Share Posted November 21, 2017 Hiya MV, welcome to the forum. I'm not sure that is possible. (But Gods are nearby, thinking about it). https://www.babylonjs-playground.com/#IKFFEZ#2 Line 47, that true parameter is for .useVerticesInsteadOfIndices I thought SURE that would fix the red line crossing the mesh. But noooo... Wingnut does a face-plant with added Purina Gravel-Chow I'm not sure that I understand the problem, but I think the red across-the-mesh line... is unwanted. Also, it might be nice to have edgeRender in the corners of the 90 degree angles. I also added light.groundColor... so we could get some bottom lighting. Anyway, smarter people than I... will comment soon. Stay tuned, please. Marvin Walters 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 21, 2017 Share Posted November 21, 2017 https://github.com/CraigFeldspar/BabylonCSG Quote Link to comment Share on other sites More sharing options...
Marvin Walters Posted November 22, 2017 Author Share Posted November 22, 2017 Thank you very much @Wingnut. Yeah you're right, the "inner" 90 degrees corners should have a rendered edge too. Thanks for this handy library @Pryme8, but I don't see anything in it to solve my problem. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 22, 2017 Share Posted November 22, 2017 I just read the title and skimmed over the post, I did not realize you were just getting missing faces. I thought you were trying to manipulate the geometry my bad. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 22, 2017 Share Posted November 22, 2017 Hi again, guys. Ok, so, where are we at? https://www.babylonjs-playground.com/#IKFFEZ#3 Is that red sideways line... the problem? Is that what you mean by "cut", MW? (there is another red line on bottom, in same position) If so, ok... we need to find the "big dogs" of the edgesRenderer and see if they want to try a modification, yes? I did another test. [link] I wanted to create a wireframe clone of the mesh, and render THAT atop the main mesh. I needed to LOWER the mesh.visibility (to something < 1.0)... so I could see the wireframes. When I did that, the edges render ACTIVATED in the 90 degree corners. Know why? Yep, the edgesRenderer, which is an angle-sensitive device... did its job perfectly... ON THE INSIDE OF THE MESH. heh. Ahh, robots... they are SO FUN to fool. How 'bout it, pros? Any way to remove the cross-mesh red line shown in #3 playground? Any ideas about WHY the edgesRenderer thinks that is an edge location? (thx) Also, MW... if I have stated the issue wrong, please correct me. thx. Quote Link to comment Share on other sites More sharing options...
adam Posted November 22, 2017 Share Posted November 22, 2017 Workaround: https://www.babylonjs-playground.com/#IKFFEZ#5 Marvin Walters and Arte 1 1 Quote Link to comment Share on other sites More sharing options...
Marvin Walters Posted November 23, 2017 Author Share Posted November 23, 2017 12 hours ago, Wingnut said: https://www.babylonjs-playground.com/#IKFFEZ#3 Is that red sideways line... the problem? Is that what you mean by "cut", MW? (there is another red line on bottom, in same position) ... Also, MW... if I have stated the issue wrong, please correct me. thx. Yes those 2 lines "cutting" the top and bottom faces are exactly the problems. 11 hours ago, adam said: Workaround: https://www.babylonjs-playground.com/#IKFFEZ#5 That is a good temporary workaround, thanks for that 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.