Ahiru Posted September 22, 2015 Share Posted September 22, 2015 In this example I chose meter as a unit (but even using km does not make a difference): http://www.babylonjs-playground.com/#1PGAPW#20 The sun in the distance should claim about half a degree angular size, so being easily visible. But in fact it starts being visible at 9e8, so MUCH later than the 1.4e11 it should be not only visible, but still have a decent radius? Any possibility in BJS to get realistic scalings? P.S.: Changing the FOV is not very helpful either, seems the z-distances can't be calculated properly then: http://www.babylonjs-playground.com/#1PGAPW#21 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 22, 2015 Share Posted September 22, 2015 I had asked something like that one time. in Babylon 1 unit = 1 meter for example.It is for us to determine a measurement unit. Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 23, 2015 Author Share Posted September 23, 2015 That's what I thought, and I'll come back to that, when I apply force - guess in the physics engines mass is in kg? And Force applied in Newton? Found my mistake already - wrong unit for the sun-diameter - now in meter it's exactly like expected: The 4m tall ship 458m away occupies the same space like the sun! GREAT!!! - Three.js had problems with large distances like that. Thank you BJS! - makes building things much easier. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 23, 2015 Share Posted September 23, 2015 /Happy Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 23, 2015 Author Share Posted September 23, 2015 ... But just out of curiosity: What happens here, that everything gets transparent? http://www.babylonjs-playground.com/#1PGAPW#21 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 23, 2015 Share Posted September 23, 2015 This is depth fighting. Not enough precision in the depth buffer to address the large distance you want to cover Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 24, 2015 Author Share Posted September 24, 2015 Is there any way to higher the precision? I want to use the FOV as a telescope-view - does not make sense to mingle with the celestial object data when to zoom in the view, does it? http://www.babylonjs-playground.com/#1PGAPW#24 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 Unfortunately we have no control over depth precision But you can tweak your object by using: material.zOffset Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 24, 2015 Author Share Posted September 24, 2015 Which means to calculate first manually the distance of the meshes to the active camera? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 Yes Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 24, 2015 Author Share Posted September 24, 2015 Ok, so then I easier (faster?) go with scaling all celestial bodies in frustum, I guess. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 This is always the problem with limited depth buffer unfortunately 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.