Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity Tell us about your experience with Sprite Shape

Discussion in '2D' started by rustum, May 29, 2019.

  1. rustum


    Unity Technologies

    Feb 14, 2015
    Hiya folks!

    Sprite Shape.png

    The Sprite Shape package is being prepared so that it can be used in production. We'd like to get a better understanding of where it stands and how it's being used.

    Here are some questions to get this discussion started:
    1. Are you using Sprite Shape?
    2. If so, how are you using it? What can you tell us about the project you are using it in?
    3. Which parts of the tool and asset workflow feel smooth and which parts can be improved?
    4. Does the collider generation satisfy your project's needs?
    5. What improvements would you like to see for Sprite Shape collider generation?
    6. Do the Sprite Shape corner workflows satisfy your project's needs?
    7. What improvements would you like to see for making corners in Sprite Shape?
    8. Are you aware of the samples and extras that are embedded with the package? Are they useful?
    9. What other samples would be useful?
    10. Overall, what additional functionality would you like to see in the future?
    If you would rather answer these questions in private, please follow this link to answer a short survey.

    We can't wait to hear all your perspectives!
  2. pastaluego


    Mar 30, 2017

    Yes. I'm making a fast-paced 2D platformer with curvy terrain like Sonic and am using it for nonterrain foreground decorations and certain terrain objects.

    3. The tool is very nice and smooth for the options it currently has available, but a lot of improvements can still be made, such as:

    a. Modifier keys when clicking on spriteshape tool hotspots (such as a shapepoint) to streamline certain modification features without having to disrupt eye+mouse position by needing to use the inspector UI. You could say it's minor, but coming from Ferr2D which has those types of features it is something I noticed as being a workflow disruption.

    b. Curve generation is currently just a manually shaped bezier curve. Since my game relies heavily on making perfectly precise angled straight and curved edges, a modifier-key+click on a tangent-mirror shapepoint that automates different types of precise uniform curve shapes would be ideal (one example curve-type being a perfect halfpipe curve like Sonic). Ferr2D currently can do this with a single click of a shapepoint which is one of the reasons why I still use it over SpriteShape for terrain objects. It doesn't need to be that fancy, but I can't really use SpriteShape for terrain with any curvature (which is most of my terrain) unless I can make perfect curves with it, which can't be done with just the current system.

    c. Separate material for edges for shader effects that don't affect the fill

    4+5. Collider generation has been immensely improved in the past couple months, but there are still a few quirks. There's still a weird bug with the offset=0 matching the fill shape less accurately than offset=0.00001. And I think the collider complexity can be optimized a bit more even still while still perfectly matching the fill mesh shape. Ferr2D can still generate a somewhat significantly simpler polygoncollider for an equally complex mesh shape.

    6+7. Corners are probably the worst feature at the moment. I think it would be a lot better if there were an option for Straight-line mode to automatically generate a corner for the point by very sharply bending the selected edge mesh. Very similar to how mirrored-tangent mode essentially generates a curved corner already, except just make it sharper. This creates a much smoother corner transition than needing to use a separate sprite. Specifically for shapes that represent natural landscapes like rocks, grassy cliffs, etc, which I'd argue are more prevalent than shapes that represent a more manufactured terrain that would benefit more from a custom corner sprite, like that of a building. Ferr2D manages to do it this way and it looks great.

    The current corners also break easily unless they're in a very limited shape range. The above suggestion would allow the corner to work at any extreme shape range.

    10. I have no idea how feasible any of the following will be in terms of even being possible to do, but:

    a. I'd love if there were some built-in edge transition features. For example I primarily use spriteshape for making natural scenery like cliffs, and in order for the edges to seamlessly blend with the fill in a professional-looking way, you need to feather the bottom half of the edge sprite in your preferred image editor so it blends into into the fill texture. Otherwise there's a clear and jarring visual difference where an edge meets the fill. I'm happy to do this manually in the image editor, but I'm using it just as a simple example of potential edge mesh transition features that can turn a shape from looking amateurish to looking AAA.

    b. Similar as the above, but for neighboring edges. If there were a built-in way to blend different edge textures together when they meet by internally overlapping and feathering them near the transition point, that'd be honestly amazing. This one's not technically possible to do through image editor tricks, so I highly doubt the effort/result ratio is worth doing on your guys' end. But I wanted to mention it anyway.

    c. I use an orthographic camera which means I need to manually move the transforms of background objects in order to create a parallaxing effect. But I also need it so the moving spriteshapes are synced to world-space UVs. The problem is at runtime if you attempt to move a spriteshape with world-space UVs enabled, the fill texture doesn't move with the object. So I essentially just need an option to have the spriteshape fill UVs set and saved to world space once and then have it stop syncing so it moves with the object properly.

    d. Maybe an option to pre-generate the mesh data and store it in the scene asset before runtime so a spriteshape doesn't use a decent amount of resources when it's first rendered.

    I think this is almost everything for my particular needs. I still use the tool for a bunch of stuff because it truly is great!

    Thanks for making it because it really makes certain types of games seem a lot more accessible for newer devs, which is always a good thing.
    Last edited: Jun 27, 2019
    vakabaka, dquek and jeffweber like this.
  3. Dabelnedy


    Apr 2, 2017
    1. I stay up to date and look at the updates but it's not a good idea for me to use it in my project yet due to a lack of features.
    2. I would use it for an action platfomer game, for all the walkable terrains.
    3. +6) The interface is really simple, so it's nice to use. But some key features like moving multiple points or changing multiple corner types at the same time are not available.
    4. I am satisfied with the collider generation, it does the job and is predictable. However, something changed in version 2.0 (unlike in v1.0) where an open-ended sprite shape's polygon collider no longer follows the path and is acting like it was not open-ended. There's also that bug where an offset of 0 creates two points at the same spot with the PolygonCollider.
    Proper collider generation (v1.0) on open-ended paths, collider follows the path correctly:

    Collider generation (v2.0) on open-ended paths, collider behaves as if it wasn't open-ended and tries to close the shape despite having an offset > 0:

    The samples are fine, there's no need for more.

    10. Making the tool be as fast as possible for use: moving multiple points, changing multiple corner points at the same time, adding hotkeys to the Shortcut Manager (like delete point on another hotkey, the Delete key is far away) and making the colliders be as simple as possible, I really want to use SpriteShape for my game because its collider generation doesn't create multiple convoluted forms unlike Ferr2D. That's an amazing thing for my custom pathfinding. So please don't go towards the Ferr2D collider generation and keep it like you started! I think it's possible I can use it soon for my project. Thanks for the hard work.
    FeastSC2 likes this.
  4. pastaluego


    Mar 30, 2017
    It is currently possible to move multiple points and change their corner types at the same time by holding shift and clickdragging multiple points. Make sure to continue holding shift when moving a point with multiple points selected and it will move all of them. Also with multiple selected you can change corner type and it will change all selected points.
    Dabelnedy likes this.
  5. calRoto


    Feb 19, 2014
    I love the SpriteShape tool and have been wanting this long before it was introduced. Currently I am using it for two purposes, unlike most common uses. First, it is being used on data obtained from a body tracking camera to create a shape in the silhouette of a person. In this case, the user's body is transformed into a topiary like bush with flowers. Second, I'm using the package for masking an oddly shaped projection screen.

    These two applications have led me to want two additional features for the package, one for each application. In the topiary example, it would be nice if the shape could use multiple random fill textures, instead of one titled texture. The tiled texture doesn't give enough variation in my example. Second, in the projection masking example, an on-screen in-game editor would be nice. The editor works really well and I wish I could use it during gameplay.
  6. ameeruashour


    Jun 27, 2019
    I'm currently having trouble finding the 2D Spriteshape tool. I have Unity 2019.2 Beta and I wanted to practice game development with the sprite shape. I tried to find it everywhere in the editor and the Unity Hub, but, I couldn't find it. Please help.
  7. Venkify


    Unity Technologies

    Apr 7, 2015
    @ameeruashour You can import SpriteShape package from PackageManager.

    Use the Unity Package Manager (in Unity's top menu: Window > Package Manager) to view which packages are available for installation or already installed in your Project.

    SpriteShape as of now is a Preview Package. Please enable the Preview Packages in Package Manager
    PackageManager -> Advanced -> Show preview packages.
    as shown in the attached screenshot :

    Current supported versions :
    2.1.0-preview.10 (2019.2 and above) versions
    2.0.0-preview.8 (2019.1)
    1.0.14-preview.2 for version 2018.4 and older.
  8. Xarbrough


    Dec 11, 2014
    I don't have much to add regarding the workflow and current feature set, but the one thing that is keeping our current project from adapting sprite shape is performance. Initially I looked into the preview package and liked it, but soon realized that even as a prototyping tool the performance is simply too slow and way too much gc allocations every frame to be usable on mobile and Nintendo Switch platforms.

    I know that performance optimizations are not to be expected by preview builds, but in this case it was so bad that it made me doubt that Sprite Shape will soon be ready for production, so we decided to not continue evaluating it. Please consider optimizing editor and runtime performance for the features it currently has.
    Sandler likes this.
  9. Venkify


    Unity Technologies

    Apr 7, 2015
    @Xarbrough Thanks for the feedback. We would like to understand more regarding performance issues you mentioned. SpriteShape geometry is mostly implemented in C# Jobs since 2019.1 (version 2.0.0-preview-4 and above) and should be much faster than 2018 preview versions (1.0.14-preview.2 and older)..

    We are continuously improving the feature and it would also be nice if you could send us a sample with more info on expectations. Thanks again.
    jc-drile77 likes this.
  10. jc-drile77


    Jul 1, 2014
    We planned to use Ferr2D for our upcoming project. But as this is finally available (been waiting since 2015) as non-beta we will give it a try.
    Features and performance will increase with future updates, so using SpriteShape is the way to go for new or planned projects. And if I can recall correctly it is open source right?

    I will post another answer in a 5-6 months period which contains my (then) detailed experience using this.
    Venkify likes this.
  11. MrZzzero


    Dec 9, 2016
    plz help i used the first version of sprite shape in my game and after updating unity i got some errors about sprite shape and i downloaded the latest version errors disappeared but everything ruined in my game levels, also when i tried the new sprite shape i found that there is 2 options open and closed not like the first version where u have 3 options when i do open sprite shape profile it gives me a closed shape is it a bug ? i mean i can't do the same as i did before with the one called strip from the first version, and how to fix my ruined levels sprites shapes ??
    image 1 : ruined strip sprite shape

    images 2 : sprite shape option open


    result : as u see here the open one has 4 parts is it a bug or just need some configuration ?


    image 3 : sprite shape option close (looks like the old one , no problem with it)


    result :

  12. MrZzzero


    Dec 9, 2016
    plzz help it tooks from me like a month to finish my ruined levels its hard to redo all levels i used in them the oldest version of sprite shape