PIE and cooking errors (Physx) on a paper2D project

Hello,

I would like to report that when i cooked my paper2D game with 4.8 preview 1 i saw a MASSIVE performance difference between PIE and Cooked game. For more information you can read here : Cooked performance and Paper2d. - Feedback & Requests - Epic Developer Community Forums

That led me to ask for help from Noland in hope that he could shed some light to the above problem. After following his advice and started looking at the i saw hundreds or even thousands of lines filled with errors like this one when previewing in PIE :

[2015.05.20-19.50.38:904][984]LogPhysics:Warning: AddConvexElemsToRigidActor: ConvexElem is missing ConvexMesh (3: /Game/Sprites/Spartan_NEW_sprt/attack_1/Spartan_attack_1_NEW__009_png.Spartan_attack_1_NEW__009_png:BodySetup_1382)

and this one:

[2015.05.20-19.41.23:172][942]LogBlueprint:Warning: Loaded invalid component bound event in node /Engine/Transient.EdGraph_4265:K2Node_ComponentBoundEvent_883

Now when i try to cook my game the output log gets filled with these errors:

0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_49_png.Axe_49_png 17 (FlipX:0). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:059][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_49_png.Axe_49_png 32 (FlipX:0). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:063][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexMeshBuilder.cpp (253) 32 : Gu::ConvexMesh::loadConvexHull: convex hull init failed! Try to use the PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolkit::createConvexMeshSafe)
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:063][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_49_png.Axe_49_png 17 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:065][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_49_png.Axe_49_png 32 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:073][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_48_png.Axe_48_png 32 (FlipX:0). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:078][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_48_png.Axe_48_png 32 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:095][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_46_png.Axe_46_png 28 (FlipX:0). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.29.37:101][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_46_png.Axe_46_png 28 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:897][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexHullBuilder.cpp (1116) 32 : ConvexHullBuilder::CreateTrianglesFromPolygons: convex hull has a polygon with less than 3 vertices!
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:897][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexMeshBuilder.cpp (253) 32 : Gu::ConvexMesh::loadConvexHull: convex hull init failed! Try to use the PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolkit::createConvexMeshSafe)
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:899][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_23_png.Axe_23_png 25 (FlipX:0). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:903][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_23_png.Axe_23_png 25 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:913][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexHullBuilder.cpp (1116) 32 : ConvexHullBuilder::CreateTrianglesFromPolygons: convex hull has a polygon with less than 3 vertices!
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:913][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexMeshBuilder.cpp (253) 32 : Gu::ConvexMesh::loadConvexHull: convex hull init failed! Try to use the PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolkit::createConvexMeshSafe)
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:914][ 0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_22_png.Axe_22_png 26 (FlipX:1). The remaining elements will not get cooked.
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:921][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexHullBuilder.cpp (1116) 32 : ConvexHullBuilder::CreateTrianglesFromPolygons: convex hull has a polygon with less than 3 vertices!
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2015.05.20-20.30.00:921][ 0]LogPhysics:Warning: PHYSX: …..\PhysXCooking\src\convex\ConvexMeshBuilder.cpp (253) 32 : Gu::ConvexMesh::loadConvexHull: convex hull init failed! Try to use the PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolki
MainFrameActions: Packaging (Windows (64-bit)): t::createConvexMeshSafe)

When the game is finally cooked and i double click the created .exe my game crashes immediately without giving me any explanation whatsoever .

I do not know if all the above are related ( in 4.8 i could cook and run my game but the performance was terrible,in 4.9 i get errors , it cooks but it crashes) but there is definitely something wrong hidden in there.

Thank you.

Hi ,

Do you mind attaching the entirety of your output log to this thread as a txt file? Are you using a custom Frontend/Project Launcher profile to cook or the command line? Are you seeing the same performance issues if you package the project entirely and run the .exe?

Thanks much!

Hi wit!

The way i cook my game is through the editor.Nothing special. I just choose development (or shipping) build and pick windows 64bit. Windows 32bit crashes even with 4.8 Cooked game crashes when i run it - Platform & Builds - Epic Developer Community Forums

The performance issues are ONLY with the packaged (cooked) game.If i run my game from the editor either as a ‘standalone window’ or a ‘standalone game’ everything is perfect.Performance, no screen tearing no cpu stalls etc. On the contrary the one and only cooked build that i managed to run (4.8 preview 1 64bit development ) was suffering from everything described above and since i’ve upgraded to 4.9 i am unable to run the .exe without my game crashing so i cannot comment about performance.

https://www…com/s/scb8io7e2evy4pb/Cooked%20Error%20.log?dl=0

Ok, I see. I was confused because what you’re doing is a full package; cooking is something a little different ([scroll to the bottom of this documentation][1] for a quick explanation).

We’re gonna stick to 4.8 if you don’t mind because 4.9 master is very unstable as the vast majority of work right now is going into the soon-to-release 4.8 update, and there’s just too many variables to pin down at this point.

Your above linked AnswerHub thread was in reference to a crash in 4.9, correct? Can you give me for your 4.8 build crash if that is also crashing? Both output and crash would be very helpful.

Thanks!

Packaging Unreal Engine Projects | Unreal Engine 5.1 Documentation

I am terribly sorry if i confused you some how.From now on i will call it “full package”!

Unfortunately i was going through my backups in hope to find that full package build(4.8) but after all that disappointment i thing i deleted and uninstalled 4.8 preview 1 right away and went back to git hoping that miraculously all my problems would be solved.

A logical step to take in my opinion would be first and foremost to pinpoint why unreal is giving me all those warnings and errors. If we figure that out and i can complete a full package without any errors then we can proceed to the performance issues. Personally i think that the huge performance hit is because the packaged game has so many errors inside it.

What is a convex and why it fails on a paper2d project? Why i get a million “invalid component bound event”? What is causing it? And last but not least what physx has to do with my sprites?

On second thought i believe that this ":CreateTrianglesFromPolygons: convex hull has a polygon with less than 3 vertices! " has to do with the changes that Noland made regarding collisions in 4.8. Taking a closer look it only pops up that message for sprites that collisions are set to automatically detect the shape of the sprite. So he must have broken something when upgrading to the new collision geometry system.

OK, my hunch was right. It appears that all of my shrink wrapped sprites were broken after updated the way collision shapes work with sprites.

After re-doing them it stopped giving me the Physx errors and now my game compiles,does not crash when running the .exe and performance is fixed! I believe that the performance issues were caused by the broken Physx (that runs on cpu threads in unreal) collisions, that they were forcing a cpu meltdown.

Having this sorted out would you be kind enough to ask the developers (there must be someone out there that actually typed this error) why get thousands of these? LogBlueprint:Warning: Loaded invalid component bound event in node /Engine/Transient.EdGraph_4265:K2Node_ComponentBoundEvent_883.

If someone could point me to the right direction we might be able to troubleshoot this as well.

Hey ,

I have spoken with the developers and it looks as if you’re referring to a bug that’s already in , which is referred to as: UE-16304. Unfortunately, this issue has not been resolved as of yet, but it’s expected to be implemented into the changes for 4.9.

If you have any further questions, please let us know. Have a wonderful day!