[HGE] Questions about creation of texture atlas

All information about Magic Particles: news, question, comments, etc.

[HGE] Questions about creation of texture atlas

Postby sonictk » Fri Mar 05, 2010 9:37 am

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
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Questions about creation of texture atlas

Postby Odin_KG » Fri Mar 05, 2010 2:59 pm

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.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE] Questions about creation of texture atlas

Postby sonictk » Thu Mar 11, 2010 8:15 am

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.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Questions about creation of texture atlas

Postby Odin_KG » Thu Mar 11, 2010 2:46 pm

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!
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE] Questions about creation of texture atlas

Postby sonictk » Fri Mar 12, 2010 6:09 am

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.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Questions about creation of texture atlas

Postby Odin_KG » Fri Mar 12, 2010 6:29 am

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.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm


Return to Magic Particles

Who is online

Users browsing this forum: No registered users and 10 guests

cron