Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sprytile

A Blender add-on for building tile based low-poly scenes with paint/map editor like tools · By Jeiel Aranal

Blender 2.80

A topic by kitsune.ONE team created Mar 09, 2019 Views: 14,978 Replies: 64
Viewing posts 1 to 31
(+7)

Hello.

I'm working on the update for Blender 2.80. You can track my progress here - https://github.com/Yonnji/Sprytile

What I was managed to get work:
+ Addon load/unload
+ Loading and creating a new tileset (I'm using cycles nodes to store the textures for now on)
+ Grid list management

So everything else doesn't work including paint and build tools. I don't know how long it takes to finish it because I don't have an experience in Blender Addons. Any help with that would be appreciated.

(+1)

This is great! I wish I knew more about Blender Addon dev, but I can't wait to see this fully ported!

There is a great introduction course (partly free, partly with Blender cloud subscription) called scripting for artists. I created a dozen of add-ons (2 published) after doing this. https://cloud.blender.org/training/scripting-for-artists/

Thanks  a lot for your work, Yonnji!

Hey Yonnji,

I am also new to Blender Addons, but I am familiar with Python. Is there anything in particular that you would like help with? Your fork doesn't have an issues page, so I thought I'd try you here. 

Best,

Todd

Yes. You can try it too. I'm stuck at the paint/build tools. They doesn't works and tileset widget doesn't come ups. It's complicated because I don't getting any errors.

(+3)

I am also working on porting sprytile to 2.8 when I have time here: https://github.com/ologon/Sprytile/tree/feature/support_2.8

I think I will eventually be able to have it fully working, but it will take a bit of time, please be patient :) The viewport drawing code in particular will need a heavy rewrite, because support was dropped for the calls sprytile currently uses.

I made a few updates. Now I've got into the state where I press the build/paint button and the Blender crashes with an error: module 'gpu' has no attribute 'offscreen'

The viewport drawing code in particular will need a heavy rewrite, because support was dropped for the calls sprytile currently uses.
Do you mean those calls to glBegin(), glEnd() and everything else gl-related? I've seen a lot of them. So they aren't work anymore?

Yes they don’t work anymore because blender has shifted from opengl 2 to 3 and they need to be either rewritten in  gl3 or with the gpu module which is built on top of it. The documentation suggests using the latter if possible because it claims it will remain compatible when blender will shift again to vulkan.

(+8)

I've made some progress and now all tools work (The ui drawing is not ported yet, so tiles cannot be selected). However in 2.8 these kind of tools are supposed to be in the new toolbar (solving conflict issues with other blender UI) which will require a bit additional work :)


Is it possible to install your addon?  I tried downloading the zip file and installing it on blender 2.8 but I couldn't get it to install.  Any help would be greatly appreciated.  With the update to unity 2019, I had to update blender to 2.8 to get my models to import properly.    Thank you so much for all the work you're doing on this and any help getting it install would be greatly appreciated.

(+1)

Yes, go to the link I've posted above (https://github.com/ologon/Sprytile/tree/feature/support_2.8) and download the zip file from "clone or download", then install it from the usual Preferences -> Addon window (Be sure to use the latest version of blender 2.8 beta, it was updated today). Search for "sprytile" in the same window and activate it.

The sprytile tools have been moved to the new toolbar on the left (they popup in edit mode as usual). Keep in mind that the plugin is still unfinished and it is not very usable yet (tiles cannot be selected).

(2 edits)

Thank you so much for getting back to me.  I downloaded blender 2.8 beta yesterday, downloaded the zip, and attempted to install it through the addons.  I tried again today (downloaded a fresh version of 2.8 on my mac, yesterday I tried this on my windows machine), downloaded your add on, installed from blender.   I see at the bottom it says that it was installed.  Neither of us were able to get it to display in the addons list.

Sorry, I've got what went wrong. Once you download the repository first unzip it, rename the unzipped folder to "sprytile" and zip it again. (On windows, if you double click on the new zip you should see the "sprytile" folder, and the python scripts should be inside it). Then try installing that zip. I've tested it on a fresh install and it worked :)

OMG! This is awesome. Thank you so much for porting this to 2.8+  :D

Excited to see this. I am using Blender 2.8 a bit more so having tools like Sprytile available would be awesome.

Do either of you guys need any help? I don't have any experience with blender plug ins but if there's a need I can learn. This is def my go to tool for this stuff so I would love to contribute,

(+1)

Anyone is free to contribute by forking the github repository : ) I'm not too far from having it fully ported, I'm now working on the viewport drawing part. Once that's done, I will have to do just a few adjustments here and there. Haven't encountered a show-stopping problem so far, but the port is proceeding slowly due to a limited free time. (And blender documentation is almost non-existent, especially for the 2.8 api, which further slows down the process)

Awesome! If you run into anything let me know. I'm looking forward to it thanks for all the hard work!

Hey! How goes the development process? Is there a devlog or something you post too? I've seen the git page get updated every once in a while. Thanks for taking the effort to do this!

(+5)

I just update the git page whenever I do some progress :) Still working on it when I find some time.

