Jump to content

BABYLON.LDRCubeTexture


MackeyK24
 Share

Recommended Posts

Hey guys... I really need the community help on creating a class for babylon for skyboxes using a LDR (Tone mapped HDR) Cube Texture just as you would a HDRCubeTexture ... Except with ALREADY tone mapped RGB or RGBA pixels in the form of a png or jpeg. This will allow us to take HDR images from places like hdrlib.com and actually use them as a skybox. You can with a native HDR but it is a RESOURCE KILLER... you will NEVER get a good full resolution HDR skybox in your babylon game... the native HDR format works BEST in babylon when used real small like 256K and should be used for things like reflection and refraction textures... NOT the whole scene skybox because too much resources and takes for ever to generate ... Both at runtime and the pre-propocessor.

But if we tone map that HDR to LDR WebGL can handle that pixel data just fine (plus the actual .png or .jpeg will be smaller 8-Bit per channel images).

Here is an example HDR Tone Mapped Imaged i created with the BabylonJS Toolkit: http://mackey.cloud/files/bridge.png

It is a very nice tone mapped version of an HDR file... Please download that file and take a look... I would like to use this file in place for a .hdr and use a new BABYLON.LDRCubeTexture class to display as skybox (Just like you would a regular HDRCubeTexture)

I stated to "COPY" and cleanup HDRCubeTexture class as LDRCubeTexture...

babylon.ldrCubeTexture.ts

Basically i need SOMEONE to PLEASE modify the loadLDRTexture() function to use regular RGB pixels stored at 8-bits per channel (instead of 16-bit).

I was able to figure out SOOOOO much on my own to create all the kool features i have in the new 1.1 toolkit... But i am LOST in that PIXEL code that is supposed to basically "split" cube faces pixel in an Array of Arrays... the result should be and array of pixels for each face...i THINK :(

This is the very last piece i need to prepare the BabylonJS Toolkit Version 1.1 Beta for release... 

Any help would be freaking awesome :)

Yo @Deltakosh I really need ya bro :)

Link to comment
Share on other sites

4 minutes ago, Sebavan said:

Hey Mackey,

I trade the feature for the exporter Doc ??? :-)

Can not wait to read it as I have an export to do.

CU,

 

DEAL... You work on that... Ill work on ONLY docs (will be for new version 1.1 beta... Not the current 1.0.1 proof of concept version).

The newer one uses Babylon 3.0 and unity 5.6 (Big changes in Unity user interface for lighting, collision, materials, navigation etc...)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...