Page 1 of 1

[HGE] Questions about creation of texture atlas

PostPosted: Fri Mar 05, 2010 9:37 am
by sonictk
Hello. I have a few questions to ask about Magic Particles' HGE wrapper. Currently, when we run our build, all the required textures for particle effects are loaded into one texture atlas. I would like to know if:

- It is possible to create multiple texture atlases for different groups of particle effects. (E.g. I want to create separate atlases for environmental effects and spell effects)

- If there is a limit on the size of texture atlases that can be created.

Thanks very much! :D

Re: [HGE] Questions about creation of texture atlas

PostPosted: Fri Mar 05, 2010 2:59 pm
by Odin_KG
Hi

- It is possible to create multiple texture atlases for different groups of particle effects. (E.g. I want to create separate atlases for environmental effects and spell effects)

The atlases are created from all loaded emitters only. If you want you can load the textures yourself (read about MAGIC_TEXTURE in API.chm). I hope new version of API will be have functions to manage the textures more flexibly.

If there is a limit on the size of texture atlases that can be created.

Size is not limited. But video-adapter can't use very big textures. Size is 1024x1024 for casual game usually.

Re: [HGE] Questions about creation of texture atlas

PostPosted: Thu Mar 11, 2010 8:15 am
by sonictk
Thank you for the response! I am currently still trying to figure out how exactly our current atlases are created and how we can avoid having to separate the textures from the ptc files or worse, manually create our own atlases. Hopefully we will be able to find a workaround this issue.

Re: [HGE] Questions about creation of texture atlas

PostPosted: Thu Mar 11, 2010 2:46 pm
by Odin_KG
I am currently still trying to figure out how exactly our current atlases are created and how we can avoid having to separate the textures from the ptc files or worse, manually create our own atlases.

I do not understand. Why do you want to create own atlases? If you make casual game (for example "Hidden object") then you can delete the object MP_Manager and create the object MP_Manager again, when game level is changed. You can load any ptc-files in MP_Manager selectively. It is very easy way.

Thank you for the response

You are welcome!

Re: [HGE] Questions about creation of texture atlas

PostPosted: Fri Mar 12, 2010 6:09 am
by sonictk
We would like to separate the atlases for different classes of particle effects, as we are using a lot (over 150+) of unique effects at a time and we may not be able to fit all required textures into one texture atlas. We also hope to avoid having to use scale_step to scale all textures down to have them to fit inside one atlas, as certain effects are very dependent on the size of the sprites we use.

Re: [HGE] Questions about creation of texture atlas

PostPosted: Fri Mar 12, 2010 6:29 am
by Odin_KG
we may not be able to fit all required textures into one texture atlas.

It creates not one atlas. One emitter is put in one atlas.

You can:
1) Create atlases with help API in advance.
2) Save atlases in graphic files with help HGE in advance.
3) Use the saved graphic files as ready atlases in game.