it should be an image. try pasting this data URL in your browserâs address line - if the browser can load it, so should babylon.js
It should probably start with something similar to this: data:image/png;base64,
Using URL itâs working fine. Instead that URL upload the HDR file using file uploader then convert it to base64, then try to get texture using that base64.
There was an error running it, but it was simple to resolve. Now - this playground does nothing. You are just showing what you described, but not showing it doesnât work.
Show me how you plan to use the texture, and show me it doesnât work. This way there is something we can work with. OItherwise - the playground works as expectedâŚ
I want to create texture using base64. I am not able to create texture using base 64 as defined in playground. These base 64 is generate of hdr image. I think I missing some parameters combinations.
a data URL doesnât involve the filename, it requires the decoded base4 string. and to use an HDR tedture you would need the HDRCubeTexture (assuming this is a cube).
Hi RaananW,
When i tried HDRCubeTexture with version 4.2.1, Its gives me following error.
Property âonLoadObservableâ does not exist on type âHDRCubeTextureâ
And apart base64, URL contain HDR image and new Texture(URL) working fine.
Let me do more clarity on the use case. I donât want to upload HDR image on any server then use that URL.
I just want to Upload HDR image on browser locally and convert it to PNG through texture. if conversion possible without texture using other concept, you can suggest it.
You need use âdata:image/jpg;base64,â
Thhis is run:
new BABYLON.Texture(data:image/jpg;base64,${value.Product.ProductImage}, scene, false, false, BABYLON.Texture.BILINEAR_SAMPLINGMODE, null, null, this.base64FileString, false);