htrdr The Monte-Carlo radiative transfer simulator

htrdr 0.10 is available

htrdr evaluates the intensity at any position (probe) of the scene, in any direction, in the presence of surfaces and an absorbing and diffusing semi-transparent medium, for both internal (longwave) or external (shortwave) radiation sources. The intensity is calculated using the Monte-Carlo method: a number of optical paths are simulated backward, from the probe position and into the medium. Various algorithms are used, depending on the specificities of the nature and shape of the radiation source.

Related articles

Applications are theoretically possible to any configuration. However, it all eventually comes down to the possibility of using the physical data of interest, in their most common formats, in each scientific community. htrdr is currently suitable for three main application fields:

  1. Atmospheric radiative transfer: a clear-sky atmosphere is vertically stratified, neglecting Earth sphericity, and described in terms of absorption coefficients as a function of height and spectral quadrature point as per a correlated-k model. Cloud physical properties are provided on a 3D rectangular grid. Surface geometrical and optical properties can be provided for an arbitrary number of geometries. Internal radiation and solar radiation are taken into account.

  2. Combustion processes: thermodynamic data is provided at the nodes of an unstructured tetrahedral mesh, while surface properties can still be provided for various materials. The radiation source is only external: a monochromatic laser sheet illuminates the inside of the combustion chamber for diagnostic purposes.

  3. Titan Titan_transit
    Images of Titan rendered with htrdr-planeto. Its 3D atmosphere is composed of a gas mixture and two aerosol modes for haze and clouds. In the bottom image, the source is positioned behind Titan to simulate a transit situation, i.e. a solar eclipse by Titan.

    Planetology: takes into account the geometry of a "ground" of arbitrary shape, described by a triangular mesh, with the possibility of using an arbitrary number of materials. The radiative properties of a gas mixture must be provided on a tetrahedral mesh, using the k-distribution spectral model. The radiative properties of an arbitrary number of aerosol and hydrometeores can also be provided on their individual tetrahedral mesh. Calculations can be made for both internal and external radiation sources. In the case of an external source, a sphere of arbitrary size and position is used. This sphere can radiate as a Planck source at a specified brightness temperature, or be associated with a high-resolution radiance spectrum.

Since any radiative transfer observable is expressed as an integral of the radiance, and since there is a strict equivalence between the integral to be solved and the underlying Monte-Carlo algorithm (each integral is associated with the sampling of a random variable), the algorithms that calculate the radiance are used for computing various quantities:

This film demonstrates the capacity of Monte-Carlo path-tracing methods to handle large scale ratios from large cloud fields to cities to buildings to trees and down to a teapot. The 4D cloud field has been produced by the Meso-NH (Lafore et al 1998, Lac et al 2018) Large Eddy model. Spectral materials are defined in particular from data from the Spectral Library of impervious Urban Materials (Kotthaus et al 2013) . Each frame was rendered with htrdr-atmosphere using 8192 samples per pixel component. The resulting images are then post-processed with the htpp program. Refer to the video for a complete description of how it was produced.

Related projects

Images rendered with htrdr-atmosphere of a 10003 cloud field produced by the Meso-NH (Lafore et al 1998, Lac et al 2018) Large Eddy Model. The initial conditions and model set-up for the simulation are described in Strauss et al. (2019). The infrared rendering is calculated in [9, 10] µm spectral range; the color map displays the brightness temperature in Kelvin.

htrdr has been used, developped and extended in the following research projects:

A straight interface

Image rendered with htrdr-atmosphere, of a city procedurally generated with spectral materials defined in particular from data from the Spectral Library of impervious Urban Materials. The entire dataset (geometry, materials and cloud field) is included in the atmosphere Starter-Pack.

htrdr is a command-line tool that performs computations on input data, writes the rendered image and nothing more. No assumption is made on how input data are created, the only requirement is compliance with the expected file formats. In the same spirit, the output image is written in plain text, as a list of raw pixel estimations, which makes it easier to post-process.

