jellix Posted August 1, 2016 Share Posted August 1, 2016 Hi, in the following example: http://www.babylonjs-playground.com/#ZV0MS#0 you can see that the sides of the tube are flickering, although the mesh is thick enough and i shouldn't give a problem. In line 3 there's a size value of 1000000 (one million). Reduce it to 100.000 and everything's fine. Of course a cylinder with a radius of 1000000 centimeters(?) is very large. I could scale down my project but I would like to work in "real dimensions", for what I don't want to scale down by factor 10. Does anybody know a possibility to get the rendering fine in that dimensions? Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 1, 2016 Share Posted August 1, 2016 Hi jellix, I was wondering why you use such large numbers. Without thinking much about this I don't have a reason for that not to work with huge numbers, but - http://www.babylonjs-playground.com/#ZV0MS#4 works much better Quote Link to comment Share on other sites More sharing options...
jellix Posted August 2, 2016 Author Share Posted August 2, 2016 Hi RaananW, thanks for the reply. Well yeah, with a size of 100 it's running better :-) Even with a size of 100.000 it's running well. There is a simple reason why I want to use a size of a million: The model should become a huge space station with a "real" size diameter of 2.000.000 cm. This is just 2 kilometers which in my opinion is not SOOOO large ... It's okay when the engine gets in troble with that huge dimensions. By sacling down by a factor of 10 there is no problem anymore. But it just would be nice to be able to work in a real scaled scene because then I could model everything in real-scale, I can zoom into small details and the VR-View gives the correct feeling of the huge size. I just don't want to scale everything down before asking if anybody knows a solution for the large scenario :-) Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 2, 2016 Share Posted August 2, 2016 (edited) You have to set a minZ for the camera camera.minZ = 10; but of course this works only if you stand at least at 10 units far from any objects... As for handle a very large scene, it may be not simple. Of course there will be a lot of work into LODs and divide your scene into chunks, that will be a start You're not the only one who ask about it, read and test ! https://encrypted.google.com/search?q=game+handle+large+scene I think you can play to the game Halo for example, to look at how they handle level design when you see all the ring. Edited August 2, 2016 by V!nc3r Quote Link to comment Share on other sites More sharing options...
jellix Posted August 2, 2016 Author Share Posted August 2, 2016 Hi @V!nc3r, thank you very much - this is the answer I hoped for! When I am close to an object I can lower the minZ dynamically. The flickering will not appear anymore because the ring is small enought to no get out of my maxZ. Not sure about it, but nevertheless, this is the way to go for now :-) Quote Link to comment Share on other sites More sharing options...
Kesshi Posted August 2, 2016 Share Posted August 2, 2016 using a logarithmic z-buffer also helps: http://www.babylonjs-playground.com/#ZV0MS#5 (line 38)https://doc.babylonjs.com/tutorials/Using_logarithmic_depth_buffer Quote Link to comment Share on other sites More sharing options...
jellix Posted August 2, 2016 Author Share Posted August 2, 2016 @Kesshi - very nice - thanks for that! 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.