Decals are thin stripes in 4.11

Hello!
When I add blood splats to the game via spawn decal in a Blueprint, before 4.11 the scaling worked as intended and I was able to produce nice and big blood splats. After upgrading to 4.11, all blood splats look like thin stripes.

Here is a screenshot and the blueprint attached.

Hi Blue,

I’m not seeing any difference in my setup from 4.10 to 4.11. I get the same results regardless.

Are you able to reproduce this in a blank project with simple test assets? If so, please attach that project here along with any relevant information and repro steps and I’ll have a look.

Thank you!

Tim

The decals seem fine as long as X Y and Z are the same value. Changing Z to something below 0 should only affect their height, but it affects their overall shape, which seems as not intended.

For some reason trying to change XYZ to the same value on a larger texture does nothing and it still shows up as a thin stripe.

I’m still not seeing the same results. I plugged a separate Random Float in Range into each decal MakeVector axis. Different values for each using a Print String to verify.

If you have an example project created using basic assets in 4.10 that when converted shows the issue I can take a look, but right now I’m not seeing the same results though when comparing my setup to 4.10. It’s possible that there is something more specific going on, but without exact repro steps, or a fresh sample created in a blank project it’s hard to narrow down and see if this is a legitimate bug or not.

Here is the download link to my example project. This was created in 4.11 and shows exactly what I mean.

http://www.paulinthenet.de/files/decaltest.zip

To eliminate the issue, go into the player blueprint and change the decal Z scale to 100 to see the difference.

I am having the same issue, upgrading from 4.9. It seems it has something to do with the Z size. Waiting for a response on this, thanks!

Similar issue, my decals were all scaled way up. I had to divide my scale vectors by about 1000.

Perhaps I’m doing something strange?

UDecalComponent* Decal = NewObject();
Decal->SetAbsolute(true, true, true);
Decal->SetWorldLocation(InLocation - FVector(0, 0, WheelRadius));
Decal->SetWorldRotation(GetActorRotation());
Decal->SetWorldScale3D(FVector(20.f, 12.f, 10.f));
Decal->RegisterComponentWithWorld(GetWorld());
Decal->SetDecalMaterial(DecalMaterialInst);
Decal->SetLifeSpan(5.f);

Thank you Blue669. I’ve submitted UE-29104 for this to be investigated. Once there is any relevant information I’ll pass it along.

-Tim

This bug is in stock ShooterGame 4.11 so it should be clearly visible.

You’re fine, some changes have been made to the scaling in the decal creation code which is affecting this.

For anyone troubled by this bug, here’s a (most likely temporary) fix:

Head into GameplayStatics.cpp and find CreateDecalComponent() around line 1112. At the top of the method, add this:

const FMatrix DecalInternalTransform = FRotationMatrix(FRotator(0.f, 90.0f, -90.0f));

Further down, replace the following:

DecalComp->DecalSize = DecalSize;

With this:

DecalComp->DecalSize = DecalInternalTransform.TransformVector(DecalSize);

Now your decals should render like before. Have fun!

The is is the new more consistent behavior.
The X axis is the decal projection (see decal actor or decal component)
and it can be scale with (depth, width, height), not (width, height, depth) how it was before. Sorry, but you have to change your content (or add the workaround that was mentioned above).

Thanks! Someone should fix ShooterGame though because it uses the old scale.

You need to either follow Martin Mittring’s advice or implement the changes I outlined above.

So im confused what do i need to do to fix my decals so they arent skewed like the above?