Project: Paper2D

I haven’t got any experience with any of these libraries, but did look around last month for some with a thought of creating a SVG Slate widget, and about only two I found that looked interesting were Nanosvg one, and libsvgtiny. However I don’t think either of those libraries support full SVG format.

Hi ,

Thanks for adding vector graphics support to Paper2D wishlist. I can certainly imagine cache issues you described when dynamically scaling sprites. I’m glad you see some merit in using vector graphics to save storage and perhaps in creating sprites at various resolutions on load.

I looked around for SVG libraries as well and only found Google Code Archive - Long-term storage for Google Code Project Hosting. so far. I also read that WebKit supports importing SVG files and converting to an intermediate format before rasterization, not sure if something like that could be used. NanoSVG library looks really interesting. I’ll keep looking for SVG related stuff.

main reason I like SVG format, is that so many authoring tools support it as an export option or can edit them directly. Exporting SVG files directly into UE4 would save lots of time converting to other pixel based formats, especially if you have to go back and modify original vector graphics at some point, or have to create layers for articulated characters. Anyway, I’m excited about possibilities! :slight_smile:

Wilhelm

I thought of another interesting feature idea that could be added to Paper2D’s Wishlist. It entails, being able to make color adjustments to sprite instances in a scene, such as modifying hue, saturation, value, color balance or levels of a selected color range. would allow developer to vary color of trees or foliage in a jungle scene for example, without having to load in many assets to create color variety.

I saw a game developer build their own custom shader to achieve effect and minimize number of assets they end up creating for game. It also went a long way in letting them color grade their game esthetic or match various graphic elements together right in editor. Anyway, it just seemed like a brilliant solution to a common problem.

Cheers,

Wilhelm

Hi ,

That should already be possible. Sprites have a per-instance color that is passed down to material as vertex color. default sprite materials multiply texture by color, but you can also implement and apply custom materials that use it for other things (e.g., as a mask or lookup coordinates into another texture).

Much longer term it might be possible to extend editor vertex painting to work on sprite instances and add tessellation options to sprite editor, allowing you to do even more interesting variation without a lot of texture data.

Cheers,

Here is some info I found on SVG loading and rendering using librsvg:

Ok I was wondering if something like that could be done already! Sounds cool!

Librsvg is LGPL. One other thing I found last night was Antigrain (Anti-Grain Geometry -), which switched from 3 clause BSD to GPL at 2.5, but it looked like there is a fork of 2.4 still being maintained.

Cheers,

I’m still wrapping my head around various Licensing systems. I noticed that Librsvg uses two sub-libraries, livxml for parsing XML with a MIT license and Cairo for rendering SVG to a block of memory with a dual license of LGPL and MPL.

Is Mozilla MPL licensing too restrictive as well?

Antigrain engine looks interesting! :wink:

W.

I would like to also register my interest in getting Spine working with Paper2D when you get to stage of adding skeletal sprite support, I’m currently using it on two of my XNA/MonoGame projects and it’s fantastic. It’s an amazing little program, very low cost for indies and hands down beats programs like Maya for creating 2D skeletal artwork.

I am also using Spine and have found it very usuful and powerful. I was hoping it will get support. I would imagine developers would help as they have implemented most of their runtimes.

Hey ,

I’ve appreciated time you’ve spent on live streams explaining many technical details of engine and also features to come. I can’t wait to see an episode featuring your work on Paper2D and UMG! Anyway, just wanted to thank you for all hard work your putting in to make a truly great platform for everyone!

All at Epic, thank you immensely for realising possible ramifications of lightweight, performant 2D rendering with Blueprints. It could well change way world views creation of interactivity and provide ultimate easy entry point to Unreal Engine and programming.

Dream/

Is it possible to make UE4 build a games that contain only Paper2D, 2D physics and Blueprints/C++? So that’s it’s as lightweight as possible, and loads to devices super fast, builds rapidly, etc.

I’d happily suffer a tonne of feature loss to gain that kind of development and loading speed.

If it was then possible to have a version of Unreal Engine that only did 2D, and was consequently much lighter as a result of 3D having been stripped from it… that’d be extra .

