MackeyK24 Posted November 1, 2016 Share Posted November 1, 2016 If you specify texture customType = "BABYLON.HDRCubeTexture" and the other HDRCubeTexture properties... With .hdr as the name... It will still try to use as regular CubeTexure and look for _px and _nx cube texture files: I think babylon.texture.ts Parse function: now is : if (parsedTexture.isCube) { return CubeTexture.Parse(parsedTexture, scene, rootUrl); } and should be something like: if (parsedTexture.isCube) { if (parsedTexture.customType === "BABYLON.HDRCubeTexture") return HDRCubeTexture.Parse(parsedTexture, scene, rootUrl); else return CubeTexture.Parse(parsedTexture, scene, rootUrl); } OR IS THERE MORE to make HDRCubeTextures load from serialized .babylon file instead of only hand coding? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 1, 2016 Share Posted November 1, 2016 Ping @Sebavan Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 1, 2016 Share Posted November 1, 2016 It should have worked, I was using in the unity exporter and remember moving the code around but I may not have push.... Please do not hesitate to make the PR. I can do it if you prefer ? But I would have not added the custom type only. Sorry for the issue. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 1, 2016 Author Share Posted November 1, 2016 Please can you fix... I am not that good with the whole Pull Request thing on github. Also... I made a TON of fixes and enhancements to the unity exporter, but i don't know how to go about submitting them... There are code changes and little move arounds in pretty much all the exiting unity code plus i added a few more classes (some in same ExporterMetadata.cs and the rest in its own source file). So i don't know HOW clean the commits will look... It will be LARGE 'pink minus' and 'green plus' blocks, i imagine. I was going to just zip the whole project up and post it... So the powers that be can download it take a look at all it new features... and if you think its worth it, ill upload to the github Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 1, 2016 Author Share Posted November 1, 2016 And just fyi, i do set more then just 'customType'. Here is my Unity HDRCubeTexture subclass: [DataContract] public class UnityBabylonHDRCubeTexture : UnityBabylonTexture { [DataMember] public string customType { get; private set; } [DataMember] public int size { get; set; } [DataMember] public bool useInGammaSpace { get; set; } [DataMember] public bool generateHarmonics { get; set; } [DataMember] public bool usePMREMGenerator { get; set; } [DataMember] public bool isBABYLONPreprocessed { get; set; } public UnityBabylonHDRCubeTexture() { this.customType = "BABYLON.HDRCubeTexture"; this.size = 0; this.isCube = true; this.useInGammaSpace = false; this.generateHarmonics = true; this.usePMREMGenerator = false; this.isBABYLONPreprocessed = false; } } Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 1, 2016 Share Posted November 1, 2016 I ll do and yes we can take a look before your PR and welcome those changes for sure :-) My main issue is I really dunno where this code has gone ? CU, Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 2, 2016 Share Posted November 2, 2016 All working now: http://www.babylonjs-playground.com/debug.html#NJEJD#3 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.