MarianG Posted May 7, 2018 Share Posted May 7, 2018 Hello guys. One simple question I'm trying to create a profile with holes. When this profile is composed from only one layer it works: http://playground.babylonjs.com/#52VGKP#2 But if it is composed by multiple layers it works too, but the hole is not complete, I cann't see through it: http://playground.babylonjs.com/#52VGKP#1 And I need this visual effect of layers. I mean, I cann't create by default a box whith layers dimensions and apply the csg on it. Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 7, 2018 Share Posted May 7, 2018 Your merged hole is not quite high enough. Added 1 to `data.layersNo` http://playground.babylonjs.com/#52VGKP#3 MarianG 1 Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 7, 2018 Author Share Posted May 7, 2018 Lol. Sometimes I'm so dumb. Thank you @JohnK Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 27, 2018 Author Share Posted May 27, 2018 Hey. Other question related to this. Maybe it's a bug. I don't know. If i'm using action manager on objects which I use in mergeMesh the action manager no more work. http://playground.babylonjs.com/#52VGKP#4 if you coment line 58 and 60 it works. Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 28, 2018 Share Posted May 28, 2018 http://playground.babylonjs.com/#52VGKP#8 Hi Marian! Wingnut goofin' around in this PG. Line 50... after merge, let's call it hole5. Line 66... off we go to CSG() func... WITH hole5. Line 87... we kill hole5, right? IF it had any of the 5 actionManagers, they are probably dead, too. So now... what do we put actionManager(s) upon? Hole5 is now dead or turned to air. Can't use him. Line 100... fun. Return something and then we'll try to put an actionManager upon it, after it gets home. I tried returning subCSG, and innerCSG, and newL... just goofing around with line 100. You can even disable line 87 (don't kill hole5)... and return hole. Experimenting. But really, the problem happened... when 5 actionManagers were killed in a MergeMeshes tornado, right? I think that is expected behavior, but we'll listen to others, too. Perhaps you can find a way... that doesn't use mergeMeshes? MergeMeshes are SO violent, ya know? Sorry I had no solution. But really... I hope you didn't want actionManagers installed on the air in the holes. If so, we need to talk about some therapy for Mister Marian. You're going to need some invisible cylinders if you want "nothingness" to be pickable and have an AM. heh. We HAVE ways to click on empty air... but it requires special handling. (Ain't 3d fun? It's a great vehicle for trying bad comedy). Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 28, 2018 Author Share Posted May 28, 2018 Hey @Wingnut. I'm experimenting too Actually the goal is to create a lot of holes with default radius, and each to be clickable and you can click on one of them and change radius. And I used mergeMeshes because if I'm doing the csg foreach hole, my browser freeze, so a solution on this was to merge them. Now I want to add an actionmananger to them, and make them invisible, and I wanted to use the shapes already used for mergeMeshes, without dispose source, but finaly I think I'll use mergeMeshes with dispose source and after that I'll create new holes for action manager. Something like this, http://playground.babylonjs.com/#52VGKP#9. but noh, I have to use 2 loops, and I'm creating the double number of necesarelly holes. This is the only one solution till now :)) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 Hello, once merged the original meshes do not exist anymore. The new merged mesh does not contains action information. So you have to create a new manager for it. But you won't be able to get specific action per hole as they are all melted together You can also sync about using a clone of each hole to create the mergedOne to do the CSG work then dispose the merged mesh and only keep the originals MarianG 1 Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 29, 2018 Author Share Posted May 29, 2018 Thank you for clarify this. I thought if the disposeSource flag is set to false in mergeMeshes, means that the meshes are still there, and I can use them. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 yes this **should** work as well Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 29, 2018 Author Share Posted May 29, 2018 12 minutes ago, Deltakosh said: yes this **should** work as well Ok, but why then if I'm adding actions to holes and after that I merge them without dispose, so supooae I can still use the actions on holes, but this didn't work? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 can you repro in the PG? Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 29, 2018 Author Share Posted May 29, 2018 http://playground.babylonjs.com/#52VGKP%234 here I tried this Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 Yes this is a bug! I'll fix it in next nightly MarianG 1 Quote Link to comment Share on other sites More sharing options...
MarianG Posted May 29, 2018 Author Share Posted May 29, 2018 Great, many thanks! 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.