Project: Paper2D

@XAKLSE @ @HavocX @, Guys is it me who is a Monkey :stuck_out_tongue: ?

i’m trying to create a Dynamic Material Instance with Sprite of my Paperflipbook character component…i have modified Custom Sprite Material, one in Paper 2D Template who blink Unreal Gold Coin.
In Material, i have simply added dynamic value instead constant value to be able to modify Glow dynamically .

things is actually when i connect a simple paper Sprite into my create dynamic material instance node, sprite is correctly affected by my parameter change, but if i connect a Flipbook , nothing work, so i guess there is something i’m missing :cry:
can someone could bring me light about How having a flipbook “basically a sprite animation” affected by a Dynamic Material Instance…

Thanks

Where can I find blinking coin and “Custom Sprite Material”?

Edit: Ahh… you mean Paper2D level in Content Examples pack! Can you post modified material?

Hi Golgoth,

You need to set your custom material on flipbook component instance in 4.4; there is currently no material override inside of flipbook asset, and it doesn’t use source materials from individual frames either, but instead relying 100% on material set on flipbook component. I’ll be fixing for 4.5 (probably today actually).

Cheers,

Hey ,

Can you file progress bar thing as a request on AnswerHub? That’s a general thing with using Property Matrix, not specific to Paper2D.

RE: 150 taking far longer than 50: there shouldn’t be a performance cliff in raw sprite numbers, my guess would be that some of additional 100 sprites had much larger textures than first 50, and you have either render or collision geometry set to analyze textures (e.g., tight bounds, shrink-wrapped, or diced, all of which have to read pixels inside of source rectangle to work).

Cheers,

,

Can you hit Eject when you’ve got crate in a bad position, and move camera around in 3D to see if it’s actually rotated in 3D or if it’s just a z-fighting issue. If it’s just a z-fighting issue, then you should be able to push crate back or forwards a bit in Y to make it always in front or behind your scenery. If it’s planar rotation constraint being violated, please try to get a repro case and Ori can have a look to see if we can improve it.

Cheers,

Hi Golgoth,

template is working as expected and probably won’t be changed more RE: replication. If you want to have two match identically then you either need to send a RPC back to server when a client changes animation it is playing, or have animation selection logic run locally on each machine, rather than in response to key input ( is how anim blueprints typically work). Either way should work fine in 4.4.

Cheers,

behavior is indeed because of the “Use Flat Base For Floor Checks”, which essentially uses a box encompassing character when testing for ground. was added to keep character from going progressively lower as they move off edge of something.

One thing to try might be making height of box adjustable. A box that doesn’t go completely to bottom might work, so you test using a box if capsule collision point is outside a certain radius, but use capsule collision if inside. Like so:

flatbase.png

Edit: And is what it would look like on ledges:

Could you provide solution?

Hi Golgoth,

You need to set your custom material on flipbook component instance in 4.4; there is currently no material override inside of flipbook asset, and it doesn’t use source materials from individual frames either, but instead relying 100% on material set on flipbook component. I’ll be fixing for 4.5 (probably today actually).

Cheers,

[/QUOTE]

Hello !!!

Hope you’re fine ! thanks for your answer, i’ve already set my custom material on my flipbook component…point is , i simply need to GLOW and change color of Sprite when i hit them, rest of time those parameter “scalar for glow” are not affected…
so if i well understand for now there is no solution to do simply right ? i’m speaking about glow, because regarding sprite color it’s ok

Thanks Havock for your answer, i could post modified material but there is nothing really different instead i’ve changed glow constant, by a “material expression scalar parameter”
and yep i’m talking about Material in Paper 2D Level, one who blink Unreal Coin :stuck_out_tongue:

Damned i’m looking for a way to glow my flipbook sprite :cry:

,

Sorry, it looks like clean generic way of doing isn’t possible in 4.4, as there is no Blueprint method to apply a new material instance to a flipbook. For 4.5, I’ve changed flipbook components to derive from UMeshComponent, and all of standard stuff should work fine for them now.

