Search the Community
Showing results for tags 'hdrcubetexture'.
-
Can I use the Asset Manager to load an .hdr and create a HDRCubeTexture with it? If so, can you provide an example? Thank you, amorgan
- 3 replies
-
- assetmanager
- hdrcubetexture
-
(and 1 more)
Tagged with:
-
Hello, What is the correct format of a .babylon file so that it can load an HDR texture into the reflectionTexture slot of a PBRMaterial? I know how to do this in code: var hdrTexture = new BABYLON.HDRCubeTexture("/g/test/interior.hdr", scene, 512); But I can't achieve the same thing with a .babylon file that is loaded with BABYLON.SceneLoader.ImportMesh. This is the last format I tried: { "materials": [ { "customType":"BABYLON.PBRMaterial", "name":"Material", "id":"Material", "alpha":1, "backFaceCulling":true, "albedoTexture": // the albedo loads fine! { "name":"DefaultMaterial_Base_Color.png", "level":1, "hasAlpha":0, "coordinatesMode":0, "uOffset":0, "vOffset":0, "uScale":1, "vScale":1, "uAng":0, "vAng":0, "wAng":0, "wrapU":true, "wrapV":true, "coordinatesIndex":0 }, "reflectionTexture": // this causes an error on load! { "name":"interior.hdr", "level":1, "hasAlpha":0, "coordinatesMode":3, "size":512, "uOffset":0, "vOffset":0, "uScale":1, "vScale":1, "uAng":0, "vAng":0, "wAng":0, "wrapU":true, "wrapV":true, "coordinatesIndex":0 } } ], "meshes":[{...}] } The model loads fine. As does the albedo texture (shown) and the reflectivity and normal textures (not shown). But when I include the Reflection texture it fails. The message in the console is: "babylon.js:3 BJS - [12:09:33]: Error while trying to load texture: /g/test/interior.hdr". Any help much appreciated. kind regards Karl