1
\$\begingroup\$

I'm trying to build lightmaps for an engine I'm working on. I'm using DirectX 9 w/c++ but my questions are related to the methodology behing the generation of light maps.

I have a scene built from collections of mesh objects. The scene is divided into an octree. I want to generate a light map for each of the octree nodes or possibly 1 light map for a subdivision( 8 nodes ).

I've read the tutorial on flipcode.com( here ). For the explanation on "calculating/retrieving light map texture coordinates the tutorial refers the reader to a broken link.

I'd appreciate a list of instructions on 'what' to do in order to complete this process...I've found bits and pieces from different sites that have different implementations and its hard to piece it together. How do I assign a polygon to a specific area of the light map?

\$\endgroup\$
3
  • \$\begingroup\$ Just a quick question - are you certain that this is DirectX specific? As far as I can tell, this seems to be more of a general process. Finally (although it seems to be too late as you are quite far into your engine), I'd recommend OpenGL as it works on stuff other than Windows. \$\endgroup\$
    – Polar
    Aug 12 '13 at 21:03
  • \$\begingroup\$ no it is not DirectX specific...although the answer below, concerning the DirectX UVAtlas tool is very useful as it corresponds to the platform I'm using... \$\endgroup\$
    – P. Avery
    Aug 13 '13 at 2:45
  • \$\begingroup\$ I was just thinking that, as this site is meant as a resource for people to use in the future, making stuff more general would be a good idea. \$\endgroup\$
    – Polar
    Aug 13 '13 at 9:00
0
\$\begingroup\$

You could try using Microsoft's UVAtlas tool, which is built into D3DX, so you already have it available. I've never tried it myself, but I've heard from others that it works pretty well.

\$\endgroup\$
2
  • \$\begingroup\$ actually that answers the question...thanks! I can use D3DXUVAtlasCreate() to create a new set of UV coordinates, I will need the original set for the diffuse uvs and the new set as lightmap uvs. \$\endgroup\$
    – P. Avery
    Aug 13 '13 at 3:53
  • \$\begingroup\$ Note that the latest version of UVAtlas is available on CodePlex. \$\endgroup\$ Nov 25 '14 at 1:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .