fenomas Posted March 9, 2015 Share Posted March 9, 2015 Hi, I'm manually assembling a mesh with submeshes, and I find that the end result renders correctly, except for the fact that it often gets culled when it should be visible. That is, it renders correctly if the camera is pointed in certain directions, but in other directions various submeshes get hidden even though they are fully within the camera frustum. So I imagine there is some kind of "recalculateTheSomething()" function that I'm supposed to be calling, but I can't find any sample code to reference. In pseudocode, I am basically doing this:vdat = new VertexDatavdat.positions = concat( submeshPositions )vdat.indices = concat( submeshIndices )// ...colors, normals, etc.mesh = new Meshmesh.position = someVec3vdat.applyToMesh( mesh )mesh.subMeshes = []for (i in submeshData) { var sub = new SubMesh(matID, vertStart, verts, indStart, inds, mesh)}Is something obvious missing from that pseudocode? Again, apart from frustum culling everything seems to render correctly. Quote Link to comment Share on other sites More sharing options...
fenomas Posted March 10, 2015 Author Share Posted March 10, 2015 ==> https://github.com/BabylonJS/Babylon.js/issues/430 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.