/End of Dream.

We’ll certainly do a stream on Paper2D some time in next few months.

In order for workflow to be as seamless as possible (e.g., knowledge of how to work in 3D translates smoothly to 2D, working with same scene components, traces, and queries as you’re used to) and to allow hybrid 2D/3D games, you won’t be able to jettison rest of engine as a whole. However, it should be possible to compile out PhysX and a number of other pieces of middleware to significantly reduce size of runtime binaries. I’ll give that a shot when I get a chance, but I’m aiming for all of Box2D work to be independent, so you can pick 2D physics only, 3D physics only, or both (though individual components will only exist in either 2D physics scene or 3D physics scene).

Cheers,

I’m quite interested in and have not found a real “answer” from roadmap for Paper2D:
What is planned in terms of 2D animation? As some mentioned it would be nice to see 2D skeletal animation and especially just things like placing sprites at different positions in frames, having tweening and such things… maybe also Spriter (a 2D animation tool that has a free version) support.

Anyway, just hoping will become something highly useable with a good animation system that can do more than flipping between images :slight_smile: (and preferably doesn’t require paid third-party software to use)

Hi Pinkishu,

Currently we’re only planning on improved flipbook animation support in short term. There are backlogged cards on roadmap for in-editor hierarchical 2D animation, but any kind of in-editor skeletal keyframing will probably wait until Sequencer (a new track editor for UE4) is further along.

Cheers,

Hi ,

I’ve been working with Paper 2D for a few days now, and ran into an issue that I wanted to ask about. In my level I’ve created two sprite actors and used sprite editor to crop portions of a single PNG so that one sprite becomes body of a character and second becomes eye. After adding finished sprites to scene, I want to make Eye sprite child of Body sprite, so I try to parent them together in scene outliner, or in component editor. But in both cases, sprites will not parent together, even if they appear to be parented in hierarchy. Shouldn’t sprites behave same way as meshes in scene when you translate parent, child should translate as well.

Am I missing something, or am I describing a current bug?

Thanks for your help!

W.

Is anything expected to break in future releases with projects made in 4.2? If I create bunch of sprites and a flipbook, will that still work in 4.3? Will there be at some point be in editor tools for auto creating sprites from an atlas or possibly importing from a third party tool like texture packer.

From 4.3 on, everything should be forwards compatible. For Paper2D content created before 4.3, most things should work, but some stuff will get lost when you upgrade (specifically sprite material overrides, which I modified before adding a custom version number to ). I’ll probably also be renaming classes before 4.3 ships; there will be class redirectors in place so BPs will seamlessly update, but C++ authors referencing types will need to update their code to refer to new classes (instructions will be in upgrade notes).

There are a number of image slicing improvements coming in 4.3, including a source region edit mode to quickly a draw rectangle around a region and an ‘Extract Sprites’ context menu option for textures that automatically identifies discrete regions in an image and creates sprites for them. We’ll be continuing to improve sprite editing tools.

We also support importing a spritesheet that was exported from Flash CS6 ( descriptor + png textures). I’d like to add support for other tools as well, if you can point me to example data from texture packer it probably wouldn’t be too difficult to add importing for (although if you’d like to copy PaperJsonImporter module example and submit it as a pull request, that’d be even better ^_^).

Cheers,

Hi ,

Parenting with sprite components should work exactly like any other component, however I just tried to put together a test case and I can repro issue you’re seeing. I’ll let you know when I have a fix.

Cheers,

,

I’ve fixed issue that caused problems when a sprite is a parent component with attached children (doesn’t matter what child is).

Paper2D: Fix bug in UPaperRenderComponent::GetSocketTransform that would cause components attached to a sprite to behave as if they weren’t attached
/EpicGames/UnrealEngine/commit/3277c32486201425af1b390a4a59bfd839f5206e

If you aren’t building from source, you should be able to work around it for now by using a dummy scene component as real parent, with visual sprite ‘parent’ being attached to that as well. It should also work fine as-is if you attach to a socket defined in parent sprite (issue was only for ‘none’ socket where it was returning Identity instead of ComponentToWorld)

Cheers,