XTDStudios / DMT

Dynamically Mapping Textures
101 stars 13 forks source link

Atlas Generator by display list order #2

Open neelts opened 11 years ago

neelts commented 11 years ago

So without ordering atlases generated randomly and then switching between atlases cause many unwanted drawcalls. Is it possible to generate atlases by display list order? So if one atlas is not enough for one set generator puts only topmost objects to the next.

gilamran commented 11 years ago

Can you please give a deeper example of your problem and the suggest solution?

neelts commented 11 years ago

order

I think we need to change RectanglePacker somehow, so it fills atlases by display tree depth

neelts commented 11 years ago

Sorry, 2 drawcalls in "After"

gilamran commented 11 years ago

This is not so easy to implement, because we can't know for sure what art will fit where... We can try to do groups that must (If can) be on the same texture atlas, these groups will be all the same Display-Tree children.

Putting that into your example: 1,2,3 will be on the same group/atlas (If they fit)

I'll think about it.

neelts commented 11 years ago

Thank you! Love your framework, it saves so much time.