Jump to content
  • Advertisement
Sign in to follow this  
AtmaWeapon

HDR - RBGE to RGBA

This topic is 4725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After going through the Half-life loast coast thing, I noticed they said they use HDR lightmaps. Thats fine and dandy as long as your engine can read HDR image formats. Well, lots of engines reads PNGs, which has RGBA. Once those images are in your engine, with some simple shaders, HDR light maps should be a breeze to implement not to mention HDR skyboxes, HDR enviornment maps, etc. Does anyone know of a tool that converts RGBE format to RGBA? It's really simple. You just dump the E component into the A component. That lacking does, anyone know of a program that reads SGI format. After some searching apparently .rgbe is just .rgba in SGI format. This is apparently some arcane file format that I can't seem to find a reader for. The photoshop plugin I did find apparently doesn't work with newer (CS+) versions of photoshop and frankly I don't want to go digging for Photoshop 4.0. Any suggestions?.. Besides editing the engine source to support RGBE format.

Share this post


Link to post
Share on other sites
Advertisement
You can find information on .rgb here:

http://astronomy.swin.edu.au/~pbourke/dataformats/sgirgb/sgiversion.html

Share this post


Link to post
Share on other sites

RGBE in the context of HDR usually refers to the Radiance RGBE high dynamic range file format for images (.hdr, .pic).

This stores the Red, Green and Blue components as 16 bit floating point values with the exponent shared by all three components for a total of 32bits per pixel. No alpha components are stored. Info on the file format, and RGBE to RGB conversion code can be found here...

http://www.graphics.cornell.edu/~bjw/rgbe.html


Share this post


Link to post
Share on other sites
Yes I'm well aware of what pic format and RGBE is. However, when you read an RGBE file into memory it still stores the the R,G,B and E component into seperate channels and when you use a shader the E component is read in as the Alpha or A channel.

RGBE encoding is simply an RGBA image where the A channel doesn't actually represent alpha. But if you view it with an image viewer, it just looks weird. Well, thats ok. If you can convert RGBE to RGBA this way that means you can store RGBE images in PNG, TIFF, or whatever file format that supports 4 channels. This means that HDR maps can be read into a large number of engines and the decompression of RGBE to RGB can just happen in the shader code.

So is there any way where I can convert RGBE to RGBA where:
R = R
B = B
G = G
E = A

RGBE format is really just SGI's image format with 4 channels. So if I had a plugin for photoshop or anythign else that can read SGI's image format, then we're golden.

Share this post


Link to post
Share on other sites
Hi, about a month ago I ported one application from SGI's Iris to Win32. It did use .rgb files, which are directly supported by SGI's operating systems. I had the same problem as you, I could not find any working reader. In the end I managed to make it work by modifying one reader I had found. I can send you the code if you want, just send me a private message or reply to this post to confirm.

bboyBladeJ

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!