Looking forward to this!

Hey guys,

I installed on 2.8.0 (current stable, not beta anymore), after renaming-zipping the folder but I don't get the 3 icons (Fill, Paint, Build) in the toolbar, it starts at "Flip"

You can find it in the default edit mode toolbar at left side

(1 edit)

In 2.80.75, Edit mode, I don't get the 3 icons (Fill, Paint, Build) in the toolbar, it starts at "Flip"

Console throws multiple times:

File "C:\Users\nobody\Documents\blender-2.80\2.80\scripts\startup\bl_ui\space_userpref.py", line 1900, in draw
    draw(context)
  File "C:\Users\nobody\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\Sprytile\__init__.py", line 790, in draw

box.label("Keyboard Shortcuts")
TypeError: UILayout.label(): required parameter "text" to be a keyword argument!

Hello! Is there progress on the 2.8 port of Sprytile?

I tried ologon's version, but as he said, the UI isn't there yet, so it's not really usable. An it crashed blender 2.8 two times. 

(5 edits) (+16)

Good news! I've finished porting all features to blender 2.8, except decal layers, and since it has become usable now, I've uploaded a beta release here:

https://github.com/ologon/Sprytile/releases

To install the beta, grab the zip file from that page and install it from the preferences -> addons panel as usual.

Here's what changed in the blender 2.8 version:


The sprytile panel is now located in the new panel section, which is hidden by default.
To show it click on the small arrow in the top left corner of the 3D view:

Then select "Sprytile"

Blender 2.8 default viewport settings are not optimal for pixel art, specifically you may notice texture jittering when moving the camera. (This is caused by eevee's temporal anti-aliasing filter) Moreover, blender viewport employs filmic color correction by default, which will cause your unlit tiles to appear slightly brighter than the original image. To fix this issues, select the newly added "Sprytile Utilities" -> "Setup Pixel Viewport". I recommend doing this once before starting to work with sprytile.

Sprytile tools are now located in the toolbar on the right. They will show up once you enter edit mode:

You can use the snap tool by holding "S" while the build tool is active as usual, and the tile picker by holding left Alt while any sprytile tool is active.

The normal tool is not a separate icon , instead it can now be used by holding "N" while the build tool is active.

Everything  else is pretty much the same as it was in 2.7.


The beta hasn't been tested throughly, so crashes/errors may occur while using it. Let me know if you encounter any problem, and be sure to save often just in case :)

(+2)

You're the bomb! Been waiting for a 2.8 compatible release for awhile now, so stoked to give it a try. Thanks a bunch!

YAY!

First thank you very much for porting this to blender 2.8
Next, I tried to use but it crashs so quickly and randomly I can't tell you what is going wrong :/
Do you have a version with some try/catch everywhere writing the errors into a file or at least in the console ?
Or tell me how can I help you to make this version more stable, I would like to help.

Hi LuDK,

Thanks! I've been using it for a while and it appears to work just fine in my case. Are you using the latest beta? (Beta6)

If you are already using the latest beta, open the windows command prompt and start blender from there (by typing for example "C:\Program Files\Blender Foundation\Blender\blender.exe" then enter) . When sprytile/blender crashes the error causing the crash should remain in the command prompt. Can you tell me what you are getting? (Also knowing when it happens would be helpful)

Ok I'm doing that since this morning.
I updated blender to the official release 2.81 too... and... no crash currently.
I let you know if anything happens ;)

Ok I got a crash:

"Error: Not freed memory blocks: 5, total unfreed memory 0.001434 MB

Blender quit"

Wow crashed again when I tried to Ctrl + Z:

"Traceback (most recent call last):

  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Traceback (most recent call last):
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 513, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_offscreen(context)
  File "C:\Users\eques\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\sprytile\sprytile_gui.py", line 573, in draw_offscreen
    target_img.gl_load()
ReferenceError: StructRNA of type Image has been removed
Error   : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF6C7C1101D
Module  : C:\Program Files\Blender Foundation\Blender 2.81\blender.exe"

Thanks! I’ll look into it and see if I can reproduce it :)

(+1)

I was able to reproduce the above crashes and I've released a beta7 with a fix.

Let me know if you encounter other issues! :)

Thanks, I updated I let you know ;)

Uh THANK YOU!!!!

I messed around with sprytile in the past but when 2.8 got here I was so sad to see it was incompatable. Now that it's back, I'm looking forward to learning it again!

Hell yeah!

Hi :)

How can I remove a tileset ?

Thank you !!!

And sometimes the view of the tileset to pick a tile is just missing, is there any way to force to display ?
(I have to close and reopen blender to fix it).

Thank you ;)

(2 edits)

Hi LuDK!

As in 2.7, to delete a tileset you have to first delete its material. Find the tileset material in the material panel and press the  "X" button while holding shift, then save your blend file and reopen it:


Blender will delete the material and it should show up as "Invalid Data" in the tileset list.  Sprytile will eventually delete it for you when you add new tilesets, but to delete it right away click on the down arrow icon and choose "Validate Grids":


Regarding the view not showing, it usually means you are working on an object which currently has a different tileset than the one selected.

