Amarth2Estel Posted June 7, 2018 Share Posted June 7, 2018 Hi everybody, I am currently working on a project for which I use different levels of detail for my meshes. I also need to use CSG to perform Boolean operations. As you can see on this PG, despite refreshing the CSG at each frame, only the high-poly mesh is used in the intersection, even if it is a low-poly mesh that is displayed. I have already considered several methods to achieve the desired result: In the case of CSG with static meshes, I could of course perform my Boolean operations upstream, and use the results directly in my LODs system. In the case of CSG with dynamic meshes (whose vertex data, position, rotation or scale can evolve), I would have to recover the event of the passage from one LOD to one other (is there an observable?) in order to do the boolean operation between the actually displayed meshes. If the switch between LODs is not listenable/observable, I will probably have to recode part of the LOD system, but why not. Do you have other ideas to effectively combine these two features? It would be great if Babylon could handle this natively! Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2018 Share Posted June 7, 2018 1. I think that would be the more performant option 2. You can get activeLOD at any time with meshLOD = mesh.getLOD(this.activeCamera); Amarth2Estel 1 Quote Link to comment Share on other sites More sharing options...
Amarth2Estel Posted June 8, 2018 Author Share Posted June 8, 2018 Thank you very much @Deltakosh ! This perfectly fits my needs ! http://www.babylonjs-playground.com/#4LX0VC#1 GameMonetize 1 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.