This thin interface is, by nature, particularly well suited to be extended and integrated into any workflow. For instance, one can save the cloud properties used by htrdr-atmosphere directly in the htcp file format or use the les2htcp tool to convert cloud properties from NetCDF to htcp. In the same way, the output image can be post-processed through gnuplot or converted in a regular PPM image by the htpp program, and then visualised in an image viewer as for instance feh or display.


Renderings in the visible range calculated by htrdr-combustion of a laminar sooting flame seen from above and illuminated by a laser sheet. The images display radiation that is emitted by the laser, scattered and transmitted by the combustion medium. The laser sheet is horizontal, and intersects the medium at various heights. One can see the difference in the scattered signal between the left and right parts of the image; since the laser propagates from the left to the right, it is progressively attenuated while traveling the medium. The intensity of radiation subject to scattering therefore decreases. In addition to these trapping effect these images provide some insight about the scattering cross-section of the medium as a function of height. Scattering properties of soot gradually increase from the injection position to a height of approximately 35 mm. A steep decrease follows: the image for a height of 40 mm is very similar to the image obtained at 10 mm.
Images in the visible range rendered with htrdr-combustion of a sooting flame illuminated by an horizontal laser sheet that runs through the central axis of the flame; the camera is looking at the centre of the flame, but its normal is oriented respectively at an angle of 30, 60 and 90 degrees relative to the main direction of the laser sheet. One can see the trapping of radiation by the medium and the decrease of scattering intensity decreases with the angle of observation, otherwise known as the scattering angle and the decrease of the scattered intensity with the angle of observation.

No pre-compiled version of htrdr is provided; it must be compiled directly from its source tree. A simple way is to rely on star-build, which automates the build and installation of htrdr and its dependencies from source code.


To build htrdr with star-build, first make sure your system has the following prerequisites:


Assuming that the aforementioned prerequisites are available, the build procedure is summed up to:

~ $ git clone \
~ $ cd star-build
~/star-build $ make \
  PREFIX=~/htrdr_0.10 \

With PREFIX defining the path where htrdr will be installed and BUILD defining the installation script to be run.

By default, the whole htrdr project is built but you may prefer to deploy htrdr only for a specific application, i.e. only for atmospheric radiative transfer, combustion processes or planetology. For example, to install only the atmospheric part of htrdr:

~/star-build $ make \
  PREFIX=~/htrdr_0.10 \
  BUILD=src/ \
Shortwave (left) and longwave (right) downward flux density maps in W/m2 computed by htrdr-atmosphere at 1 meter height with the DZVAR cloud field. The shortwave and longwave spectral integration ranges are [0.38, 4] µm and [4, 100] µm, respectively. Their spatially-avaraged flux is 879.349 W/m2 in shortwave and 425.159 W/m2 in longwave. In both cases, the sun is located at the zenith. In the shortwave map we observe the contrast between the shadows of the clouds and fully illuminated areas. In longwave, we can see the effect of clouds (higher values, due to the emission by the base of the cloud at higher temperatures than for a clear-sky zone) and also a "ripple" effect that is due to the spatial variations of water vapor concentration, as provided by the LES simulation.


Evaluate the installed htrdr.profile file in the current shell to register htrdr against it. You can then run htrdr and consult its manual pages:

~ $ . ~/htrdr_0.10/etc/htrdr.profile
~ $ htrdr -h
~ $ man htrdr

Refer to the Starter Packs (atmosphere or combustion), to quickly run a htrdr rendering; these archives provide input data and scripts that are good starting points to use htrdr.

Release notes

Version 0.10

Use POSIX make as a build system

The build procedure is now written in POSIX make instead of CMake. In addition to the features already provided by its CMake alternative, the Makefile supports the use of static libraries and provides an uninstall target. In any case, the main motivation behind its writing is to use a good old well-established standard with simple features, available on all UNIX systems, thus simplifying its portability and support while being much lighter

Proof-reading and editing manual pages

Write the man pages directly in mdoc's roff macros, instead of using the scdoc markup language as a source for man pages.