Hope that helps! :)

Thanks !!!

Deleted 4 years ago
(+1)

All seems good, no more crash, nice job !!!

If you want to have a look: https://www.artstation.com/artwork/Pm0e4L

(+1)

Glad to hear that! Thanks for reporting that issue. And the sprytile works look cool! :)

Thanks :)

(1 edit)

Made a couple changes to Ologon's 2.8 port of Sprytile.  Was experiencing some issues with holding 'S' and 'N' while using my laptop and trackpad.  The shortcut for snapping the cursor is "Left Alt + left click", and the shortcut for selecting an off-axis work plane is "ctrl+alt left click."

Also rebound tile rotation and flipping to 1,2,3,4

https://www.dropbox.com/s/29ksood4d1q2qz9/sprytile%20laptop%20edition.zip?dl=0

You can also remove the whitening effect when in edit mode, but going under the Preferences > Themes > 3D View > Face, and change the second color alpha to 0

How did you rebound the rotation shortcut? I'm searching a guide for Ologon's shortcuts but can't find any source for it, and since i'm using blender in a desktop, don't need to download your version. 

Has anyone tried this on version 2.81 of blender? I get a few errors every time  I try to  load a tileset.

Traceback (most recent call last):

  File "C:\Users\Rustocrat\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Sprytile-master\sprytile_utils.py", line 878, in execute
    UTIL_OP_SprytileLoadTileset.load_tileset_file(context, self.filepath)
  File "C:\Users\Rustocrat\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Sprytile-master\sprytile_utils.py", line 896, in load_tileset_file
    bpy.ops.sprytile.texture_setup('INVOKE_DEFAULT')
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 199, in __call__
    ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\Rustocrat\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Sprytile-master\sprytile_utils.py", line 932, in invoke
    self.setup_tex(context)
  File "C:\Users\Rustocrat\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Sprytile-master\sprytile_utils.py", line 973, in setup_tex
    target_img.use_alpha = True
AttributeError: 'Image' object has no attribute 'use_alpha'

location: C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py:199

location: <unknown location>:-1

(1 edit)

The 2.8 port is compatible with the latest blender version (2.81a).

Judging from the error log, it looks like you are using a different version from the latest beta. Uninstall any old sprytile from the plugins menu (make also sure there's no sprytile folder left in C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons) and try installing the latest zip from this page: https://github.com/ologon/Sprytile/releases ( currently sprytile_2.8_beta8.zip)

(+1)

Thank you so much! Looks like everything is working fine now. 

(+2)

I've been asked this quite a bit so I thought I would leave a little guide here:

Sprytile displays all the tilesets you currently have added, even those the object you are working on doesn't have a material for. If that is the case, the tile selection UI will not show up (In 2.7 it would just show a blank image). To bring it back you can either:

1) Add the tileset again to the selected object with "Add Tileset" as usual (This will create a duplicate)

2) To reuse the existing tileset, go to the material panel with your object selected, add a new material and set it to the tileset you are trying to use:

(Here for example I'm adding terrain_tileset to the object)

When you reselect the tileset, the tile selection UI will show up.

Thanks for all the hard work @ologon! I've not used your version extensively yet but its done the job for me so far!

I'm going to rip my fucking hair out. I just want to create awesome shit with this add-on but nothing I do is working. I too am getting the "Traceback" issue.

I don't know if you are looking to add new features yet, but, it would be neat if fill mode had an option to select multiple tiles and filling them in will randomly place them in the selected area, to quickly make litter variant tiles of grass/walls in the area

For those having problems. It looks like the last error message means you are on 2.82. Just go download blender 2.80 (like the heading says!) and this release works fine. You don't need 2.82 now if your workflow is only this. Chill and let the team work on maintaining this plugin through the updates.

Download 2.80 from blender's archive here: https://download.blender.org/release/Blender2.80/

Install per the instructions at the beginning of this thread.

Works just fine! 

I've tried using the latest blender version (2.82a) but did not encounter any issue. Make sure you are using the latest version of the plugin (currently:  https://github.com/ologon/Sprytile/releases/download/2.8-beta9/sprytile_2.8_beta...)

Any speculated date for Decals support? And thanks for the hard work, right now I can't imagine my project without it.

(+2)

Unfortunately I don't have an estimate atm due to lack of time :/

Decal support would be great!

i'm having the same error as DumpsterCat, i've yet to see what's good about 2.8 because it has been nothing but headaches for me.

Hi, thank You for SpryTile!
I had a problem with the tileset view not showing. I didn't give up and developed a working solution:

(1 edit) (+2)

Tileset not showing is fixed in beta11. No workaround is needed now :)

Thank you ologon for your hard work. I was sent here from another forum because people was linking your hard work. 

I really wanna try this out in Blender. What blender version should I use, and what version of the plugin should I use? Thank you

Hey there quick question, I was wondering if you can still use the scroll wheel to interact with the snap tool like in the older versions. I just tested it out myself and it doesn't seem to work. I'm not sure if theres maybe a new hotkey for moving the snap tool using the scroll wheel like in older versions.