Baking texture maps

How should I go about using radiance to create baked texture maps? I've
seen a few posts to the mailing list about this, but I haven't found a
reply that solves the problem.

The problem:
I want to create a simple walkthru of a room using a games engine. I've
already created the model in Lightwave and exported it to radiance (let
me know if anyone is interested in the exporter). From there I want to
use radiance to render separate images for each of the polygons in the
model, and then map those images back onto the polygons. From there it
is a simple process to export the textured model to the game engine.

My approach so far:
I've attempted to use examples of computing illumination across a grid
to crack this one. This boils down to walking over the polygon surface
and using rtrace to find the value at various points, spaced at some
regular interval. This is easy for extremely simple polygons (read
horizontal or vertical quads) but becomes a tad more complex for concave
n-sided polygons.

My questions:
Doesn't rad already do most of what I need as part of the standard
rendering process? Has someone already attempted / solved this problem?
If not, could someone point me to some src documentation so that I can
leverage the existing code libraries to roll my own solution in C?

As a starting point, I'm sure there must be some code for subdividing a
polygon into smaller patches - this would do most of what I want. Any

Many thanks,


Michael Kruger

[email protected]

Hi Mike,

The only reference I know about texture baking with Radiance
is here:

The idea is to set up an ortographic view for each polygon.

I do something similar with blender, not fully automatic yet,
but usually my models are only made of triangles and a few quads ...

Maybe you can have a look at the glu tessellation functions
(like checking the MESA source code).

I've also put together a doxygen documentation of the radiance source
tree, that you can download from here:

This really helps me a lot when I'm looking for something
inside the radiance source tree, together with grep ...

Hope this helps ...



Francesco Anselmo <[email protected]>