Project: Paper2D

In 4.3, you can just do following if it is already playing:


FlipbookComponent->SetLooping(false);
FlipbookComponent->SetFlipbook(NewFlipbook);

You can also do Play() or Stop(), etc… I have tried to give it same public interface as a UTimelineComponent.

Cheers,

@
Greetings. I have some questions related to Paper2D, since I can’t lay my hands on it atm…

  1. Are You generating ribbon mesh for spline?
  2. Are You using Delaunay triangulation for it?

Not exactly. It splits spline up into individual segments based on rules, and then assigns sprites to each segment to fill up length. Once that is done, it stretches sprites so they fill full distance, and deforms them to match local NBT frame of spline at projected offset (for each X position in sprite vertex data, figure out local frame and loft Y accordingly). deformed sprites are written into a local list of triangles, it doesn’t actually use a separate sprite component for each element on list. You can still end up with some funky results for tight curves on spline, so I’m open to suggestions on a better approach. At least I’d like to detect overlap in those cases and resolve it by splitting difference.

perimeter doesn’t do any triangulation at all, but interior uses editor triangulation code which works via ear clipping. I’d like to switch to a better algorithm like Delaunay to avoid creating sliver triangles, but haven’t had a chance yet to try something better.

sprite editor when set to fully custom also uses same ear clipping algorithm for triangulation to generate render results or collision meshes.

Cheers,

How’s status on a Tile/Tileset Editor implementation for Paper2D? Mostly looking forward a Tileset Editor Tool :slight_smile:

, in 4.2.1 release (I haven’t tried to 4.3 pre-release yet). I’m unable to anything to show up when launching a game, Paper2d sprites. But it works fine when just using simulators and I see everything. I’m unsure if there is suppose to be a setting or something that needs to be configured first to get it to all work, I’m wondering if I should just go ahead and move on to 4.3 pre-release :). I posted issue on answers here: Black Screen on Paper2D - Asset Creation - Epic Developer Community Forums. But I wasn’t sure if I would get an answer on there since paper2d is still experimental.

[QUOTE=;88457]
Nothing is currently set up to replicate; correct approach would probably be to replicate flipbook asset pointer, position, and a few state bits (bPlaying, etc…). I don’t think I’ll be able to get into 4.3 branch as we’re trying to reach RC0 soon, but I’ll make sure to take a look at it for 4.4. If you want to cheese something together before then, you can try (on authority only) copying GetPlaybackPosition() and GetFlipbook() each Tick into variables set to replicate on your Actor subclass.

1 - , following your comment on animation replication, could you have a look on my attached picture, i’ve created two variables , but i’m not able for now to set correctly “get flipbook value” because there is no possibility to link a target to component, and so i’ve an error during compilation. Maybe there is something i’m missing because i can’t find which node i shall use to set up and get back value (that’s reason a node is missing on picture) and/or maybe you’ve simply forgot to expose a target on “get flipbook” :stuck_out_tongue:

2 - Also could you tell me, let say i’ve got these two variables how from your point of view i’m supposed to expose those variables ? because it look like in specific case only “authority” will decide which animation should be play on peer users and I’m thinking in my game i’ve used for my character different “states” through an “enum list” (ie state: jump, walk, fall etc) so i’ve got a “character states” variable who could be set as replicated as well. and as In each of my character state, i specify which flipbook should be play, there is maybe something on side to do…

Thanks for your time and your help on topic

I just switched to 4.3, and it fixed my issue. It must have just been to do with Paper2d still be experimental in 4.2.

I just replied on AnswerHub thread, but there were some general browser issues in 4.2 that cause issues in cooked builds. Those have been resolved in 4.3, and Paper2D now defaults to enabled as well, which works around another issue with runtime plugins that hasn’t been resolved yet.

Cheers,

Hi ,

Sorry, very little tile map editing stuff made it into 4.3. I did do some data reorganization to lay groundwork for editing tile maps as assets and supporting more features to get closer to feature set of Tiled, but no front-end UI work.

  • Paper2D: Moved tile map data from component to a new class UPaperTileMap, and added a per-cell tile set pointer

Cheers,

is an outstanding bug with BlueprintPure functions on a different class, where it is too aggressive in trying to hide Target pin. You can work around it by dragging off of a FlipbookComponent reference, and then in resulting menu, uncheck ‘Context Sensitive’ before searching for Get Flipbook. will drop a GetFlipbook node that has Target pin wired to component you dragged from. Afterwards remember to recheck ‘Context Sensitive’ to avoid confusion. I think will be fixed in 4.4 as BP team is heavily refactoring context menu building code.

I’m not entirely sure what you’re here.

Cheers,

If I enable camera lag in spring arm component, flipbook oscillates side to side as character is moving. Any ideas about what could be going on here?

(see gif)paper2dlag.gifpaper2dlag.gif

Also, I havn’t had a chance to look into , but when there is sub pixel movement, either from camera or from character (ie when position are not integer values) then there is slight movement of pixels which is probably due to pixels being sampled. is there a way to force character movement component, physics capsule and camera component to only evaluate on integer units to simulation 8/16 bit games and to also limit sprite rendering onto actual pixels to prevent resampling?

I have my sprite at 1 pixel per unreal unit and set to nearest neighbour filtering but I’m guessing that allowing character to exist at floating point positions might cause undesired flickery issues when deccellerating and camera lag settling down?

Hi ,

I wasn’t able to reproduce by turning on camera lag on CameraBoom component in template. Could you open up your flipbook and make sure that pivots of all of individual sprites are consistent in run animation? It kind of looks like one or more of frames are horizontally offset.

Cheers,

There’s no way to do systematically right now, although you can do it manually for character and camera by adjusting relative position each tick to get world position to be on a nice boundary. I’ll add it to my list to consider if it’s possible to do at render thread level for all sprites as a project setting.

Cheers,

It’s actually only one sprite in flipbook. I’m not at my computer right now but I think I dragged out frame duration in sprite editor (not sure why). I’ll check where offset is in sprite too but it was left at default from when it was extracted. It was happening to running man sprite that was in template too.

Yeah more I think about it, I probably wouldn’t want velocity and acceleration calculation to be non floating point. It might be simple enough to do it in blueprint after add movement to input and simply round/floor pawn position. Don’t want to be fighting physics collisions though.

I’d probably leave pawn position alone, and instead adjust position of sprite attached to it, so you are only affecting visuals (currently flipbooks aren’t providing collision, it uses capsule component instead).

Cheers,

I tried in a build from main branch from Monday; I’ll try in 4.3 when I get a chance and see if there is some different behavior on spring arm component or something, but nothing looked obvious from p4 history.

Cheers,

As said, could you clarify a bit what you’re wanting here? Are you how to allow a client to decide which animation to play? How to make states decide every animation to play?

@: I just tried with 2D side scroller template in 4.3 preview build from launcher with camera lag enabled at 1.0 speed and didn’t see any jittering.

Cheers,