Archived

This topic is now archived and is closed to further replies.

amish1234

making a lightmap generator

Recommended Posts

I want to make a program where you can take any collection of triangles (for me it will be world vertices for my game), place lights wherever you want and then have the program generate a lightmap and texture coordinates for each vertex. I was wondering if it might be possible to just use D3D lights and get the lighting data for each triangle. Unlikely, right? If I could do that, then I''d just have to assign texture coordinates to the vertices and write a bitmap. I probably won''t be able to "hack" into D3D''s data and get the lighting values for each triangle. What''s the easiest lighting algorithm I could use? While it would be nice to learn radiosity, I can''t increase the size or development time of this project too much.

Share this post


Link to post
Share on other sites
It just happens that the SDK has info on all the formulas d3d uses for lighting. They are pretty simple.

Since you want a pre-calculated lighting system, i suggest reading a little about radiosity, too. It makes the solutions infinitely better-looking...

See "Lights and materials" topic and it's subtopics in sdk to get the info on basic lighting.

-Nik

EDIT: typo

[edited by - Nik02 on October 17, 2003 6:22:23 AM]

Share this post


Link to post
Share on other sites