Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack DT1 tiles more efficiently #81

Open
mofr opened this issue Nov 23, 2019 · 4 comments
Open

Pack DT1 tiles more efficiently #81

mofr opened this issue Nov 23, 2019 · 4 comments

Comments

@mofr
Copy link
Owner

mofr commented Nov 23, 2019

Current layout (cave.dt1 for example):
cave dt1 0

@giviz
Copy link

giviz commented Jan 19, 2020

This is what texture packer would do using the polygon algorithm
Screenshot 2020-01-19 at 10 20 34 AM
Screenshot 2020-01-19 at 10 20 43 AM

This is compatible with unity as they have a plugin for it.

Final png is 1976x900 and will use 6946kb of RAM.

@mofr
Copy link
Owner Author

mofr commented Jan 19, 2020

@giviz Is texture packer designed to work in run-time? Are you talking about this tool?https://www.codeandweb.com/texturepacker/for-unity

@giviz
Copy link

giviz commented Jan 19, 2020

I am talking about that one yes, it has a plugin for unity to load that kind of packing.
Now the thing is, with that many textures it's kind of an issues and very slow (because of how the plugin itself work).

So far I'm using the tool to pack the tiles (there is a command line version of texture packer, so it's all scripted) and I'm not using their plugin to load the textures inside unity, but a modified version of your code with updated offsets to position the meshes of the tiles, which work fine.

But as of now, I'm just using the trimmed algo which output that texture
22

As they have a plugin for unity that allow to load the polygon output, I plan to look into it later on to switch my implementation to that algo as it seems better.

@giviz
Copy link

giviz commented Jan 19, 2020

Here is a trimmed version of an other tiles, that's a better improvement on non floor tiles :

55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants