Project: Paper2D

Made some more progress with atlasing issue.

Only happens after cooking a build - both iOS and Mac at least, will test on pc soon. Occurs frequently in 4.8 and 4.9

Any ideas why atlased sprites would fail after building?

4.9 and paper2d performance issues continued…

In small video i would like to demonstrate frame rate fluctuations that cause my game to be unplayable.
I have an empty level with 4 sprites as floor and player start. Every few tenths of a second we can see framerate dip. Now if i pause game same exact thing. While game is paused only thing ticking is paused menu blueprint that loops a flipbook.
With experiment that has nothing but 1 blueprint and 4 sprites on screen i would like to show Devs and in particular that there is something really wrong with Unreal and paper2d.
Please do something about it. :frowning:

I just tried UnrealStickFigure2D project from marketplace in 4.9 (built from 4.9 branch), I did not notice framerate dip.

Have you tried run your project on another machine?

atlas problem can be reproduced as follows:
In ProjectSettings->Plugins-Paper2d enable “Enable Sprite Atlas Groups”

Import a texture, create a sprite.
Assign sprite to new atlas group.
Play In PIE, everything is fine.

In any cooked build, sprite is messed up.

Looks like either it is using original Source Texture instead of new atlas , or it is using atlas but uvs are incorrect.

Thanks for any help/guidance.

Collision problems continued…

I don’t know what to do anymore. If i choose anything than default “tight bounding box setting” then both “on begin” and “on end” fire simultaneously!

For temporarily workaround, you can try fix here: /marynate/UnrealEngine/commit/70cd0fa29052f65511e97a0c2973fa9392188941
(It seems to me Atlas Group feature is still WIP, so you probably will bump into other issues here and there. )

Feature request for paper2D or 2d in general.

Example: _YAEn1iR5iA

Thanks Nate :slight_smile:

i bet that will fix it - will try it out…

Thanks again for your help

Hello everyone,

I don’t know If that question was already answered before, I didn’t read all topic,

We have been working in a project with paper2d during a while and overall it’s great. But we have a lot of physics issues.

Is there any intention to completely add box2d to ?
If not, how difficult should be try to do it by ourself? Bearing in mind that we would integrate in unreal engine and only features we need and want.

I know use/integrate box2D as external tool wouldn’t be so hard in a normal basic engine, problem is that I don’t know how hard is in unreal.

Thanks!

In name of Zeus!
4.9 Preview 3 fixed marquee and actor placement problem! :smiley:

Let me check for other ones…

Collisions are still messed up.
Shrink wrap fires both OnBegin and On End and sprites that have no collision when you drag and drop them into a level they still get a block all collision setting.

Hiya

I’d like to bring up something I mentioned a while ago. Would it be possible to please have a control on terrain splines for control over resolution of render and collision geometry?

It would be nice to get a bit more fidelity out them and it also affects gameplay as collision is quite low resolution.

Cheers
Dan

terrainsplines.png
terrainsplines.png

Hi

Quick question if you don’t mind…

If I want to change resolution of render and collision geo, is function that I need to modify? (specifically last argument)…


static void SimplifyPolygon(TArray<FVector2D> &SplinePolyVertices2D, TArray<float> &SplineEdgeOffsetAmounts, float FlatEdgeDistance = 10)

It is called in InsertConvexCollisionDataFromPolygon() and OnSplineEdited(). If I create a float UPROPERTY and use that as a multiplication factor on FlatEdgeDistance argument, will that get me what I’m after? I’m going to give it a go tonight but just thought I’d ask as it looks like where geo is being made.

Cheers
Dan

I managed to get it working!

It was a combination of FillRasterizationTimeRate (which generates higher res geo) and extra variable I made which is provided as an argument to SimplfyPolygon function to reduce geo. way I have nice detailed geo on sharper angles and less on flatter areas.

terrainsplines4.png

I could push it back through git if you’d like.

I’ve made a pull request for small code change…

/EpicGames/UnrealEngine/pull/1489

Cheers
Dan

maybe UPaperTileMap could be a BlueprintType?

Hi all,
(Since I don’t see answering from some time, I like to ask/share to anyone that have a hint)

Parallel to my 2D game i’m maintaining sprites benchmark to test many things

And one of main questions I wished to understand is how sorting of translucent sprites is done? I don’t mean from what criteria; I know you can set axis, distance… etc… What I’m wondering is if is always a sorting algorithm occurring with our sprites we need it or not, which algorithm is it, and if we can disable it?

In my example project above when I hit 3,000 sprites it become painfully slow… Is engine still trying to sort (with QSort or something) all that 3k sprites even if all of them are at zame Y=0 value?

There is any plan to implement actual Layers where all sprites contained in same layer do not need any sorting?

:wink:

Actually before went AWOL he created something called ‘sprite merging’. Pick all sprites that you want to be in same z order layer and right click. From there choose merge sprites and system will render them as only one draw call.

patch at /marynate/UnrealEngine/commit/70cd0fa29052f65511e97a0c2973fa9392188941 is required to package atlas on ios. Unfortunately it was not included in 4.9 release.

It is a very very minor change, any chance can get added to release branch sometime?

Hi, thanks for your quick reply!

I can’t find that “sprite merging” option on right click, but anyway I suspecting that will not work for my project if merging takes all my sprites and make a solid group.
My sprites in fact are independent blueprint instances spawned at runtime with a PeperSprite component and they need to be allowed to move/animate independently.