Unlike writing manuals with man's roff macros, and even more so with scdoc, mdoc macros take care of layout, font handling and all the other typesetting details which, by construction, guarantee the consistency of all manuals without leaving the responsibility to the individual author. This also facilitates translation into other formats and documentation tools. These are the main reasons for writing manual pages with mdoc macros.

A complete re-reading of the manual pages was carried out during the translation into mdoc, with several corrections and rewrites to make the manual clearer.

Bug fixes

Version 0.9.2

Version 0.9.1

Version 0.9

Adds radiative transfer simulation in 3D planetary atmospheres

The new htrdr-planeto command simulates radiative transfer in planetology context, i.e. in the 3D atmosphere of a telluric planet. Both infrared and visible computations are supported. htrdr-planeto is actually a renderer that calculates an image for a given observation position. Its internal rendering algorithm is based on Monte Carlo integration, which consists for each pixel in simulating a given number of optical paths from the sensor, taking into account the phenomena of light absorption and scattering.

The planet's ground can be any set of triangles with BRDFs and temperatures defined per triangle. The atmosphere is composed of a gas mixture and a potentially empty set of aerosols. Both can have arbitrary tetrahedral meshes with per-node radiative properties.


Version 0.8.1

Sets the required version of Star-SampPling to 0.12. This version fixes compilation errors with gcc 11 but introduces API breaks.

Version 0.8

Version 0.7

Adds the simulation of radiative transfer in combustion media

The new htrdr-combustion command performs radiative transfer computations in a scene representing a semi-transparent medium enlightened by a laser sheet. It uses Monte Carlo to calculate a monochromatic image of the medium or the radiative flux density. Both computations are performed in the visible at a given frequency.

The medium data are defined on the vertices of an unstructured tetrahedral mesh that may be surrounded by a triangular surface mesh representing the inner limits of the combustion chamber.

Updates the htrdr command

The previous htrdr command is renamed to htrdr-atmosphere. htrdr becomes a proxy for the htrdr-atmosphere command or the htrdr-combustion command: calling htrdr with the <atmosphere|combustion> options is equivalent to directly calling the htrdr-<atmosphere|combustion> commands.


Version 0.6.1

Version 0.6

New features


Version 0.5.1

Version 0.5

New feature

Add support of shortwave integration with respect to the Planck function for a reference temperature whose default value is the blackbody temperature of the sun. Actually this is the counterpart of the longwave integration introduced by the "infrared rendering" in the 0.4 version. The main difference is that the source of radiation is the sun rather than the medium and its boundaries.

The option -l that enabled the infrared rendering is now replaced by the new -s option that controls the spectral integration that can be CIE XYZ (i.e. regular image rendering), longwave or shortwave.


Version 0.4

New features


Version 0.3

Version 0.2

Version 0.1

Version 0.0.4

Version 0.0.3


htrdr has been funded by the ANR Rad-Net since 2021. |Méso|Star> is subcontractor of the project.

htrdr was funded by the ANR Astoria from 2018 to 2022. |Méso|Star> was sub-contractor of the project.

htrdr was funded by the ADEME (MODEVAL-URBA-2019) from 2019 to 2022. |Méso|Star> was partner of the project with CNRM.

htrdr was funded by the ANR High-Tune from 2016 to 2019. |Méso|Star> was sub-contractor of the project. Visit the High-Tune project web site.

Copyright notice

Copyright © 2018-2019, 2022-2023 Centre National de la Recherche Scientifique
Copyright © 2020-2022 Institut Mines Télécom Albi-Carmaux
Copyright © 2022-2023 Institut Pierre-Simon Laplace
Copyright © 2022-2023 Institut de Physique du Globe de Paris
Copyright © 2018-2023 |Méso|Star> (
Copyright © 2022-2023 Observatoire de Paris
Copyright © 2022-2023 Université de Reims Champagne-Ardenne
Copyright © 2022-2023 Université de Versaille Saint-Quentin
Copyright © 2018-2019, 2022-2023 Université Paul Sabatier


htrdr is free software released under the GPL v3+ license: GNU GPL version 3 or later. You are welcome to redistribute it under certain conditions; refer to the COPYING file for details.