Some months ago I worked on getting HDR working in REAL Studio. After trying a few things myself, I quickly found that I should not reinvent the wheel and use some of the available tools. I found two open source tools which in combination can be used to get HDR images created.
You can download the project below. Sample images are included as well as those open source tools we use.