MackeyK24

Members
  • Content count

    304
  • Joined

  • Last visited

  • Days Won

    3

MackeyK24 last won the day on December 19 2016

MackeyK24 had the most liked content!

3 Followers

About MackeyK24

  • Rank
    Advanced Member
  • Birthday
  1. What size should we be using to generate babylon HDR using BABYLON.Tools.generateBabylonHDR ??? The cabman actual image resolution is 3200 x 1600 ... the cube face size is 2048... But if i try to pre-process a cabman at 2048 full resolution IT NEVER FINISHES ... over 12 hours still never finishes... Everywhere i see HDRCubeTexture is always using SOME MUCH LOWER (like 256 or 512) cube map size then the actual cabman face size. Is there some SCALE or RATIO we should using OR are we supposed to trying to run HDR at whatever the actual cabemap face size ???
  2. You da man Sebastian They are FREAKIN beautiful.. Loads REALLY FAST ... Thanks man Now i am going to make a "Skybox Generator Scene" to include in the toolkit that you can use to "BAKE" or "PREPROCESS your skybox" ... SWEET !!! Gonna test the performance on mobile next ... Fingers Crossed !!!
  3. Almost... @Sebavan First WE need to have separate material setup for the sphere or box that is to reflect the skybox Second... image is SWAPPED.... what is on the left should be on the right in the original .png (Example the sign with the again writing should be to your left... but when using this BABYLON.Texture.FIXED_EQUIRECTANGULAR_MODE they show up on the right ) try this one: http://www.babylonjs-playground.com/#1CQJEI#7
  4. You da man Sebastian
  5. Wow... that looks beautiful ... But unfortunately still will not not work with the same WORKFLOW you would use for matieral.reflectionTexture on ALL OTHER NON SKYBOX meshes... For Example... Lets say you have a scene with THREE cubes... Each cube has a PBR material setup with its own texture. The NORMAL babylon skybox reflection workflow. 1... Setup the skybox mesh (cube or sphere) apply the CubeTexture (including HDRCubeTexture) to the skybox mesh material.reflectionTexture (can also use emissive or diffuse texture for actual SKYBOX mesh) 2... For every other scene object (our case three cubes already setup with its own material/shader) that is to use 'Skybox Reflection' we assign the CubeTexture or HDRCubeTexture to the material.reflectionTexture (Reflection Texture ONLY... Must not alter the already mesh rendering... but simply ADD reflection to it) If using HDRCubeTexture just uses the ONE HDR panorama cubemap file... If using CubeTexture is uses 6 sided images... What i really want is CubeTexture to use ONE PNG panorama cube map file instead of having to load six separate images for CubeTexture.... Keep in mind I STILL NEED TO USE AS IF IT WS A REGUAR CubeTexture or HDRCubeTexture (meaning material.reflectionTexture) even a separate shader would not work for it would OVERIDE the shader or material that is already assign to the mesh that it is supposed to provide reflection for. This seems so complicated... I would have thought it would be EASY since the HDRCubeTexture already does this by splitting the cube faces from the panorama HDR file... How come CubeTexture does not have feature... ONLY SIX SEPARATE images supported... Does NOT seem that efficient... when we can make a PNG panorama just like there is a HDR panorama (or simple convert a HDR image to PNG image... losing and colors out of 0 to 1 range of course... but that is ok... i just want the panorama features of the cube map... not really concerned about colors out the 0 to 1 range... Just wanna make kool good looking skyboxes... With reflection for ALL other scene objects) wow... that ws a mouth full
  6. That kinda works for the skybox itself... BUT DOES NOT WORK FOR material.reflectionTexture on EVERY other game object in the scene that need to reflect the skybox... Unless i am missing something there... That solution was to to simple set the material.emissiveTexture and a SPHERICAL coordinates mode... Right ... How can that work for proving reflection ???
  7. The latest webgl 20 and vertex array object might need a bit of tweaking or the generateBabylonHDR functions do. the update cause more webgl error when using a pre processed HDR file produced using the generateBabylonHDROnDisk: [.Offscreen-For-WebGL-0x7f9edb812e00]GL ERROR :GL_INVALID_OPERATION : glTexImage2D: invalid internalformat/format/type combination 0x8814/0x1907/0x1406 196/#UTEVJ#0:1 [.Offscreen-For-WebGL-0x7f9edb812e00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering. I made a Test Pre Process HDR Skybox playground to show the problem... @Sebavan and or @Deltakosh ... I am pinging you guys here also a A Regular HDR working sample is here
  8. Yeah... But i need to use it as a panorama reflection texture... just like HDRCubeTexture does or the 6-sided CubeTexture does. So they will get used as the material.reflectionTexture for every game object that is supposed to reflect the skybox. Now setting the diffuse and emissive textures using coordinatesMode will work for the SKYBOX itself to actually render the SKY... but needs to ALSO be used as the reflectionTexture for the rest of the game objects. I just HATE having to make SIX server trips to get a six sided skybox images... When a single panorama version (from which the 6 sides where split from) can be used MUCH more efficiently ... Specially for loading.
  9. Yep... Handle automatically for EVERY Unity Standard Material (Note the Babylon PBR Material is subclass of Unity Standard Material With a few babylon specific properties added on) in the scene... So you don't need to 'explicitly' set the reflectionTexture to a HDRCubeTexture for every game object ion the scene using PBR materials in babylon... Even if you just have the standard unity shaders (including the specular one). Also note that if you use the pbr material you can however go and explicitly 'disable skybox reflection' on a game object material if you need to or don't want that object to reflect the skybox.
  10. First of all... you got TOOOOO many parameters on there... Things like albedoTexture are already part of the default PBR material... So no need to use another albedoTexture that is overriding was the actual scene is using... Jus look at the EXISTING DumpPBRMaterial function... You are ONLY trying to add a few additional patermaters that will be useful to set right in the material inspector instead of in code... and things that are already NOT BEGING USED... so you be doing stuff like cameraContast and maybe the overload stuff... But DONT OVERWRITE ANY EXISTING stuff... Cand second you one of code that are giving you red errors line are simply syntax errors... You are trying to get the value from the material for EVERYTHING as an int ... material.GetInt should only used to get integer values... You have to look at 'Material Inspector Properties' in unity to get a handle on how material properties work... Just take at look at existing code and i handle different types
  11. Yo @Sebavan or @Deltakosh That basically will work for the skybox ONLY... But what i really am trying to d is use reflectionTexture = BABYLON.CubeTexure BUT using a SINGLE panorama image instead of of SIX separate images... Maybe to splitting in code the same way HDRCubeTexture splits the faces... Or something where i can use as a reflectionTexture (not only for the skybox, bit for each PBR material the skybox is providing reflection for) Thats what i am really trying to do.. avoid splitting by skybox images (at the server level at least... don't mind using code to split)... so i don't have to make six separate server trips for skyboxes ... How do think i can do this
  12. Yo @Sebavan and @Wingnut I tried your suggestion ... I think i got something showing up, but faces are in the wrong place... I assume there is more i need to do than just change coordinatesMode. Please take a look at my playground and hook it up ... PLEASE. http://www.babylonjs-playground.com/#LANDI#0
  13. I tried this... shows nothing: var boxSize = 1000; var pngTexture = new BABYLON.Texture("http://mackey.cloud/files/panorama.png", scene); var pngSkybox = BABYLON.Mesh.CreateBox("pngSkyBox", boxSize, scene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.backFaceCulling = false; skyboxMaterial.disableLighting = true; skyboxMaterial.reflectionTexture = pngTexture; skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.EQUIRECTANGULAR_MODE; pngSkybox.material = skyboxMaterial; pngSkybox.infiniteDistance = true; @Sebavan Can you please point out what i am doing wrong
  14. Never mind... Found it... Environment Map Generator Extension
  15. There seems to be some way of loading PRE PROCESSED HDR images using HDRCubeTexture... What is this and HOW DO I PREPROCESS a HDR ??? Anyone