Coder Social home page Coder Social logo

sprytile's Introduction

Sprytile Painter

A addon for creating tile based low spec 3D scenes. (Unofficial port for blender 2.8)


Features

  • Tile building: Build your mesh directly with tiles, skip tedious UV mapping while quickly rotating and flipping tiles.
  • UV painting: Create your mesh with other Blender tools, then quickly UV map them to your tiles. Spend less time in the UV editor.
  • Pixel grid tools: Keep your mesh aligned to the grid with pixel translation, move vertices around with confidence.

Demo:

Timelapse

Download:

Download from releases.

Getting Started:

Community:

  • Chat with the fellow users in the Discord server
  • Showcase your work or ask for support in the forum

Issue/Feature requests:

Bug reports for this port can be submitted to GitHub issues

Acknowledgments:

The bulk of Blender 2.8 porting work by was done by Yonnji and ologon, with additional contributions by brandy92

sprytile's People

Contributors

belohlavek avatar brandy92 avatar cg-cnu avatar chemikhazi avatar hikari-no-yume avatar jeiel-bunnyhug avatar kame7c0 avatar ologon avatar yonnji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sprytile's Issues

Material setup wizard

Have a dialog that the user presses, which prompts the user select to select the tileset image. Automatically sets up the material and takes care of assigning the texture and settings it up.

Paint mode off indication

Would it be possible to add some indication for when no paint mode is active.
Either an "off" button or have all paint mode buttons toggled to off.
It's rather unintuitive to switch into edit mode and see the build button highlighted but not be in build mode.

Error when trying to save while tile paint mode is open.

Traceback (most recent call last):
File "C:\Users\Jeiel\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons_contrib\sprytile\sprytile_modal.py", line 926, in modal
view_axis = self.find_view_axis(context)
File "C:\Users\Jeiel\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons_contrib\sprytile\sprytile_modal.py", line 417, in find_view_axis
view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
File "C:\Installers\Blender277\2.77\scripts\modules\bpy_extras\view3d_utils.py", line 46, in region_2d_to_vector_3d
viewinv = rv3d.view_matrix.inverted()
AttributeError: 'NoneType' object has no attribute 'view_matrix'

Flood Fill

Use the work axis plane indicator as a cursor to bound the flood fill area.

Painting mode enhancements

Painting mode needs improvements for handling non unit grid faces.

Up/right averaging

Right now, up/right vectors of faces are determined by the edge closest to the up/right vectors of view. A better way might be to collect edges with vectors that are close to the up/right view vectors and average them to determine up/right vector for UV mapping.

Tile alignment

Have a way so face UVs can be aligned to the edges of the tile, useful for when face is smaller than the tile.

Snap to horizontal/vertical edge

Force UV verts to snap to edges for tiling purposes. Probably will introduce UV distortions but that's fine.

Selecting Paint or Build causes nearest-neighbour upscaling in the viewport as an apparent side-effect

When you use Sprytile's Paint or Build mode on an object in Blender's Edit mode, it changes the affected object's texture to use nearest-neighbour as a side-effect. I believe this is because when Sprytile makes the OpenGL call to change the texture's magnification filter in order to draw the tilemap, that texture is shared by the object shown in the Blender viewport.

This caused me a lot of confusion, because I didn't realise the crisp scaling I was seeing was an (accidental?) consequence of entering Sprytile's Paint/Build mode. I assumed Setup Pixel Texture had done that. So, when I restarted Blender later and reopened the same file, I couldn't figure out why it had blurry smooth texture upscaling again.

Of course, I wanted crisp nearest-neighbour texture upscaling, I just didn't realise I'd gotten it by accident. This wouldn't have affected me if I'd changed my User Preferences and disabled the “Mipmaps” option already.

I'm not sure if there's anything to do here. Possibly there might be some advantage to making an actual feature out of disabling nearest-neighbour upscaling via calling OpenGL directly, because that means you can get crisp nearest-neighbour upscaling, without sacrificing smooth downscaling with mipmaps.

Nicer tile selection UI zooming

Better UI zooming, maybe animated and snapping to integer percentages.
Initial zoom level should take into account screen space in region.

In 3D view work plane indicator

It'd be nice if there was a visual indicator in the 3D view to indicate the current work plane right where you are working.
I imagine a translucent quad placed at the 3D cursor position would be sufficient. It could be sized to match the current grid size to convey that information as well.
Would be nice to have options for always off, always on and on only during view transform.

Change license to GNU GPL

Hi,

I noticed that Sprytile is currently licensed under the MIT license. Since Blender's Python API is licensed under the GNU GPL, it requires any derivative works to be licensed under the GPL as well.

See the official FAQ:

What about Add-ons or my Python scripts?

