Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Automatic texture atlas generation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 jsg007   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 February 2008 - 01:56 AM

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?

Sponsor:

#2 MassacrerAL   Members   -  Reputation: 121

Like
0Likes
Like

Posted 05 February 2008 - 06:09 AM

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.

#3 jsg007   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 February 2008 - 08:45 AM

yeah, it's something like a big lightmap texture, but how do I generate the texture coordinates?

#4 Neverender   Members   -  Reputation: 140

Like
0Likes
Like

Posted 05 February 2008 - 06:00 PM

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.

#5 Gage64   Members   -  Reputation: 1227

Like
0Likes
Like

Posted 05 February 2008 - 08:40 PM

You might find this article helpful.

#6 sebastiansylvan   Members   -  Reputation: 166

Like
0Likes
Like

Posted 06 February 2008 - 11:12 AM

DirectX comes with a texture atlas tool (and an API for calling it from your code).

#7 Niwak   Members   -  Reputation: 208

Like
0Likes
Like

Posted 06 February 2008 - 10:32 PM

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.

#8 jsg007   Members   -  Reputation: 100

Like
0Likes
Like

Posted 07 February 2008 - 12:24 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS