Author Topic: Flexible Atlas. Add, Remove Textures to Atlas on the Fly  (Read 3744 times)

matix

  • Guest
Flexible Atlas. Add, Remove Textures to Atlas on the Fly
« on: April 16, 2012, 09:04:47 AM »
We wonna remake the hud with nGui.

We have a lot of difrent Vehicles, Skins and Weapon icons. but in a Match u can play only 1.

http://gyazo.com/2da0d1d8309792425416189086aca80f

is This posible to Add and Remove Textures to/from Atlas on the Fly?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flexible Atlas. Add, Remove Textures to Atlas on the Fly
« Reply #1 on: April 16, 2012, 09:47:43 AM »
Currently there is no support for atlas modification on the fly, but you could technically do that by creating an atlas that's using a render texture, or a texture you create yourself by writing pixels. The trick is, as you write a new sprite to the texture used by the atlas, you also should add a new sprite entry to the atlas.

matix

  • Guest
Re: Flexible Atlas. Add, Remove Textures to Atlas on the Fly
« Reply #2 on: April 20, 2012, 08:11:33 AM »
are you planning on implementing this feature in the near future ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flexible Atlas. Add, Remove Textures to Atlas on the Fly
« Reply #3 on: April 20, 2012, 08:49:32 AM »
Not at this time. This code is on the editor side in order to reduce final build size and make sure that it works on all platforms. As I mentioned, you can create your own custom atlas by using render texture or writing pixels yourself. Atlas maker is an editor-only tool, however.