reddozen Posted July 19, 2014 Share Posted July 19, 2014 This is very similar to the last issue where the top of the statue was missing. In this case, parts of the scene aren't visible unless the view angle is correct. I'm not sure I can reproduce this with a smaller scene. A link to examples is below. Without Octree With Octree (press the octree button when it's done loading.After the scene loads (almost 250000 verts), press the Octree button to turn them on. You may have to click it a few times. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 19, 2014 Share Posted July 19, 2014 I had a similar problem that I solved with:for (var i = 0; i < mesh.getChildren().length; i++) { octree.dynamicContent.push(mesh.getChildren()[i]); mesh.getChildren()[i].useOctreeForCollisions = true;}You must also set MaxZ of the camera to see. Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 19, 2014 Author Share Posted July 19, 2014 But if you add children as dynamic content aren't thy ignored by the octree? These map objects are static within the game Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 19, 2014 Share Posted July 19, 2014 I had the same problem but I used a character to animate. http://www.html5gamedevs.com/topic/7764-mesh-which-disappears/ try also: camera.minZ = 0;camera.maxZ = 5000; Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 19, 2014 Author Share Posted July 19, 2014 I can't do a max of 5000 do to the scale of my scene. I would have less than 10 FPS. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 19, 2014 Share Posted July 19, 2014 Could you give me the name of the object that disappears ? It is extremely hard to debug on complex scene with minifed version of babylon.js Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 19, 2014 Author Share Posted July 19, 2014 You're favorite guy... dongsang disappears... lolBut most of the scene outside what looks to be the first octree zone has most objects disappearing. prt_dongsang.babylon Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 19, 2014 Author Share Posted July 19, 2014 I'll look into setting up a kind of "mouseover" to show object name feature. Would it help if i used the debug on babylon 13 instead? Is there anything specifically that would help you look at larger scenes (this town represents 1/5 of the total map that this will be)? I only see my scenes getting larger and in some cases it may only be possible to bring out the bug on that scale. I want to make it as easy for you to look at as possible, and I'll work out any tools I need to. Could this have something o do with instances and octrees maybe? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 21, 2014 Share Posted July 21, 2014 The best for me will be to use non minified version of babylon.js Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 21, 2014 Author Share Posted July 21, 2014 But aren't all the octree changes in 1.13? I didn't compile a copy of 1.13 if that's what you're considering "minefield", it's the one provided on the GIT. Or are you saying that I should use 1.12 for testing? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 21, 2014 Share Posted July 21, 2014 To debug instead of having just one file it is easier for me to work with separated files (not babylon.js but babylon.camera.js etc....) Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 21, 2014 Author Share Posted July 21, 2014 ok I'll look into using the individual package files instead of the precompiled file. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 21, 2014 Share Posted July 21, 2014 thank you:) Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 21, 2014 Author Share Posted July 21, 2014 I changed it, but now nothing loads when I call octrees. The scene will load fine if I don't call the octrees. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 22, 2014 Share Posted July 22, 2014 Your scene does not find the images reddozen. Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 22, 2014 Author Share Posted July 22, 2014 only some of them. It still loads normally when you don't call octrees through this method. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 22, 2014 Share Posted July 22, 2014 I had waited 3 to 4 minutes and the scene was not charging, I don't insist and I prefer to warn you. Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 22, 2014 Author Share Posted July 22, 2014 Thanks. I'm not sure what those materials are to be honest... they don't have extensions on them... I think that they're coming across from my Unreal engine exporter, but there's nothing named that in ANY of the texture packages in me unreal files... very strange. I'll probably just end of deleting them from the meshes, and write it off as a glitch. The scene loads VERY slow without the compiled version of babylon. This is what DK needed to debug the scene though, so I will do whatever he needs to make it easier for him to look at. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 22, 2014 Share Posted July 22, 2014 Yes I understand. but when you say the scene is very long a load, this mean how long. because at the end of 4 minute, I told myself that the scene won't it load. This could this happen if other person tests your scene. Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 22, 2014 Author Share Posted July 22, 2014 You are correct, this scene is not loading currently. For whatever reason, when I enable the octrees using this method, nothing loads. If I were to disable octrees, it would load after 2~3 minutes. I need to know why octrees are failing now. I have a try/catch in there to keep the javascript from crashing, so it's not that. The try/catch was my only solution for the problem with async loading of the models through import mesh causing a race condition and the octree call beating the file loads. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 22, 2014 Share Posted July 22, 2014 Right now I cannot debug Could you reduce the complexity? just one object or two perhaps? Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 22, 2014 Author Share Posted July 22, 2014 I'll try. I'll let you know. Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 30, 2014 Author Share Posted July 30, 2014 Sooo... few questions. So far I have around 1.5~1.6 million vertexes in my scene. Without octrees I'm running at about 20~30FPS. With them on it drops to 5~8FPS, and some of the meshes disappear as I've reported. 1) What would cause the the frame rate to drop so much if these are supposed to help speed up a scene by eliminating things that aren't visible etc?- Should backfaceculling be enabled on the meshes? (Is it seeing through walls)- Should mesh.useOctreeForRenderingSelection be included on all the meshes in the scene? 2) Could the meshes disappearing be because they're translated prior to being exported from 3DS Max, and babylon thinks that their center is somewhere else (assuming that it uses the center of the mesh for octree assignment)?- What is used to determine what meshes are in what octrees, and how do those rules apply to visibility?-- Example: A mesh is part of tree 1 and tree 2. If tree 1 says that it's visible, then tree 2 says it's not, if tree 2 is the last one to assign a visibility, then is it not visible? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 30, 2014 Share Posted July 30, 2014 So... 1/ the octree help selecting meshes. If you only have a few meshes then this is not a good idea to create an octree. If you have, let's say, more than 200 meshes then creating a simple octree can be ok.backFaceCulling is only useful with transparent meshesuseOctreeForRenderingSelection is for meshes with a lot of submeshes 2/babylonjs compute a bounding box for every mesh. If an object is not moving then octree could be useful else you have to put your object in the dynamicMeshes of your octreeThere is only one octree per scene (and one octree per mesh if you activate it) Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 30, 2014 Author Share Posted July 30, 2014 I guess for 2 I should have been more clear. I'm asking more how it knows which zone of the octree the mesh is in. None of my meshes are moving. This might help figure out what's going on... the walls floating above are my invisible objects that all my visible scene meshes are instanced from. They shouldn't be visible at all. 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.