c75 Posted November 13, 2015 Share Posted November 13, 2015 I tried to build scene using very huge value of position XYZ and got some glitches.http://www.babylonjs-playground.com/#1180R5#1 Strange behavior of scene when you move the camera around. And faces look bad on zoom-in. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2015 Share Posted November 13, 2015 Fix: http://www.babylonjs-playground.com/#1180R5#2 This is because you put your items to 400000 in x and y. You need to put your objects at such a distance? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 14, 2015 Share Posted November 14, 2015 Hey Dad72... I think he knows about the large values and is asking WHY these large values are causing bad renders. *shrug* I could be wrong, though. I have no answers. http://www.babylonjs-playground.com/#1180R5#5 I changed cameras, removed the box, added a wireframe sphere2, put a slow spin on both, and I used the renderloop to slowly move the scene toward 400,000 (watch the console). At about 300,000+, it starts jerking and freaking out. In fact, I get sphere jiggle before 100,000. Interesting find, c75! Strange indeed. *scratch scratch* Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 14, 2015 Share Posted November 14, 2015 It's a z-index problem. No way to deal with it currently, you just have to translate your scene in 0 as Dad suggested.I think Threejs has a logarithmic z-index buffer to deal with it, but I could be wrong. c75 1 Quote Link to comment Share on other sites More sharing options...
Stalker Posted November 14, 2015 Share Posted November 14, 2015 I can try and shed some light on this "glitch", based on my understanding (I might be completely wrong). It's isn't a glitch at all, it would happen anywhere because of floating point format IEEE 754, a quick and rough explanation (with error estimation formula) is also at StackOverflow. In general, increasing the value of floating point number decrees the precision causing glitches like you've found. A quick look through Babylon.js source code, you can see that it uses Float32Array (single precision). The same issue was addressed also in Ogre3D engine some time ago (slides 130 and a few on, the main emphasis in the presentation is memory cache). The problem was visible already at coordinates around 6000. That's why some engines move the entire world around the camera instead of camera itself (will back with some material as soon as I find it again). c75 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 15, 2015 Share Posted November 15, 2015 Temechon and stalker are right. you can also try to increment camera.minZ I will add logarithmic depth buffer to the roadmap:) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 18, 2015 Share Posted November 18, 2015 And boom:)http://doc.babylonjs.com/tutorials/Using_logarithmic_depth_buffer c75, jerome, Temechon and 2 others 5 Quote Link to comment Share on other sites More sharing options...
Stalker Posted November 18, 2015 Share Posted November 18, 2015 And boom:)http://doc.babylonjs.com/tutorials/Using_logarithmic_depth_buffer You have a space at the end of the link, causing 404 error. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 18, 2015 Share Posted November 18, 2015 Lol...And Boom (again!):http://doc.babylonjs.com/tutorials/Using_logarithmic_depth_buffer 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.