Jump to content
  • Advertisement
Sign in to follow this  
jsg007

Automatic texture atlas generation

This topic is 3842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone! What I am planning to do is to create a scene in a model editor, (some closed room, for example) then take that scene and paint the surfaces with a virtual brush in my program. So I'm looking for a technique wich would tranform all the textures in that scene into one big texture, so every texel in the scene would be unique ... (as far I know this is called "automatic texture atlas generation") Can anybody point me to some articles (or source code!) wich deal with this problem?

Share this post


Link to post
Share on other sites
Advertisement
it looks similar to lightmapping. maybe if you searched how are texture coordinates changed or whatever when placing lightmap.

also you could use very small resolution of this painting map, as in texture splatting(or lightmapping). texture filtering will hide jagges.

Share this post


Link to post
Share on other sites
I've come across one thing you might want to take a look at. I can't speak to the efficiency of the code or anything, but you could check out the lightmap packing code from Paul Nettle's FSRad (here).

Click on "Code," and it should be the first page that comes up. Click the image to download the source code. Alternatively, here's a direct link to the code: http://www.paulnettle.com/pub/FluidStudios/Radiosity/FSRad-004.zip

I also remember seeing this article while looking for something the other day; maybe worth investigating, but I haven't looked too closely.

Share this post


Link to post
Share on other sites
Here is a very simple solution :
- in your model program, join all objects of the scene into a single mesh
- then use the UV unwrap feature of your model program
- then export the unwrapped map to your favorite paint program

This is what I use with Blender + Gimp for most of my models.

I use texture atlas for a quite different thing ; I first create my model/scene and texture them (see above), then I have a preprocess tool in my engine that based on the scene definition (models used for character, walls,...) and a max texture size will generate a texture atlas and update the uv of the incoming models. Since I only pack square texture, it is fairly simple.

Share this post


Link to post
Share on other sites
Thanks for your responses!

The difficulty in my program is that I have triangles rather than polygons, so it is harder to pack triangles in the texture map than rectangles. But, I'm thinking on a solution by making pairs of neighboring triangles wich can roughly estimate a rectangle and packing them as rectangles.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!