D3D, PIX and HDR Radiance images

Started by
3 comments, last by circlesoft 17 years, 6 months ago
Hi, I've got some problems with implementing tone mapping operator, so I've used PIX to see what exactly is going on in my app. Most of my textures has G16R16F format, because I only store luminance value and R16F is not supported. When displaying them in PIX and saving to .hdr file, the values become clamped. I.e. in the image, where half of it is a sky, which has luminance values higher than 1, it is being displayed in PIX as white, which is normal, as PIX doesn't do any tone mapping on the output. After saving it from PIX to .hdr format and opening saved file in HdrShop, it says that the image has 16 bits per channel. But the color values of the sky are just 1, so they became clamped. I'm not sure if it's my fault, if it's problem with PIX or a problem with built in .hdr Radiance format image loader. Any suggestions how to correctly save a single 16 bit channel of a texture from PIX? BTW. I'm using August 2006 DX SDK.
Advertisement
I had a similar problem with an older version of PIX. I never found a satisfactory way around it and ended up writing my own code that would save out HDR textures to disk - either to proper .hdr files or tone-mapped/scaled down to bitmaps.

The October SDK is, apparently, out tomorrow so you might want to see if they've improved things (PIX seems to be an area of change at the moment). Failing that fire off an email to directx@microsoft.com and explain what you're trying to do and why it doesn't work. They've been pretty good at listening to developers lately (as also shown by a couple of sticky threads in this forum started by the developers)...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Thanks, I'll try again tomorrow [smile].

Just in case it won't work - in documentation for MDX 1.1 it says that TextureLoader.Save method can save to .bmp and .dds file formats (I don't know how it saves my images to .jpg then [smile]). Will saving 64 bit image to .dds format save it correctly? Have you tried that?
Quote:Original post by g0nzo
Just in case it won't work - in documentation for MDX 1.1 it says that TextureLoader.Save method can save to .bmp and .dds file formats (I don't know how it saves my images to .jpg then [smile]). Will saving 64 bit image to .dds format save it correctly? Have you tried that?
I'm not a 100% sure, but yes, I think it will work - thing is, its not necessarily of any use. I'm not aware of any major art tools natively supporting DDS and I don't know how good the plugins are at handling HDR data. The SDK's texture tool has the same problems as PIX when it comes to manipulating DD's in HDR formats.

As for the JPEG thing - the MDX documentation is wrong [razz], refer to the C++ docs for D3DXSaveTextureToFile() and you'll see the full list of supported formats.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by g0nzo
Just in case it won't work - in documentation for MDX 1.1 it says that TextureLoader.Save method can save to .bmp and .dds file formats (I don't know how it saves my images to .jpg then [smile]). Will saving 64 bit image to .dds format save it correctly? Have you tried that?

I have done this before and to my knowledge, it worked correctly. There are then plugins that you can use with the DCCs (ie Max, Maya) to import/export DDS files. It's nice if you are doing lightmap baking or things like that.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement