Project: Paper2D

, one of things I’m interested in doing is making Sprites ‘Explode’, or ‘Cut’ in half dynamically. (so outside of editor). My first thought was to just duplicate sprite with different geometry data for each ‘piece’, but based on your comments doesn’t seem to be possible at moment. Would you have any other suggestions about achieving ? I don’t think is really possible using Materials, and I wouldn’t mind doing work to make happen if you could give me some direction on where to start.

Thanks,

I found a solution for ! Not sure if its best solution. But basic idea is, I duplicate Sprite for each piece I want. (So lets just say we cut Sprite into Two), I’d duplicate Sprite Twice, then I generate an Alpha mask for each side (using dynamic textures), hiding one half and other, and bam, two pieces! You can do for any number of pieces with some math. Probably not perform-ant for a lot of pieces but I didn’t need them to break into anymore than 5.

Hello everyone,

As you may already know most if not all video games on a 2D plane have some sort of a slope https:// (skip all way 6 minute mark).
One of problems i have been facing since day one was how to make my player (flipbook) not lose touch with floor below.When you set up a flipbook inside a capsule component (and set up your origin points between animations so when they switch they stay on same place) what happened was my main character was hovering above ground because of the “Use Flat Base For Floor Checks”.

Unchecking brought flipbook closer to angled surface but no where near perfect since it needed to rotate a few degrees clockwise in order to look “realistic” (or other way around depending on where he is) and created a problem of him losing touch with floor while fast moving resulting in triggering his “Falling” animation.That was fixed by loosening up max step height,making it a bit more numb.

I finally decided to fake it like i did in my previous 2D engine by creating a trigger volume and when my player enters it i lerp rotate my actor.It works and looks good but if i try to interact with other objects that use same method all weird things start to happen because i guess whole movement idea was based on flat surfaces and system freaks out when it has to deal with rotated actors.Another huge problem that my system has it’s fact that i have to place volume triggers all over my levels and they must be aligned perfectly otherwise i will not get constant results.

I asked from Mr if he knows a way that we can get real time the "Walkable Floor Angle " data so i could create something that regardless slope angle it would work. Event tick—Get Walkable Floor Angle------ set actor rotation=Walkable Floor Angle.

But if we could combine all above with ability to rotate actual flip book inside capsule component (and not rotate actor) without touching anything else then i believe it would work like a charm.Of course ideal would be if you guys could figure out a way for system to do automatically by either using Box2d physics but constrained or i don’t know what else.It would literally help us to create easier and faster more cool games.

I attach a small video to demonstrate what i am trying to achieve. Everything you see here has no Physics interaction whatsoever which is a blessing to be honest because when i tried to use physics everything was jittering ,moving around inside locked Axis and many more.Maybe when we see full Box2D support everything will be a lot easier or maybe i am really bad with how physics work inside Unreal.In either case i would like Michaels opinion on how to improve above idea and how feasible is to implement rotation of flipbooks within a blueprint.

Please download and watch.Preview in dropbox is not really good.

Any information about flipbook keeping sprite collision feature coming soon? can i hope for in 4.6 ? :o

Any information about flipbook keeping sprite collision feature coming soon? can i hope for in 4.6 ? :o
[/QUOTE]

I think it will not come in 4.6 … tbh I don’t know what is current status of Paper2D and Epic team priorities. My guess is that they are concentrated in other areas

they said in twitch a couple of weeks ago that Paper2d is still fully in development but that has had something big happen in his life recently (they didn’t specify, only that it might be similar to having a baby?). Regardless, there hasn’t been a major commit in 2 months for , and 4.6 has already been branched. I think at point, only thing you can do is hope that that their is some ‘major’ commit that hasn’t been made yet…

Any information about flipbook keeping sprite collision feature coming soon? can i hope for in 4.6 ? :o
[/QUOTE]

day they will fix i will probably start dancing naked in street from joy!Right now none of core mechanics of my game work because of .

Is Paper2d a 1 man job?

1 superman job :wink:

has been committing some code (1 paper2d entry) so hopefully we’ll get some 2d goodness progressing soon. Good to have you around .

Just thought I’d let people know that I’ve submitted a pull request on that adds collision support to PaperFlipBookComponent:

/UnrealEngine/pull/593

I haven’t done any extensive performance tests or anything like that, but you’re welcome to try it out and see if it does trick.

Fellow paper2d users I have some exciting news to share with you in case you haven’t seen forum post.
https://forums.unrealengine.com/showthread.php?51552-Progress-on-Box2D-implementation-in-Unreal-Engine-4

I have a request which would be important for Paper2D on Android.

I see most “cross-platform” option for android is using ETC1 format compress. format do not compress alpha channel and then, when using Paper2D, sprites textures must be uncompressed before using them (therefore performance drop a lot). So, an easy and commonly accepted solution is to use 2 textures, one for RGB and other for Alpha, both compressed using ETC1. So each material would perform two textures fetches instead of one for each pixel but it would be very fast because it will use compressed textures (faster than uncompressing textures and filling tiny android caches).

I can setup myself but it would be really nice if was offered out of box within Paper2D tools !

Hello everyone, one of my 2D texture packs was recently approved on the Marketplace, and I was asked to prepare 663 PNG textures as 2D *Sprites *with collision objects.

PROCEDURE:
Based on the *Paper2D *content demo, I gather that I should assign following texture parameters to textures:
*- LOD Group: UI

  • X-axis Tiling Method: Clamp
  • Y-axis Tiling Method: Clamp
  • Filter: Nearest
  • Compression Settings: TC Editor Icons*

As for the *Sprite *settings, I have assigned a TranslucentUnlitSpriteMaterial to each sprite, since 1-bit masking isn’t suitable in case.

PROBLEM:
problem is that actual sprite is way too bright in editor, even though I have hidden post-processing volume as well as turned off lighting.
In addition, there are some artifacts on sprite.
Have a look at screenshot below to see what I mean.
problems occur no matter what sort of scene I add sprite to.
I have also tried to make a custom material that feeds texture straight into the Emissive Color (instead of into the Base Color) but I get same result.

Does anyone know how to fix these issues?

Thanks in advance :slight_smile:

(original texture is attached below - apologies for wide image attachments!)

Hello and welcome,

Two are possible reasons that your sprite looks more bright in editor.One has to do with Mobile HDR ON.You can find in settings menu.A second reason would be if you have TemporalAAA enabled inside your post volume process.2D image Color problem - Rendering - Epic Developer Community Forums dont know what happened to original OP and if he fixed his problem but in my case it made everything look correct.
Switch wrap to clamp.It helped me in more than a few situations to get rid of some artifacts.
Another thing to consider is : PaperSprite texture settings question - Rendering - Epic Developer Community Forums
It seems that things are not very well optimized for sprites since you either get blockiness or artifacts and washed out image quality.Maybe there is a workaround for but i never received an answer so i do not know.
I hope that something of above will fix your problems.If not post back and maybe will help you out since he is expert. :slight_smile:

Sprite brightness and artifacts

Hi , thanks a lot for helping out - that was very kind of you! (I don’t know why I had set wrapping method to *wrap *instead of *clamp *- well spotted!)

Unfortunately artifacts are still there and sprite is still too bright after disabling ‘Mobile HDR’ and adding a *PostProcessVolume *object with *TemporalAA *set to None.

I have also tried to turn all postprocessing and lighting options off via the ‘Show’ option in viewport but to no avail.

Here’s a direct link to small project (level that should be loaded is called ‘Start’):

I’d be grateful if one of you brave souls could take a look - just to verify that you’re seeing same problems on your PCs.

First of all change your Pixels per unit to 1.Your sprite was 156% bigger than your original png(2.56).I took liberty of importing your asset in my project so i can better help you (i hope you don’t mind :stuck_out_tongue: ) and i do not see any real difference like one you have in your project.Do my eyes fool me or it i almost identical?

Hi , thanks for your reply - I’m very grateful that you have spent valuable time on checking out in your own project. I hope I’ll be able to return favour one day.

It looks like you’re using a masked material which only supports 1-bit alpha clipping.

To make it look like my comparison screenshot above, you need to assign a *TranslucentUnlitSpriteMaterial *to sprite, since 1-bit masking isn’t suitable in case.

The *TranslucentUnlitSpriteMaterial *is available in the *Paper2D *folder (View Options -> Show Content).

You can see on large screenshot what texture is supposed to look like and compare it to what it actually looks like in editor:

&stc=1&d=1415792609

That being said, there is a glimmer of hope: If I ignore fact that material you assigned to bullet sprite only uses 1-bit alpha, bullet part of sprite itself seems to have correct brightness - certainly a lot better than in my scenes! :slight_smile:

Would it be possible to delete absolutely everything in your scene and upload it somewhere, so I can try to use it as a template?

If so, I’ll be able to compare all settings (as well as .ini files) to try to spot difference between your scene and blank default UE4 scene I’m using which seems to be causing problem.

Thanks in advance - I owe you several beers already! :slight_smile:

Thank you so much for your kind words!
Sorry about above picture but i didn’t notice that i had maskedunlitspritematerial when i took picture.
is correct one with TranslucentUnlitSpriteMaterial

Dont ask me what frack is going on!
And is one with one of my materials which is essentially above with a different name and a few different settings.

Perfect!!
To further try and help you i am sending you a project with my “custom” materials that solves your problem.I literally have no clue what is going on.I am just happy that it now works and you can finally go and sell your assets!

Edit:I am not sure if my material is included in project i send you or it is stored locally on my computer.If it is stored on my HD please tell me how to send it over to you because i have no clue how to do :slight_smile:

work, - it looks perfect!

I’d be grateful if you could upload material - that should hopefully(!) be last piece in puzzle!
Flipbook_Translusent_DefaultSpriteMaterial2

If you have same folder structure as I have, it should be be in folder:
UE4 Install folder\Epic Games\4.5\Engine\Plugins\2D\Paper2D\Content