If you share or publish Python scripts – if they use the Blender API calls – have to be made available compliant to the GNU GPL as well.

Thanks, I love this plugin!

Better Material/Texture Settings

Eiyeron on the itch forum suggested improvements to the material setup. These should be relatively simple to implement.

https://imgur.com/a/tWcLE

  • In the texture settings, put the Filter Size to its minimum (0.10), it avoids getting weird artifacts around the transparent parts (refer to the first and second image in the linked gallery,

  • Another idea is toggling the Z-Transparency on, to allow transparent parts to overlap opaque ones without having a visual "hole" in the result (refer to the third and fourth pictures)

https://itch.io/t/70286/here-are-some-suggestions

Non-contiguous fill mode

Similar to photoshop's contiguous mode, a toggle for the fill tool to fill every tile of the same ID, whether it is connected or not.

Panel tooltips appear when using Spyrtile

When in tilepaint mode, the panel tooltips keep appearing.

I suspect this is an issue with the execution of the tool and UI modals. The UI modal being executed after the tool modal might be making blender think it should draw the tooltips.

Continuous tile mode

In UV painting, a mode that remembers where users last tile ended, and tries to place next painted tile in the same UV tile at that position if possible.

UV Translate Modal

A modal tool that allows direct UV manipulation in edit view instead of switching to UV view.

Tilegrid data structure refactor

Tilegrid list needs a refactor to accommodate the following:

  • Tilegrid selection UI needs a better data structure to be drawn in a less hacky way by UIList. One blank entry that just references the material, so it can be drawn as a single row by the UIList.
  • Tilegrids need a unique identifier that per face data can reference. When a new tile grid data is added, eyedrop tool loses functionality because it's referencing tilegrid by their index.

This will also require a refactor of validate grid list operator.

Randomly pick a tile while painting

First off: damn, this tool is exactly what I've been looking for! Thanks man!

Now for the feature request:

Something that is super handy in tile editors is the ability to randomly select a tile from a group every time a new tile is painted. So for example, you could fill a wall with boring white tiles, then select your "random wall tile group", and every time you a paint a tile it randomly selects one of the "damaged" tiles to easily break up repetitive visuals.

How I envision this working is in the "paint" section, you set up "groups" much like you set up tile sizes. Then when painting, you select either a single tile or a "tile group". If a tile group, when painting each face, it randomly chooses a tile from the group. Additional randomizations could include flipping and rotation as well. Perhaps in the future, each randomization can be given a probability as well, making some tiles much more "rare" when painting than others.

If I can find the time I will happily make a pull request for this if you're interested!

Multi-tile Painting

Allow selection of tile areas to be painting source. Potentially lessen the need for multiple tile grids.

This gif demonstrates issue using PyxelEdit
Multi-Tile

Version number in zipped directory name prevents addon from working

The github releases have the scripts contained in a directory with the version number appended which, for me, prevents them working with Blender 2.78's "Install Add-on from File..".
If I rename the directory in the zip to just "Sprytile" it installs and works fine.

Better tilegrid selection UIList

Current UIList is a bad hack, needs to be rewritten so it works better

Implementation details:

  • A function needs to take the grid list and generate a new array, consisting of material and then grids below it
  • An integer property used for indexing generated array, if a material element is selected, moves to first grid

Stretch to edge paint option

For painting mode, for UV mapping faces that do not exactly fit the tiles. Would fit the UV map within the geometry.

Vertical and horizontal stretch options.

If stretching, reset the paint alignment on the relevant axis to center.

Scale the face to within the UV tile, and then snap UV vertices close to edge.

Add x/y pixel movement readouts to pixel translate tool

Use BGL to draw text showing how many pixels have been moved.

Implementation notes:

  • Get reference point from a selected vertex
  • On update, find new position of reference vertex
  • Calculate pixel distance moved

Might want to move pixel translation to its own python file.

Quicker Start video

Need better quick start video, as shown by Game From Scratch video. Something short and to the point, less than 10 minutes.

Would ideally have this before Ludum Dare 38

Add general tips section

A page that's after quick start tutorial, talking about workflow enhancements with Sprytile

  • Turning on backface culling
  • Viewport shading, use material mode
  • Rebind viewport shading toggle

Auto Reload Images

Instead of just a button to reload images, have a toggle beside it that turns on automatic image reloading.

Art for custom icons and cursors

Icons for panel:

  • Set Normal
  • Fill Tool
  • Paint Mode
  • Build Mode

Cursors for scene view:

  • Set Normal
  • Fill Tool
    • Tile transform lock indicator
  • Paint Mode
    • Consider sub icons indicating tile transform
  • Build Mode
  • Snap mode, vertex
  • Snap mode, grid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.