pichou Posted January 18, 2018 Share Posted January 18, 2018 This is one simple question but I haven't found an answer in the doc or here so I ask When I simplify a mesh and clone it after. Will my cloned mesh be simplified too or not? And have I to wait for the mesh to be simplified before cloning it to have the simplification on it? Thanks, Pichou Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2018 Share Posted January 18, 2018 The simplification process generates LOD for the current mesh, so the mesh data is saved and unchanged. The simplification generates a new mesh So cloning the mesh will clone the original data Quote Link to comment Share on other sites More sharing options...
pichou Posted January 19, 2018 Author Share Posted January 19, 2018 Ok so if I understand correctly : cloning will clone the original data but not the simplificated mesh generated? And thus you must simplify every mesh cloned or is there a way to apply the simplication from one mesh to another? Thanks @deltakosh Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 19, 2018 Share Posted January 19, 2018 Once the first mesh is simplified you can simply reuse the LODs generated for the first one and add them to the cloned meshes Quote Link to comment Share on other sites More sharing options...
pichou Posted January 20, 2018 Author Share Posted January 20, 2018 Ok how should I do that? I don't see/find how I can get the LODs generated and add them to another mesh? Thanks! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 20, 2018 Share Posted January 20, 2018 Hi guys. Sorry to interrupt. I think those are stored in mesh._LODLevels See console... https://www.babylonjs-playground.com/#2QEFG#5 I guess you could try some clones/instances of sphere, and see if ._LODLevels property... arrives safely at the new mesh. If not, just steal a copy of masterMesh._LODLevels. Do some 'deep copying', Pichou-style. heh. I hope I've been helpful. PS: I needed to go source-diving to find the ._LODLevels property. I could not '"discover" it... using a browser-based object inspector... on sphere. Maybe my eyes are going bad. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 22, 2018 Share Posted January 22, 2018 Hello! I'll add a getLODLevels() function in the next push 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.