However, you can still accomplish your goal in 4.4 using sprite color and a custom material, as long as you don’t need more than 4 low-precision ‘parameters’ to your material. I’ve attached an example of a material that uses R to set pulse brightness, and G to set pulse rate. If you apply material on a flipbook component in Blueprint Components mode, then you can use SetSpriteColor to enable/disable pulsing effect (and you probably want to set default color to black to disable it).

In general, you can treat sprite color as an arbitrary per-instance low-precision vector4 parameter (low precision == they’re sent down as 8 bit 0…1 values in 4.5 and above), they don’t have to be used for a color in material.

Cheers,

Just double-checked, and nice easy approach does work @head now, so it’ll be easier in 4.5:

Cheers,

I’ll provide my solution, I’m not sure if it’s the solution of all solutions though. :wink:

First you need to put a socket on lower extremity of your character.

platform blueprint has 2 components: a box trigger and Paper Sprite. I hit Alt+K in component viewer to switch to side view. trigger is just slightly larger than sprite.

Here is Event Graph of my blueprint!

If you want to do moving platforms, I used an Attach To node in construction script to attach trigger(connect to Target) to sprite(connect to In Parent) and I used keep relative offset.

If you want be super careful about memory usage, I suggest you make 2 versions of blueprint, 1 with Sprite and Trigger set to movable and another where they are both set to static.

For your convenience I’ve uploaded a TXT file with entire event graph. Don’t worry about trying to mimic what I did!

Hope helps you. :slight_smile:

Thanks for your Time on Topic and of course for your Work :p, i’ve tested your solution with Custom Material it work not as one in your Paper 2D Template for Coin, So i will await 4.5 but Again Thanks for your support
Any Estimate Release Date for 4.5 BTW ? Also in 4.5 it could be great if you could add some Sprite Material with Some Commun 2D Effect needed, Glow, Haze, because even in my case if i’ve time to learn, i think all New user without 3D knowledge on Material could found difficult or simple not Easy to use way of building their own Material even if of course it’s amazing i mean in a simple way.

Hey , Thanks for your answer,

i’ve now All my Animation greatly replicated except one but i would like to Ask you, if you have time of course :stuck_out_tongue: to check “if never know” there is not something Wrong with the “Flipbook Looping replication”, because for a reason i ignore for now, i’ve feeling that looping is not correctly replicated.My Jump Animation loop on Client without any logic as specified loop disable, but i need to investigate , just never know if you want to do some test on your side before 4.5 release.

Flipbook in hud

, i know, i know, so many question from my own :stuck_out_tongue:

Can you tell me if it’s currently possible to have a Sprite Animation into an HUD ? because at moment except draw Texture , it seem i can’t have an HUD including some 2D Animation right ?
thank for your time

Hi ,
I’ve manually made change indicated in CL you linked to, but I did find I needed to drop horizontal cell size to 5 to get anything generated, and as you can see it’s generating at underside of sprite.
Are there any other changes I would need to make to get sprite functioning as expected?

Hey everyone,

has been driving me crazy lately. But it appears if I add a Flipbook actor, component, or whatever, it can not receive click or touch events. only way I have found around , was to make a Sprite Actor as a parent, then make a flip book as a component under sprite, set sprite to one of frames of animation and make it ‘invisible’. result is I only see animation, but I still receive touch because of invisible sprite. Is there a better or different way to solve issue?I tried using a box, but it didn’t work either.

Thanks,

Not right now, although flipbook thumbnail renderer does something very similar, see code there for an example:

void UPaperFlipbookThumbnailRenderer::Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* RenderTarget, FCanvas* Canvas)

thumbnails for flipbooks and sprites currently ignores material on asset though, not sure if there is a suitable HUD draw function or not.

Cheers,

All I did in that scene was drop a nav mesh bounding volume and adjust it to be same size as background (but deep, since navmesh is still tied to XY) and increased CollisionThickness on platform sprites (don’t remember exactly how much, but default value was probably narrower than default navmesh query size).

Cheers,