Jump to content

createDefaultEnvironment not work, createDefaultCameraOrLight to some problem


Dad72
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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: image.thumb.png.14df8418090b9430d97da6f4e94e422a.png

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.

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...