Raytracing with ultra violet/infra red

Solution 1:

To realistically render in infrared would require a massive amount of work as it would require accurate simulation of a physical object at the material level, along with internal and external heat sources.

Raytracers work because beams of light either pass through, are reflected by, or is absorbed by surfaces with immediate identifiable effects, and what the eye sees is the conglomeration of these effects. A raytracer takes advantage of the fact that the effects within the visible spectrum are rather simple, an object either reflects or absorbs light in particular wavelengths and what you see is the remaining colour spectrum.

Infra-red on the other hand can work in a similar fashion, some is absorbed and reflected by certain surfaces, but those absorptions have a physical effect. They cause the object to warm up and thus appear slightly "warmer" in the infra-red spectrum. There is also the fact that creatures actually generate heat and objects generate heat through friction when they move and heat can be conducted between objects.

Time and environment would also have to be taken into account, as in a cold environment objects shed heat faster than in a warm environment. Effectively you would have to program and simulate an entire environment and then "pick a time" that you wanted to take a picture of.

I would expect something similar to be the case with ultraviolet light.

I'm not saying an infra-red raytracer/renderer is impossible, just that it would require a lot or work.

It appears that this kind of question has been asked before for Blender, LuxRender and you can apparently "simulate" fake infra red using Photoshop but all seem to reply with the response of "we designed it to work with visible light".

Solution 2:

Is there a raytracer which can render images with more than the visible colors?

It is impossible to renderan image with more then the amount of visible colours for that file format. Since you're rendering images to a screen or a file, unless the file format has explicit support for colours outside of the visible spectrum (making it impossible to preview on your computer anyways, unless you did some colour shifting), you can't save the data.

I'm especially interested in ultraviolet and infrared but support for the full frequency spectrum would be nice, too.

How would you make a file format which supports "the full frequency spectrum"? There an infinite range of photon wavelengths, so this is also impossible.

However, if you did want to simulate UV/infrared light from various point-sources, you could simply shift the colours of all sources in the scene to compensate for it. You could also trivially modify the ray tracing algorithm's wavelength property, but render the rays with a different base colour.

Given the fact that UV/IR photons lie outside the visible spectrum, you might want to consider photon mapping, which may provide a more accurate result.