Project: Paper2D

Oh cool! Glad it was a simple fix! Thanks for looking into issue so quickly and also suggesting a workaround since I have yet to try compiling engine updates.
I should be able to get something working now!

Thanks again for your help!

W.

Hey ,are you still working alone?
I think Epic should send serveral people to work together to speed up development of Paper 2D.
I can’t wait.

I second above poster ^

I’ve built latest preview build (from 20th june). Although source code has a lot of stuff in it, I don’t see to much in editor. I did notice that you can click in editor to auto create region bounds and collision.

I guess you are still working on it . Are we expecting to see much in 4.3? Nice work though. cant wait for a lot of tools to get in there.

Hi ,

In addition to what you’ve found, there are a few other little editor things like being able to auto-split a spritesheet that has space between images (right-click menu on texture), but a lot of focus for 4.3 is productization, improving what is already there and fixing bugs.

Before 4.3 branches I’ll be going thru clearly marking what isn’t ready for prime time as well (tile maps aren’t good to go), so it’s more obvious what is supported/stable and what isn’t. I’ve also spent a decent amount of time working on integrating 2D physics into Unreal, but it’s a WIP (collision detection/response and raycasts are implemented, but queries, sweeps, and overlaps will not be in 4.3, so it’ll also be ‘experimental’).

For 4.4 and beyond, we’ll push to productize more of 2D support and do sprite editor improvements, documentation, templates, etc…

Cheers,

Also, as a fun little diversion since James and Richard got generic spline editing support into engine, I started working on a spline-based 2D terrain system. It probably won’t be out of experimental for 4.3 but prototype is in there if you want to have a go with @latest.

Cheers,

Wow I didn’t see that that there was a right click menu. spline tool looks like it will be great. Cheers .

It’s already possible to add a sprite/flipbook setup to a Character blueprint and use in built movement mechanics. To simulate input, you would just call events for characters movement.

How do we get started with spline terrain tools? Not sure where it is.

ok ive found paper terrain class. just not sure of how to use it. I can drag an actor into map and edit/create points on spline. are we meant to create blueprints/c++ from class? also, what kind of material do we add? ive tried to put a default sprite material into slot but nothing will take.

You need to create a paper terrain material (New…Data Asset in content browser, pick Terrain Material as type). That will let you define rules for how terrain should be textured, you’ll need at least one for anything to show up right now (haven’t created a default one yet). I’ve attached a photo of material used for photo above. At a minimum you need a single sprite to reference as a body segment, but concept is as follows:

  • Break terrain up into segments that fit a specific rule (e.g., slope is in a certain range)
  • For each segment, try to put a start and end cap sprite on it (if they are not null).
  • Fill remainder distance of segment with randomly picked body sprites (you can define more than one).

Right now sprites being deformed to curve are not automatically subdivided, so you may want to create some extra internal detail in sprite editor so they more closely fit curve. probably won’t be necessary in future (either sprite editor or terrain component will have a tessellate option to make it much easier). There are also some improvements to general spline editing inbound that let you pick type of segment for each control point on spline (linear, auto, etc…), which are very useful in practice.

Note: Anything you make now with 2d terrain component is not guaranteed to work in future, I may break data compatibility when finishing it.

Cheers,

Animations

,

If you want to do simple animations such as moving a sprite, scaling, fading, spinning, rotating, ect, what would be best way? Will any of tools for 3d animations work at all with Paper 2d sprites? (I haven’t looked into those tools yet, but I have seen notes about animation so I assume they are there) Or is right now rolling your own animations programatically only way?

terrain works quite nicely. How does collision with it work? Will there be paper collision components or is that functionality built into paper render compoment? I see a code entry on for paperCharacter. Will that be like Character (ie a pawn but with movement component included)? Should we separate current physics system to 2d one?

Hey is only in GIT HUB and not 4.2.1? At moment I have been using paper2d and each piece of art work I have had to resize each sprite to fit it, would be very handy.

is in latest preview release for 4.3. You can get source code from here and build it yourself.

/EpicGames/UnrealEngine/releases/tag/latest-preview

Yeah, right-click option to find sprites separated by alpha=0 regions is going to be in 4.3, but we’re also planning on an interactive ‘slicing’ tool to make it a lot quicker to split things up in sprite editor as well (creating additional sprites you can switch between using browser in corner), but that won’t be until 4.4 or later.

Cheers,

There’s no collision support yet for terrain splines (which is part of why it’s still experimental), but my current plan is to have an option per rule on whether it’ll create collision as well as some offset settings, and it’ll generate a collision strip that follows spline segment. If all rules have collision and spline is closed, then it’d generate a single solid collision object probably. Not 100% sure until I start playing around with it. I’m also considering using source sprite collision geometry for sprites that are getting stamped down, but that might end up being a bit unwieldy to define/tweak for simple splines.

Cheers,

Animation is still pretty early. Right now you can only swap sprites in a flipbook, and play one of those back. However, sprites and flipbook players are regular components, so all of general Unreal features work same way on them as they do on 3D stuff. You can use matinee to keyframe things, a Timeline in a BP to rotate/scale/etc… things, or arbitrary math in a BP or C++ code. In future, we may grow what can be done inside of Flipbook editor, or create a different kind of animated sprite that has more skeletal anim-like features, but nothing is set in stone yet.

Cheers,

Hi ,

Thanks for your work on plug-in. I am however having an issue with displaying sprite animation once deployed to iOS. I can see flipbook in viewport fine, and when I hit play in-editor I can see it, but it is nowhere to be seen on iOS.

Any ideas?

Link showing sprite animating in standalone game (and random sphere which exists nowhere in project) Pasteboard - Uploaded Image

Thanks,
Doug

Hi Doug,

There are two common causes of problems in cooked games:

  1. There is a bug in editor that causes it to write to Saved dir instead of Config dir, which means that enabled plugins won’t take effect on cooked builds / other user’s machines if you use source control. has already been fixed in 4.3, but for now you will have to manually copy EnabledPlugins lines into your Config\DefaultEngine.ini.
  2. If you have a content only game (no C++ code), then only runtime plugins that can be used are ones that were enabled in BaseEngine.ini when UE4Game was initially compiled, as we statically link enabled plugins into monolithic executable, and linking only happens when you have C++ code. Since Paper2D is not enabled by default, it won’t work in cooked games in projects without C++ code. To work around (2), you’ll have to add C++ code to your project.

Currently Paper2D is slated to be enabled by default for 4.3, which will help with (2), although we’re still mulling how to handle case in general, since platforms like iOS don’t support dynamic linked libraries.

Cheers,