Things I've tried to get a temperature other than 0 deg C:
Applying a temperature map via ENVI image format to an obj file
- Many combos of bip/bsq/byte oder/data type were tried
Applying a temperature map via PGM image format to an obj file
Creating a BOX entry in the mat file with a TEMPERATURE flag
Using a *.gdb file with all the facets set to 25C
All of the above produce a temperature prediction of 0 deg C
In this case, the temperature is actually getting assigned, but the emittance is not getting calculated.
This is mostly just an oversight (the water stuff was based on reflective applications). I could easily get the blackbody calculation in there and the emissivity wouldn't be a big deal either since we're dealing with a Fresnel surface. Things might be a bit more complicated for some of the microfacet surface models we use for water, but I'll leave that for another day...
I'll keep you updated and will try to get something into the next release.
Created attachment 252 [details]
I've attached a plot of what I believe the directional emissivity should be for the upper "skin" of water based on Fresnel theory. I've plotted the emissivity for two values of the real component of the index of refraction which is where the spectral dependence is going to come from.
I think this will work fine for getting you a semi-accurate flat surface emittance assuming a provided skin temperature (which I will interpret the geometry temperature as). Note that this is a bit different than the temperature profile in the water column which is normally used to compute optical properties (presumably you don't care about anything in the water since you will never penetrate outside of the visible). I will reserve any temperature defined in the iop model (such as the one used for the simple IAPWS model) to refer to the in-water temperature profile (constant for that particular case) and the temperature set in the geometry/surface material as the skin temperature.
There are some (serious) caveats about modeling water in the infrared:
1) As should be obvious, the provided models for IOPs are somewhat useless outside of the visible (the absorption jumps 8-9 orders of magnitude so there is nothing interesting going on). That said, the IOP models are trying to capture the physical effects of particulate/dissolved matter that probably does have an effect right at the surface in reality. If this is important, you are probably better off just modeling the surface of the water as, well, a surface and skipping all this stuff that's important in the visible.
2) You're going to have a hard time capturing the characteristic directional emissivity of real waters with just the Fresnel surface properties. Roughened waters have pretty distinctive emissivity profiles that are a bit more complicated than just applying Kirchoff's law to a BRDF (e.g. http://cimss.ssec.wisc.edu/~paulv/Fortran90/Emissivity/Sensor_Emissivity_Model/). I would love to see DIRSIG have a robust thermal model for water, but right now it's going to be a simplistic approximation.
3) The spectral dependency of the emissivity (and reflectivity) is entirely based on using the appropriate refractive index for a given wavelength at the appropriate temperature, salinity, and pressure. For the visible, I provide the IAPWS model which is only valid out to about 1 or 2 microns (or less). Within the 0.4 to 10 micron range however, there is significant, nonlinear variation in the refractive index (see Zoloratev and Demin's plots from the 70s for instance). Assuming that this is important to your work, you'll have to model the refractive indexes manually, one wavelength at a time.
I added an emittance calculation to the Fresnel rad solver as discussed previously. I also modified the truth collection so it would grab the temperature from non-opaque objects (this is why you never saw your temperature). Additionally, I added an initialization for temp solvers for these types of surfaces so you can define the temperature in the material as well (though it won't require interfaces to have temp solvers assigned, as it does with normal surfaces).
This appears to make the model behave as you expected. I'll get more feedback from you later to make sure it's working, but for now I'm going to mark this as fixed.