KevinBLT Posted June 28, 2016 Share Posted June 28, 2016 Hello, after using csg there are two edge lines that shouldn't be there I think. http://www.babylonjs-playground.com/#1MH4BF Can this be corrected somehow? Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 28, 2016 Share Posted June 28, 2016 Please do:) CSG is doing a boolean mix, so there must be a discrepancy in faces and vertices. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 3, 2016 Share Posted July 3, 2016 Here's Feldspar's initial post... telling of his CSG system, and what it's based-upon, in case you want to take-on the challenge, @KevinBLT. http://www.html5gamedevs.com/topic/4427-csg-in-babylon/#comment-27402 My dog got scared and ran under the refrigerator (how does he DO that?) so... it is likely a "formidable" challenge (a genuine pain in the butt). I always wondered about the extra indices seen in CSG results. It might be highly-dependent-upon the SOURCE meshes. Possibly, the source meshes must be initially plotted rather symmetrically, and not optimized. For example, there are at least 2 ways to put a cap on a cylinder. One is the sea-shell fan-out method, and the other is the wagon wheel method (a point in the center and requires 1 more face than seashell). I would suspect that wagon wheel caps survive CSG operations better than seashell... due to symmetry. I could be wrong, though. Kevin, you might want to find @Feldspar and have a discussion with him about this issue... before taking-on this mission (should you decide to try CSG improvement). And, if you DO go after this, drop me a PM too, so I can have a medical team, booze, drugs, ice-packs, psychologists, and a petting zoo... standing-by to relieve some of your CSG troubleshooting pain. I believe this challenge is best handled... by someone who enjoys pain. (Just having some fun, guys. Improving CSG would be wonderful... but I think it's wise to have bandages and aspirin nearby.) Quote Link to comment Share on other sites More sharing options...
adam Posted July 3, 2016 Share Posted July 3, 2016 it looks like this csg lib might have solved some of the issues we encounter with the csg lib that is used by bjs: https://github.com/joostn/OpenJsCad/blob/gh-pages/src/csg.js https://github.com/joostn/openjscad/tree/gh-pages Quote Link to comment Share on other sites More sharing options...
adam Posted July 3, 2016 Share Posted July 3, 2016 here is an adapter class that was written for threejs: https://github.com/joostn/OpenJsCad/blob/gh-pages/src/threecsg.js maybe someone can use that to create an adapter for bjs. edit: it looks like the openjscad csg was based off the same csg lib bjs is using. Maybe it will be easier than I thought to get this version working in bjs. Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted July 5, 2016 Author Share Posted July 5, 2016 So someony already had this pain in his ass? And this "openjscad csg" is more like an updated version of the current one used in BabylonJS? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 5, 2016 Share Posted July 5, 2016 Nope, but happy to get contributions If you can improve the current CSG implementation;) 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.