Jump to content
  • Advertisement

R&D .PFM to LDR RGB (0-255,0-1.0)

Recommended Posts

Hi everyone!


I need to transform a 32bit PFM (HDR) file, reading pixel by pixel, into a usual LDR format and later write into PPM and BMP files. Can someone please give me an   equation to solve this or a sinppet. is it enough to tonemap?

Share this post

Link to post
Share on other sites

You probably need to consider Exposure & Tonemapping.

i.e. what if the HDR image has values all greater than 10000?
Also since this is a lossy operation, the choice of tonemapper will have impact on the LDR/SDR result.

Geometric mean computed using the sum of log luminances is a common way of finding an exposure.

Then applying a common tone-map operator like Reinhard, Hable's Filmic curve, or even one of the new standard ACES ODT transforms can be done. They all have different results.

I would reference MJP's post :) on the topic.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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!