BangTao Posted January 12, 2017 Share Posted January 12, 2017 Or Is there any way to carve 对象(Mesh) into slices,and get each of them? e....http://www.babylonjs-playground.com/#1GPLE i don't know how to use Octree simply////// 谢谢(thank you) . Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 12, 2017 Author Share Posted January 12, 2017 i have read its class at http://doc.babylonjs.com/classes/2.5/Octree,but i did'nt get it/ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 12, 2017 Share Posted January 12, 2017 Can you explain a bit more what you are trying to achieve? (perhaps a diagram can help) Quote Link to comment Share on other sites More sharing options...
MasterK Posted January 13, 2017 Share Posted January 13, 2017 八叉树跟切割有啥关系呢? just want cut a mesh to two pieces. I want to ask too. like fruit ninja. Quote Link to comment Share on other sites More sharing options...
MasterK Posted January 13, 2017 Share Posted January 13, 2017 oh... maybe he just want to ask how to use Octree to manage meshes. Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 13, 2017 Author Share Posted January 13, 2017 2 hours ago, MasterK said: 八叉树跟切割有啥关系呢? just want cut a mesh to two pieces. I want to ask too. like fruit ninja. 我想取到空间中所有3D模型的坐标数据或者用Octree分出来的空间块以及它对应原来模型上面的属性,比如说颜色啊啥的 Quote Link to comment Share on other sites More sharing options...
MasterK Posted January 13, 2017 Share Posted January 13, 2017 所以你就是问这个八叉树怎么用啊。百度google吧。。使用应该比较简单。就是存和找么。你有多大内容需要存。QQ群:458252438 is there any Octree usage case ? Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 13, 2017 Share Posted January 13, 2017 Maybe that's what you want: http://www.babylonjs-playground.com/#RM9ED#0 mesh.subdivide(x); mesh.createOrUpdateSubmeshesOctree(capacity, maxDepth); https://doc.babylonjs.com/tutorials/Optimizing_Your_Scene_with_Octrees#optimizing-collisions-and-picking https://doc.babylonjs.com/classes/2.3/AbstractMesh#createorupdatesubmeshesoctree-maxcapacity-maxdepth-rarr-octree-classes-2-3-octree-lt-submesh-classes-2-3-submesh-gt- Nabroski 1 Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 13, 2017 Author Share Posted January 13, 2017 6 hours ago, iiceman said: Maybe that's what you want: http://www.babylonjs-playground.com/#RM9ED#0 mesh.subdivide(x); mesh.createOrUpdateSubmeshesOctree(capacity, maxDepth); https://doc.babylonjs.com/tutorials/Optimizing_Your_Scene_with_Octrees#optimizing-collisions-and-picking https://doc.babylonjs.com/classes/2.3/AbstractMesh#createorupdatesubmeshesoctree-maxcapacity-maxdepth-rarr-octree-classes-2-3-octree-lt-submesh-classes-2-3-submesh-gt- Hello,thank u for reply.and can u tell me this subdivide() method is uniform subdivision or not?and another question is ,,,how can i get the submesh...seems like i always get the Main Mesh...i don't know ... Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 13, 2017 Share Posted January 13, 2017 http://www.babylonjs-playground.com/#RM9ED#0 -> it logs the submeshs in the console with console.log(sphere.subMeshes); Based on the values for the verticesCount it seems like its has equally divided the mesh if that's what you mean... but I don't know for sure. Nabroski 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.