Since then i conducted some more experiments and it appears (to be honest i didnt know that,but it makes perfect sense to save resources) that engine is capped at 120fps. When i set ‘t.maxfps 400’ my game was exceeding 300fps in some areas with my gtx980. As a comparison cooked game can barely hold 50-55 fps and every second or so it drops as low as 15 and gives me something that appears to be a cpu stall because everything freezes for a while. Needless to say that game is unplayable.
Another thing that puzzles me (as i have mentioned in my feedback section post) is screen tearing. How is it possible for my game to run at 120fps in either new editor window or standalone game with zero artifacts and cooked game to suffer so severely? Does it use a different renderer? Are there any settings that i must enable?
I believe that is a very serious problem and as always i am here to try and help you with anything you might need.
Do you see a difference in performance when running a standalone game versus editor, or only in cooked builds? Running with -game is a lot easier to test and iterate on than cooked builds and should be pretty similar.
Have you done any profiling yet? Use Stat scenerendering to compare same scene when it is fast versus when it is slow. If number of draw calls is dramatically different, you may have things instanced or loaded multiple times somehow.
Stat dumphitches will write a stat capture of all events above a certain threshold to log whenever you hit a slow frame. is first go-to tool for tracking down hitches, and should tell you exactly what your once per second hitches are doing.
I just started get to grips with profiling and these are results so far:
I see everywhere these kind of messages*** [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)***
It appears that most of my sprites give a log physics warning. I do not know what it is but it doesn’t sound good,does it?
Another warning that fills up my log is :*** [2015.05.20-19.41.23:172][942]LogBlueprint:Warning: Loaded invalid component bound event in node /Engine/Transient.EdGraph_4265:K2Node_ComponentBoundEvent_883***. Again i could use your help because i have no clue what is going on. One thing i have noticed though is that from 16/5 and on wards all master branches seem to break some of my BP’s
All above are from PIE and not cooked. I am trying all day to launch a cooked build of my game but unfortunately on double clicking .exe it just crashes ,without even giving me a description of why it is crashing .
Dont know what to do…
EDIT: I get TONS of physx errors during cooking:
0]LogPhysics:Warning: Failed to cook convex: /Game/Sprites/Axe_sprt/Axe_49_png.Axe_49_png 17 (FlipX:0). 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). 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 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). 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). 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). 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). 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). 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). 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 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). 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). 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 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). 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 PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolki
MainFrameActions: Packaging (Windows (64-bit)): t::createConvexMeshSafe)
I’m not familiar with either of those errors. Can you create another AnswerHub thread for PhysX packaging issues? Not sure if it should be one for PIE issue and one for cooking or if it’d be best to merge them together.
Hello Guys! I’m working on 2d poin-to-click adventure :). So I’ve got problem with mouse input, I think is because of I’m using ‘simple move to location’. If I’m cicking above certain ‘z’ coordinat (in location z=370) I’m getting coordinats but my character doesn’t want to move, so if ‘z’ of clicked position less ttan 370 it’s fine. Where can I adjust that? I breaking my head for several days) I looked at movement capabilities, changed agent height and radius and it didn’t helped. Probably I should use ‘move to location’ instead of 'simple move to … ’ and make an AI controller at put it in my character? Here some pics:
And just one more question: probably I missed that information, but when we will be able to use skeletal animation for 2d?
P.S. Sorry for my english, if it was that bad) and thank you!
I have no idea either, I saw tweet about it last night as well. It looks like tool has an English site OPTPiX SpriteStudio | OPTPiX and integration is on /SpriteStudio/SS5PlayerForUnrealEngine4 if you want to check it out.
I’m not sure about SimpleMoveTo issue, maybe there is a threshold of maximum vertical distance above which it fails to path. Are there any log messages when you click up there? One thing you might consider trying is to project a vertically downward from your click point and try moving to intersection point of with ground, rather than origin.
RE: Skeletal animation, it is currently backlogged so I don’t have a time estimate as to when it will be supported natively in engine. SpriteStudio just posted an integration it seems, and Spine have discussed making one in past but I don’t know if they are currently working on one. I’ve checked in a proof-of-concept of importing ones from Spriter but they do not render yet and I won’t be working on it in near term.
Now that tilemaps are coming out of experimental, can we get a top down/rpg/roguelike tutorial? Something small that handles setting up character, removing gravity, and working with collision would be . I see a lot of people about it on forums/answers/reddit and they just get pointed towards sidescroller, which doesn’t cover a lot of what is needed.
Well done, I feel a little stupid now, that’s pretty obvious. Thank you for your detailed explanation, I will give it a go when i get a bit of free time
If you or anyone else has any other tricks I would love to hear them.
Note: You can define collision offset and collision height on a per-layer basis in 4.8p3 and newer, which I use here to offset ground plane collision to be flush with render surface, and make wall tiles stick up high enough to block player. To edit tile collision, select a tile in tile set editor and add a box or whatever. You can flip views around to make single tile edit window larger using “Swap Views” button, and you can see which tiles already have collision using “Colliding Tiles” button.
To be clear, you can do right now, including animating their location/rotation/scale* by using sockets, you just cannot animate their shape or visibility. workflow isn’t great but it’s usable. Define a socket for each box you want to attach and position it in each sprite asset. Then, in a Blueprint that contains your flipbook component, you can attach Box components, Sprite components, or even other Flipbook components to those sockets.
: Rotation and scale* had to be defined in details panel in 4.7, but can be edited using transform gizmo in sprite editor 4.8. Sockets can now also be viewed (but not edited) in flipbook editor as of 4.8.
**: You probably want to stick to uniform scale if you use scale.
After closer inspection i noticed that physx errors were caused by sprites that were shrink wrapped. It appears that after you updated way collision shapes behave with sprites shrink wrapped ones did not update causing all that huge performance drop in my full packaged game!
After i re did them .exe stopped crashing and performance was identical with PIE versions of game. Because maybe Physx was trying to calculate corrupted values was bottle necking my cpu ?
I still get many thousands of these though: LogBlueprint:Warning: Loaded invalid component bound event in node /Engine/Transient.EdGraph_4265:K2Node_ComponentBoundEvent_(xxxx).
One think that hasn’t changed unfortunately is screen tearing. There is something super weird going on and maybe you could help me out. If game is not full screen then it has no screen tearing regardless FPS. If game runs full screen (xxxx resolutionf) and is capped at 60fps (my monitors native refresh rate) then game renders terribly. If i set a ridiculous amount of fps cap like 400 and game reaches its maximum frame rate possible (regarding hardware and scene complexity) then screen tearing is gone! Even if i cap framerate 1fps less than maximum it can reach i get screen tearing.
How is it possible that my gpu outputs (in some areas) >280fps and my ~60hz ips monitor is not giving me v-sync issues and if i match game fps with my monitors capability to witness all those artifacts? Am i missing something on how things work or it sounds unnatural to you too?
Thanks!
EDIT: These are my findings about cpu stalls.They are absolutely random and sometimes i can play my game for 20 minutes without a single hiccup and other times i get them every few seconds. slate part i understand. It must be hud bp class(i dont use UMG, yet) What about others? Any pointers on what to do to cure irritating situation? Does any of has to do with GC? It sucks for any gamer to die (especially when he is next to physics objects they go crazy! It has to do with substepping i think) from cpu stalls.
reason your move requests fail “above a certain line” is your navigation system’s settings. Whenever a pathfinding query is issues goal location is being projected to navmesh. projection has a limit and that’s why points too far above ground will fail as move goals. To tweak that go to Project Settings -> Navigation System and tweak supported agent’s default query extent (you might need to add a supported agent first, just add an entry to Supported Agents array). You should be fine with expanding just Z-size of extent.
First off I want to say thanks for all so far Epic. I have a question about normal mapped sprites in 4.8. So far they work perfectly dynamically lit right after import and after extract. But when used in a flipbook they are used as unlit. flipbook is set to movable as well as lights. I was wondering if I am missing something. Thanks again Epic!
Hey & UE4 team, my team is evaluating UE4’s Paper2D, specifically its TileMap features, and had a few questions if you don’t mind us .
Can TileMaps be created at runtime? For example, running a procedural algorithm and mapping its results to a TileMap. would mean setting size of map, its layers, location of specific types of tiles, etc. via code at runtime. Are these functions available in C++/BP?
Is it possible to cull non-viewable tiles? I ran a test of 1,000 by 100 TileMap and noticed that moment a few tiles come into screen, entire 100,000 map is loaded, killing performance. Can I render only specific tiles from a TileMap at a time?
If part or all of above is not possible at moment, any plans for them in immediate future? Thanks in advance!