Start a new topic

atlas generator

Original Post by: gmendieta Wed Apr 16 16:50:28 2014

Hi all!! As i wrote recently inside another post, i have been working on an automatic atlas generator with presagis creator. Id like u all to watch the little video and please give some feedback. its a work in progress, cause it is a prototype written in python, but its totally functional.

thank you.

Original Post by: Lars Wed Apr 16 17:59:38 2014

This is AWESOME!! Feed back in a bit

Original Post by: SteveThompson Wed Apr 16 18:42:50 2014

Thanks for sharing that. Very nicely done.

Would you mind explaining a bit more on how you put it together? Specifically could you describe how you are using the OpenFlight API? Are you using the C interface in code or are you using OpenFlight Script?

Again, this is really well done!


Original Post by: gmendieta Wed Apr 16 18:53:58 2014

Hi Steve. At the moment the whole program has been done using python 2.5 and Openflight script. The only chunk of code in C is a little program that let me convert tif images to rgb images cause using Python Image Library i am not allowed to write this kind of image format.

I am using Openflight script to traverse all the databases and build internal structures with all the required info. The basics is that i get all the polygons mappings and the textures linked to them.

Next database access is to reload, or read images and set uv coordinates.

The hard part of the program is to calculate regions in a good way, the algorithm to pack the images and calculate new coordinates based on the possible crop and the offsets inside atlas.

I am thinking seriosly about write it again in c++ and Qt.

Glad to read that you like it

Original Post by: Lars Wed Apr 16 19:08:10 2014

Again, very nice. Can you define the atlas texture size? I take it that your atlas is not lossy, and that you are keeping the resolution of the original.

Is it possible to

* letting the user choose the atlas size, i.e.: 1024 x 1024, 2048 x 2048 etc resulting in as many atlas textures as need at 1 to 1 resolution.

* letting the user choose the atlas size, i.e.: 1024 x 1024, 2048 x 2048, etc AND a max number of atlas texures. This would mean that the tool has to down (or up) sample to meet texture atlas size and number of atlas texturers. For example he target is to only have 2 atlas textures at 4k and the tool downsamples the textures to meet that goal. Now the end result might be unusable if there are too many textures, in this case caveat emptor !

Lastly but important for our other users looking and possibly drooling ;-). Will/Can you share the final version? I understand if this is for your project only, but thought I would ask.

Original Post by: gmendieta Wed Apr 16 20:06:00 2014

Hi again Lars:

Currently the options available are:

1.- Specify the size of the atlas

2.- Separate textures with alpha channel in another atlases.

3.- Specify a percentage of the texture usage to decide if crop or not.

i appreciate the idea of select the number of atlases and downsample if necessary. Maybe with some options. I mean, downsample the ones with the bigest area, or the ones with more variance of color in their pixels. Really good idea.

I am not allowed to share this code, the python one i mean. if i rewrite it in C++ in my free time for sure i will. Anyway, i would program anything as a freelance, hahaha. Seriously, if definitively i convert it to C++ code, i will share as GPL or another open source license.


Original Post by: SteveThompson Wed Apr 16 22:16:48 2014

Thanks for the extra info!

Login to post a comment