Open programnoir opened 1 month ago
Thanks for the feature request. I have made this plugin to just have an autotile implementation of TileMap node. I am still missing some extra features but I don't know how to do them yet. With that in mind, let's continue with your feature requests:
I made bitmasks the way it came to my mind. I am sorry for this, it will make things a little hard. I am struggling to remember the bit order but you are right, it goes sort of spiral. Actually, bit value calculated by children order of the "AutoGrid_Bitmask" node. If you check "bitmask_holder.gd" script, calculate_bit_value()
function, you can see top most child is the right most bit. Autotile algorithm is the same as TileMap node's autotile algorithm, I just extended it for 3D.
I will be grateful for collaborations, it will make things easier and faster.
In new version (v1.3) I have added quick setup feature. You just need to select MeshInstance nodes then AutoGrid/Create Bitmask to create bitmasks for each selected MeshInstance, same goes for removing.
I implemented automatically reloading autotile info with scene changes but then removed it because it reloads everytime, this can cause some trouble if you are switching scenes and didn't save autotile info, all your painted bitmasks will revert itself.
I will be waiting for your feedback on new version, if there won't any response in a month, I will consider this done and close the issue.
I think it'd be really handy if there was a fast way to set up an imported tilegrid that created and then set bitmasks for you. Lemme show you what I mean.
Here you can see I've added a button to the AutoGrid panel called "Quick Setup". All it does is iterate through children and add bitmasks.
There are a few additional features that I think would be good for this tool.
The only reason that I didn't move forward with implementing feature 2 myself is because apparently you represent bitmasks differently from how I learned on the web. A resource I found online taught me about starting from the top left corner (0x01) and proceeding left-to-right, row-by-row, until I arrive at the bottom-right corner (0x80). Your bitmasks sort of "spiral" upward, instead, it seems? If I'm understanding that right, I'd love to learn more about how it works!
By the way, are you interested in including collaborators on this plugin? If you prefer I stick with a fork, I can certainly do that, instead.