This is an amazing plugin. Great work !!!
[MENTION=2289]Michael Noland[/MENTION] Have you seen this?
This is an amazing plugin. Great work !!!
[MENTION=2289]Michael Noland[/MENTION] Have you seen this?
Hi , sorry for the delay in response. I’ve been on holiday for a week in Somerset, UK for my birthday.
I was really close to making a progress update before I left, but couldn’t quite get everything done in time. This first chuck of work has felt a little slow as I’ve needed to work on quite a few things in tandem before any one thing can be functional. Once this is all out the way I should be able to make more regular progress updates.
I’m aiming to show the core sprite asset, renderer and auto asset handler very soon!
Hi everyone, you wait ages for a Scissor2D update and then three come along at once!
Production Sprites
Scissor2D Static Sprites (or Sprites) are an asset and set of supporting classes that allow you to setup and render textures through the Scissor Renderer. This allows Scissor Sprites to be correctly batched and layer sorted for performance and correct scene compositing (more on the Renderer in a following update).
Scissor Sprite Asset
This asset holds information about how a texture should be rendered in the scene via a ScissorSpriteComponent. Functionality wise it is similar to the Paper2D equivalent, supporting creation from texture, thumbnail renderer and drag and drop into scene which creates a ScissorSpriteActor that is a thin wrapper around a ScissorSpriteComponent.
Sprite Asset Editor
(Scissor2D)
(Paper2D)
For wrapped mode I have implemented a new algorithm that can in most cases produce more efficient meshes with less overdraw then the Paper2D equivalent. The new algorithm can also correctly handle sprites with interior holes (if required). It should be noted the Scissor Sprite Editor does not currently support manual editing of the render geometry or source region, as we do not need these features right now. But I would be happy to implement if there are feature requests for them.
Known Issues:
Production Renderer
At the heart of Scissor2D functionality is the Dynamic Geometry Renderer. This is an Actor you place into your level that performs all the actual drawing of ScissorComponents. ScissorComponents (such as the SpriteComponent) send render commands to this renderer that allows it to later batch and layer sort the scene correctly.
Batching
Layering
All scissor components support ‘Sorting Layer’ and ‘Order in Layer’ variables for scene ordering. I am currently working on a Layer Manager that will give you a gui to setup layer names, visibility and selection locking for each layer.
External components to the plugin such as particle systems and in world ui can also be correctly layer sorted by placing a child ScissorLayerComponent onto the external component you need to sort. This notifies the renderer that something else is rendering here and allows it to take the external component into consideration when layer sorting.
I also want to look at Grouping functionality further down the road, but this is quite complicated to implement so has been moved to a later release.
Material Cache
To save the pain of setting up hundreds of dynamic materials for the sprites you want to use, the renderer has a Material Cache that will auto instance, cache and release them for you. You can used the supplied materials with the plugin or make custom ones as long as they meet the requirements described in the docs.
Dynamic Geometry Renderer
The renderer is designed to be a high performance dynamic geometry renderer that can accept render calls from a variety of component types. This means currently all scene rendering through the Scissor Renderer is in fact frame by frame dynamic geometry, which has been proven to be efficient for 2D work where vertex counts are relatively low, while most data is changing frame by frame.
Editor Selection
It has taken me a little time to get sprite selection working correctly. In the editor selection is calculated via a pixel perfect hitmap that components are rendered into. The issue was the ScissorRenderer is always rendering all the geometry, so would get selected over the component representing the item to be drawn. After some experimentation I have a work around that correctly selects the right Actor in the scene, but there is a down side to get this to work, batching must be turned off in the editor viewport, as when batched the geometry is rendered as one big chunk and I cannot find a way (currently) to assign actor hit proxies to subsections of the chunk.
Known Issues:
Auto Asset Handler
To make working with Sprites as convenient as possible Scissor2D comes with an Auto Asset Handler that can manage sprite creation and settings for you on texture import. Texture and sprite root folders can be set for where in the content folder assets should be auto managed.
Texture Import Settings
Textures can have default setting automatically applied on import if they are in the auto folder tree.
**Auto Sprite Creation **
When enabled corresponding sprite assets will also be auto created and managed. They will have naming conventions applied and then placed in a mirroring folder structure. Textures can be moved / renamed or deleted and the corresponding sprite will mirror the changes.
The sprite auto folder can also be separate and mirror the texture root allowing for different organization methods.
Known Issues:
-Auto management of assets only works from texture -> sprite, if there are feature requests for reciprocal management I can look at adding it.
Few! The next two main areas of work I’m going to be concentrating on are the Layer Manager and Atlasing tooling. Hopefully these will be a little more straight forward then some of the things I’ve been tackling recently!
Great work!
Are you feeling comfortable with an ETA now?
Hi ! thanks for your continuing support! I was waiting for the Unreal forums to be a little less on fire before I replied
Still really hard for me to give an overall eta as there are still quite a few large chunks of work that need investigating. These could each take a week or a month depending on the engine internals. Until we are closer to the end (ie most code is complete) eta will just have to be “when it’s done”.
Sorting Layers
http://i.imgur.com/DIePlYZ.gif
Scissor2D now has a new editor tab that lets you manage your sorting layers. Here you can create / delete / rename sorting layers and then they will be available in a drop down on individual render components.
http://i.imgur.com/6A7cPGB.gif
Sprites that are added to the scene will auto set themselves to the currently selected layer.
http://i.imgur.com/uwMef5X.gif
Sorting Layers can be rearranged via drag and drop.
http://i.imgur.com/opJuyxN.gif
Sorting Layers also support visibility and selection locking. The latter is incredibly useful when working with complex scenes.
Sorting Layers are setup per project and saved into the editor config, so are available anywhere in the editor such as when setting up blueprints. They also work fine in tandem with the current editor ‘Layers’ system, giving you plenty of option to how you want to arrange your project.
I learnt a whole lot about Unreal’s Slate UI system making this, should serve me well for the upcoming tasks!
As always, feedback or suggestion are very welcome!
Hi, I’ve decided to not work on Atlasing next as I want to tackle one of the larger areas of work first: Sprite Animation.
I’ve been looking into what Paper2D has, and what Scissor2D could do to improve on this. It seems the main areas that are missing are animation notifies and animation state setup. Ideally we would have a system analogous to the 3D skeletal animation side of things that lets you make a ‘Sprite Animation Blueprint’ add notify events (setup in the Sprite Animation Editor) and set up state machines with transitions for what animation to play.
But this is potentially quite a large undertaking depending on what feature set we want to implement (anim graphs will have to be custom graph types with new nodes etc, there is not much we can reuse from the 3D side of things).
So this is a call for community feedback on what you count as a priority, would you like?
or
I say option 1 is probably better for an initial release. You can always use Enums to build your “State machine” (seen on the 2D UE4 stream). Its not elegant, but it works. I rather get some of the other juicy features that are NOT part of Paper2D at all. Maybe you can do #2 in a future release?
Just my opinion
I feel like option 1 would be better for now, while keeping option 2 open for later down the line. As CoquiGames pointed out, there are ways to work around not having anim graphs.
Option 1
2 does not matter to me at all
Yes I am also thinking option one for now and state setup can come a bit later (though it may not actually take that long looking at it now). One issue I’m currently trying to work out is how to know what notifies should be available in a Sprite Animation and Animation Blueprint.
In the 3D skeletal side of things, a Notify is set on an animation that belongs to a Skeleton. In the animation blueprint it can scope to just these notify actions for both the notify editor and the animation blueprint.
But Sprite Animations don’t really have a concept of grouping, as any animation can be played on any component. This leads the question on where to store the available Notifies. If I make them global I can see a complex project quickly getting swamped with Notify types. If I make them per Animation I need a way in the blueprint to know what animations are going to get used to setup the Notify events.
Any thoughts to a solution?
I’ve started doing the preliminary work for sprite animation and my plan at the moment is to have a AnimatedSpriteComponent that you can extend in blueprint to set up state machines in the Paper Flipbook way. But this will support Notifies that are setup individually on a SpriteAnimation Asset.
As I don’t know what animations you are going to play in advance, you will have to set the notify event up as a function in the blueprint with a named convention of something like Notify_MyNotifyName, and then if the current animation has this Notify the function will get called accordingly.
In a later release we will support the concept of a separate Animation Blueprint that has state machine support to setup your transitions. Here I will be able to walk the graph of what animations you are using and maybe have a better mechanism for setting up Notify Events in that blueprint.
Either way the bulk of this work will be making the SpriteAnimaiton editor that needs functionality similar to the Flipbook editor, but with a way to add Notifies to the timeline. Hopefully I can reuse some of the Persona ui for this.
If it’s any help, PaperZD (an extension for Paper2D that adds precisely animation blueprints, events and state machines)… is heavily inspired on the AnimationBlueprint… but creating an asset editor that had to move away from the persona and done from scratch, creating a blueprint compiler was also needed. If you are in need of recomendations on how i did that i have no problem on helping, also i could extend my plugin so it can support your flipbooks… If that’s any interest to you. My main concern is to make 2d not a nightmare to work
I would give the showcase video here, but i don’t want to spam.
Cheers!
Hiya, PaperZD looks like a great addition for people wanting to extend functionality in their Paper2D projects, nice work! Everyone go check it out here:
Reg the Animation Blueprint, yes my initial investigation showed that this was not trivial to implement, and would probably be better for a later release when the core of the plugin is out in the wild. Thanks for the offer of integration, but I will probably try to roll this functionality myself at some point to keep everything tightly streamlined. I may have (many) questions though!
Sure no prob, anything you need feel free to ask…
Looking forward for your plugin as well… great job on tackling that (much needed) solution
■■■■, this is nice. Sadly my game is in a too advanced state to switch from Paper2D but keep the good work
Animated Sprites
https://i.imgur.com/JM6p2na.gif
Scissor2D now has support for Animated Sprites or Flipbooks (to keep with naming conventions). A Flipbook is a collection of Sprites that can be played one after each other via a ScissorFlipbookComponent. Just like the ScissorSpriteComponent, this renders through the ScissorRenderer, so supports batching and layering and all the good stuff!
New Flipbook Editor
https://i.imgur.com/dXeyc9U.png
Flipbooks are managed via a new redesigned (over Paper2D) FlipbookEditor. Here I have tried to make keyframe management more user friendly by including a visual drag and drop interface that can work with multiple selected sprites.
https://i.imgur.com/joD0oIb.gif
This allows groups of sprites to be rearranged, duplicated or removed with ease.
https://i.imgur.com/cdORkoh.gif
The interface also allows new sprites to be inserted anywhere into the list from the content browser.
Keyframe Notifies
https://i.imgur.com/Zh2M0XQ.gif
The new Flipbook Editor also allows you to set Event Notifies on specific keyframes that will be called inside the ScissorFlipbookComponent. When a notify has been added to a keyframe, a little event icon will show to indicate this, you can then right click the keyframe to see what Notifies are set.
https://i.imgur.com/uNowlpw.gif
Once a Notify has been created it can be easily added to other keyframes via the context menu. This works with multiple selected frames, and gives you information about what notifies are common to all the selected frames.
https://i.imgur.com/VnEE8p9.gif
Notifies are used by extending a ScissorFlipbookComponent in Blueprint and creating a function with the naming convention of Notify_YourNotifyName. This will then be called when the Flipbook starts playing that keyframe!
https://i.imgur.com/kNLfd1b.png
You can also subclass ScissorFlipbookComponent in C++ with the same naming convention if you prefer to keep things native.
As always any feedback or suggestions are always welcome!