Dad72 Posted December 20, 2017 Share Posted December 20, 2017 I just tested createDefaultEnvironment and nothing works as expected or as I think. The documentation is very poor on the subject, there is no example for the creation of a land and a skybox. I try many things, but nothing works. https://www.babylonjs-playground.com/#10D6YT#59 Another example here https://www.babylonjs-playground.com/#10D6YT#60 I also notice something else with a camera create by default with createDefaultCameraOrLight() The skybox is not displayed if the skybox is over 260 units. If we do a skybox of 500 for example, we do not see it. https://www.babylonjs-playground.com/#10D6YT#61 Another bug, try to turn the camera and you would see something weird https://www.babylonjs-playground.com/#10D6YT#62 I have not tested everything, because I have the impression that nothing works as expected and the documentation lacks information on all this. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 20, 2017 Share Posted December 20, 2017 @Sebavan who worked on it will soon come to help you and improve the doc Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 20, 2017 Share Posted December 20, 2017 The documentation is here: https://doc.babylonjs.com/babylon101/environment#skybox-and-ground and agree it is missing an example with options. Options are available as a parameter, not after instantiation: For instance to not create the ground in this case: https://www.babylonjs-playground.com/#10D6YT#58 You would use: https://www.babylonjs-playground.com/#10D6YT#63 Which is as simple as adding a mirror: https://www.babylonjs-playground.com/#10D6YT#64 It is also easy to access the automatically created elements for extra modification if the option you seek for are not present: https://www.babylonjs-playground.com/#10D6YT#65 Where intellisense gives access to all the required information: The material attached to the helpers are all BackgroundMaterial for efficiency: https://doc.babylonjs.com/how_to/backgroundmaterial I ll update the documentation with the related information ASAP. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Author Share Posted December 20, 2017 Thanks Sebavan, I think that I did not understand the operation, if I understand better, one does not create a ground, nor a sky, but a texture to reflect on an object, it is well it? And for the distance of the camera, is this a bug? with createDefaultCameraOrLight () The skybox is not displayed if the skybox has more than 260 units. If we do a skybox of 500 for example, we do not see it. https://www.babylonjs-playground.com/#10D6YT#61 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 21, 2017 Share Posted December 21, 2017 It does create a ground and sky for you but you have to specify properties in the createDefaultEnvironment method and not afterwards It can also add shadows and reflection for you for the skybox, just increment maxZ value: https://www.babylonjs-playground.com/#10D6YT#66 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 21, 2017 Author Share Posted December 21, 2017 Ok, I see, I did not use it as I expected. Sorry for my misunderstanding. I guess the documentation should be clearer to explain how it works to avoid the confusion I made. Because if I do this to create a sky and a ground, I do not see anything. And I thought it would create a mesh of terrain with texture and a skybox with textures. But it's not that. https://www.babylonjs-playground.com/#10D6YT#67 For the distance from the sky, maybe the value should be increased to 1000 when we create a camera by default with createDefaultCameraOrLight ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 21, 2017 Share Posted December 21, 2017 I will update it to 1000 @Sebavan will soon update the doc Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 22, 2017 Share Posted December 22, 2017 @Dad72 actually you have a plane mesh for the ground with a texture and a skybox with a texture except they are pretty subtle if you zoom out you ll see all of it. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 22, 2017 Share Posted December 22, 2017 Tracked here: https://github.com/BabylonJS/Documentation/issues/729 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.