2D Alpha Release 3

Hi All,

We have some updates on the 2D beta features. See them all here:
https://bitbucket.org/Unity-Technologies/2ddemos/wiki/Alpha_Release_3/

Here are some highlights.

Shuriken 2D

Masking Workflow

Sprite Mesh Editor

SmartSprite

Tile Map (older video for those who have not seen it)

Please head over to
https://bitbucket.org/Unity-Technologies/2ddemos/wiki/Alpha_Release_3/

Download the build and give us some feedbacks. Your feedbacks will go a long way in helping us ship these in the final build.

Thanks!

9 Likes

I’m liking the look of the true alpha masking and runtime alteration of that smart sprite. Wasn’t sure if smart sprite would ever be valauble in a procedural context, but this certainly would move it in that direction. I hope at least some of these features make their way into 5.2.

Hi, Paul! New features look great!

I have a question on masking in alpha mode. How is it implemented under the hood: do you use stencil buffer or do you project mask sprite on the maskable sprites (altering their secondary UVs)?

Looks great, Unity2D getting the features it deserves!
Smart sprites:
*Runtime Deform

  • Undo support
    :smile:

Looking great so far.

@ColossalPaul Don’t forget to update the overview page. It still says Release 2 is the latest release.

Sprite masking in both modes (mesh and alpha based) are using stencils.

The overview page has been updated. Thanks, Jay!

1 Like

Thanks for the info! Is it correct that as long as masking is done using stencils - it is 1bit masking (a pixel is either masked or not masked, no smooth transitions)?

And another related question: if I understand correctly - while Mesh Filters may instantiate a copy of Mesh (when that property is queried), Sprite Renderers that were assigned a same Sprite always use a single shared Sprite instance. The question is - do you have any plans about exposing functionality of instantiating Sprite meshes and exposing their internals (uv2, uv3, etc.)?

Is it correct that as long as masking is done using stencils - it is 1bit masking (a pixel is either masked or not masked, no smooth transitions)?
Yes.

For the second part of your question, if you are interested in the meshes generated for a sprite, does this help you?

@sandboxed

Yes, I’ve made a quick test and looks like it is a valid approach to use those Sprite properties to re-create a mesh of some sprite and render it via MeshRenderer. It is just a bit inconvenient to use SpriteRenderers for the regular sprites and MeshRenderers for sprites being rendered with advanced shaders. :slight_smile:
I guess you’re interested in keeping SpriteRenderer simple (and it is good). But maybe you could consider adding (in some future Unity version) some kind of AdvancedSpriteRenderer with more internals exposed, but that can still be dynamically batched with regular SpriteRenderers when possible.

1 Like

Sorry for my ā€˜dumb’ question but … any help on how to get brushes in the Palette ? I’m trying to make a simple platformer. Thanks !

That’s not a dumb question. Actually, doing that is pretty complicated at the moment. Your best bet is to open one of the samples and look for the objects with the brushes script on them and then try to replicate what they did! I haven’t done it myself yet, so…

Checking out the samples would be a fast way to start! This would be the latest version.

There are two things you need to make to create a new brush, the brush painting script and the brush asset. The brush painting script contains the logic to paint and erase tiles, while the brush asset contains customised information for painting specific sprites.

To create the brush painting script, you will need to extend from the GridBrush class, overriding the Paint, Erase and GetPreviewSprite functions. You will also need to have a way to create the brush asset/s itself; in the sample, we added a function CreateBrush to each brush painting script to create the brush asset. Anytime a brush asset is created, the Tilemap Palette will pick it up and make it available for selection.

For normal sprites, all textures with sprites should appear in the drop-down menu in the Tilemap Palette. You can switch between the sprite textures by selecting the texture name in the drop-down menu.

Hi, does the Particle 2D Collision already support OnParticleCollision() calls? If not, is it planned in the future to add this support?

Thanks, much appreciated and I’m really excited to see significant improvements to 2D tools

UPDATE: I ticked the ā€œSend Collision Messagesā€ Box but it didn’t seem to do anything. Maybe a bug, maybe intended? Can anyone confirm that this does not work?

Hi, Paul! New features are amazing!
I saw new Component ā€œBatched Sprite Rendererā€ at the demo video.
Is it a native component of engine or a high level component(like c# Script)? Does it work like Sprite Render but with manual control of the mesh from code?

I’m wondering if the tilemap could be used for many more things than the terrain of the gameworld. Say if you make a top-down game, could you use a separate layer above the terrain as fog of war for example. Or in a turn-based tactics game, you could highlight tiles with an overlay to indicate on which tiles one of your units could move to on your turn. I’m wondering if those could be possible uses for this tool. It is possible to edit the tiles at runtime trough scripting, right?

Looks great. Would love to test it. Are there non-pro early releases? I’d make direct use of the tilemap in the title I’m working on. Pro is still too rich for my poor blood. I can’t pay $75 to give you feedback, sorry.

Can you support scaling for the edge 9-slice sprites (maybe future ffd) as to break the monotone frow of the surface, to have wavy irregular surface for example (with free form deformation or local vertical scale).
Also can you choose the sprites when you change them (in multiple edge sprites) or are they random? thanks.

This sounds like you need smartsprite?

https://www.youtube.com/watch?v=yZtWNHUjT5I

How batching sprite renderer works ? It’s a better batching system or it is for the tile map ? Does it work with isometric sprites ?