1- Inclusion in .babylon file just like regular textures can.
2- Where certain meshes need to have their own environment separate from whatever the scene may have. Example:
I have a code base which is a mesh based GUI sub-system that has had many incarnations. While I am currently planning to use it as a cross-wrist summon-able portal for webXR, see demo video, I can also use it to generate animate-able, 3D credits.
When creating credits using StdMaterials & a light which follows the camera, things seem less than commercial quality:
It is clear there is no stock env which is going to be acceptable. The studio texture by @PatrickRyan being ported to Blender is a good starting point (maybe being inside a ring or box where the walls are well lit, but slightly varying, and darker ceiling & floor would be good). Being able to pack the env directly into the source code is far less clunky. for inserting the module into multiple scenes.
I’ll have to look at this. One thing unrelated is the base64 string is there twice, once as the url, and a 2nd time as the name. Not sure who does that, seems just a little long.
Ok, I have spent some time looking at CubeTexture.ts. If the url in the constructor can be a data string, I think I can also just use that as the first arg of the BABYLON.CubeTexture.CreateFromPrefilteredData() call I am using in my code.
For a .babylon, inline textures for materials are done with the base64String item. When specifying a file for the scene.environment,it looks like it could be replaced with a data string if it is a .env, since either the CubeTexture constructor or CreateFromPrefilteredData() is called.
For a native to Blender environment file that also works with us, a HDR, a HDRCubeTexture is needed. It is a subclass of BaseTexture, so not sure about this case.
HI @Evgeni_Popov, i’ve tried to use .env base64 encoded. But seems not to work.
I’ve followed your instruction, saving json from nme and then copy and paste the base64 string.
For testing i’ve used this playground 've found: https://www.babylonjs-playground.com/#IH5G0H#7
Hi @Evgeni_Popov, i resume this old post.
I had succesfully loaded the base64 embedded .env file. But, i can’t include in my project files too big. So the quality of the background scene is not so good. Is there another way to insert a background? I think that the 6 picture skybox would be perfect, but it can’t be done with base64 embedded file (this is the only way i can do it due to CORS policy).
What do you suggest?
Thank you in davance.