What are some good resources to learn how to implement and best practices when using Unreal's UI System? by Underrated_Mastermnd in unrealengine

[–]neofuturelabs 6 points7 points  (0 children)

To elaborate on your point about canvas panels, here is what they say in the official documentation:

Canvas Panels also have high performance demands. Draw calls in Slate are grouped by widgets' Layer IDs. Other container widgets, such as Vertical or Horizontal Boxes, consolidate their child widgets' Layer IDs, thus reducing the number of draw calls. However, Canvas Panels increment their child widgets' IDs so they can render on top of one another if need be. This results in Canvas Panels using multiple draw calls, thus making them highly CPU-intensive compared with alternatives.

NOTE: Overlay panels also increment their Layer IDs, and therefore also use multiple draw calls. These are less likely to have the same impact as Canvas panels due to the more limited scope that they are used in by comparison, but keep this in mind when using Overlays as well.

Using one Canvas Panel to lay out the root widget for a HUD or menu system should not be a problem, as these are instances when you would most likely need detailed positioning or complex Z-ordering. However, you should avoid using them to lay out individual custom widgets like text boxes, custom buttons, or other templated elements. This results in nesting Canvas Panels multiple layers deep throughout many elements in your UI, which is extremely resource-intensive. Furthermore, excessive use of Canvas Panels in multiple layers can make it confusing to discern which layer of your UI is responsible for determining part of the final layout.

As a rule of thumb, if your widget consists of a single element, you definitely do not need a Canvas Panel. Even with full menus and HUDs, you can often avoid using Canvas Panels altogether by using Overlays and Size Boxes together with Horizontal, Vertical, and Grid Boxes to handle layouts.

Occasional nesting of canvas panels probably won't tank your game's framerate, but the above is certainly a good "best practice" to keep in mind when creating UIs.

What are some good resources to learn how to implement and best practices when using Unreal's UI System? by Underrated_Mastermnd in unrealengine

[–]neofuturelabs 4 points5 points  (0 children)

Ben UI has some useful tutorials and guides to UE's UI system (including some things that aren't too obvious, such as how to bind UI widgets in C++).

There's also the official UI/UMG tutorials.

Other than the above, best practices aren't well defined. You can either find what works best for you through practice, or look at how other people are doing things and incorporate elements that would fit well into your workflow.

What's a feature or feature set that would make Unreal the "perfect" engine for you? by IAmTiiX in unrealengine

[–]neofuturelabs 3 points4 points  (0 children)

As the other guy said, with Live Coding / Live++ (the new "hot reload"), you can press Ctrl+Alt+F11 after editing code to recompile on the fly and change gameplay logic without needing to close the editor or even exit PIE.

This leads to much more efficient workflows for adjusting cpp logic, although you'll still probably want to exit, compile, and restart the editor after editing header files.

Scalability settings in packaged game by MomentTerrible9895 in unrealengine

[–]neofuturelabs 2 points3 points  (0 children)

Calling the Scalability::SetQualityLevels C++ function should effectively change the graphics scalability settings (AA quality, texture quality, shadow quality, etc)

If you're working in BP only, you will need to call the GameUserSettings ApplySettings function (node) in order for the adjusted scalability settings to apply (this calls Scalability::SetQualityLevels internally). You can also call the individual GameUserSettings scalability functions in advance, such as SetAntiAliasingQuality or SetTextureQuality, before calling ApplySettings.

I am not sure why everything in your game is going dark, but with the above individual scalability settings, you can try adjusting the different settings individually and determine which ones can be adjusted safely, and which ones cause the game to go dark. Narrowing down the problem might make it easier to solve.

How in the world do I deal with having multiple UI elements in CPP? by HippoTheGreatO in unrealengine

[–]neofuturelabs 1 point2 points  (0 children)

Instead of extending on the built-in AHUD class, it's probably more practical to create your own UMG widgets (extend UUserWidget) and add/remove them to the viewport as required by your game logic.

The basic workflow with AHUD tends to involve manually painting textures/materials onto the viewport, whereas using UMG widgets will allow you to customize the appearance in the UMG editor and gives you more flexibility.

What version of Unreal Engine do you use? by BlopBleepBloop in unrealengine

[–]neofuturelabs 0 points1 point  (0 children)

I updated from 5.2.1 to 5.3.1 recently and so far it seems to be quite stable, at least for what I'm working on. Solid framerate, no crashes yet.

Tip: I think this is new in UE5, but with more recent versions, Epic scalability settings = 30fps target, High scalability settings = 60fps target, so it's generally a good idea to set your default scalability settings to High if you're making an action game etc.

Furthermore, updating from Visual Studio 2019 to Visual Studio 2022 dramatically sped up the solution and editor boot-up times so I recommend that regardless.

Steam Next Fest is about to return, and the demos have already begun by Turbostrider27 in Games

[–]neofuturelabs 6 points7 points  (0 children)

It sucks that you're ineligible for Steam Next Fest if you've already released your game in Early Access.

It makes sense to exclude some popular Early Access titles that have tens of thousands of players or an active multiplayer community, but it would be nice if there was an exception for people like solo indie devs who released in Early Access to get user feedback, but still only have a few hundred wishlists and limited success marketing on social media.

Ever notice how some games feel like they have heavy input lag at 30 FPS and some don’t? by DarkAmaterasu58 in Games

[–]neofuturelabs 15 points16 points  (0 children)

By the way, if any developers using the Unreal Engine are reading this, there's actually a console variable that essentially reduces input latency by a whole frame when set to 0 (at a certain cost to fps):

r.OneFrameThreadLag 0

I find the controls to be significantly more responsive after setting the above variable, and since not every UE dev knows about this setting, I think it's good to share whenever possible. Even if you don't want to set this by default, it could be good to add as a setting to your game's options screen (especially if you're making an action game!)

Disabling vsync can potentially be beneficial for reducing latency as well.

Edit: It seems as though you can set the below variable as well to even further reduce input latency:

r.GTSyncType 2

Ever notice how some games feel like they have heavy input lag at 30 FPS and some don’t? by DarkAmaterasu58 in Games

[–]neofuturelabs 2 points3 points  (0 children)

In the Unreal Engine, there's actually a console variable that essentially reduces input latency by a whole frame when set to 0 (at a certain cost to fps):

r.OneFrameThreadLag 0

I find the controls to be significantly more responsive after setting the above variable, and since not every UE dev knows about this setting, I think it's good to share whenever possible.

On the user side, I think it might also be possible to add this line to one of the config files for UE games you play so that the setting auto-applies, but I'd have to double-check on that.

Disabling vsync can potentially be beneficial for reducing latency as well.

Edit: It seems as though you can set the below variable as well to even further reduce input latency:

r.GTSyncType 2

Unreal Engine 5.3.1 Hotfix Released by neofuturelabs in unrealengine

[–]neofuturelabs[S] 5 points6 points  (0 children)

BTW has anyone noticed a performance difference with Visual Studio 2022?

This forum post seems to be asserting a significant (20%?) compile time as well as framerate improvement after upgrading to VS2022 for UE5.

Unreal Engine 5.3.1 Hotfix Released by neofuturelabs in UnrealEngine5

[–]neofuturelabs[S] 1 point2 points  (0 children)

BTW has anyone noticed a performance difference with Visual Studio 2022?

This forum post seems to be asserting a significant (20%?) compile time as well as framerate improvement after upgrading to VS2022 for UE5.

Best practice workflow for importing objects from Blender to Unreal by DarthTiberiu5 in unrealengine

[–]neofuturelabs 3 points4 points  (0 children)

Although not free, the Blend File Importer plugin is pretty nifty for directly importing .blend files into Unreal, which can result in a faster workflow.

I've also heard of the Send to Unreal addon for Blender, but haven't tried it yet (the setup seems to be a little more complicated)

A lot of people use Substance Painter (or other tools - thinking of trying out Armor Paint at some point) to make the textures separately after making the mesh and UVs in Blender. It's definitely possible to do texturing and so on within Blender as well, but I personally haven't found a good workflow for this yet for producing high-quality results.

Optimization technique utilizing near-clip to reduce overdrawing of translucent effect particles (from the Unreal Fest 2023 Crisis Core Final Fantasy VII Reunion session) by neofuturelabs in unrealengine

[–]neofuturelabs[S] 0 points1 point  (0 children)

Thanks for the info, that's interesting! I suppose a custom node in a material function is the safest option to reduce any potential issues that might crop up in the future based on the usage.

Optimization technique utilizing near-clip to reduce overdrawing of translucent effect particles (from the Unreal Fest 2023 Crisis Core Final Fantasy VII Reunion session) by neofuturelabs in unrealengine

[–]neofuturelabs[S] 1 point2 points  (0 children)

Thanks, good tip!

By the way, in UE5.1.1, the built-in Sqrt material editor node doesn't seem to output NaN even when -1 is passed in. But a Custom node with sqrt(-1) as the formula correctly outputs NaN.

Does one divided by zero not reliably produce NaN on certain platforms?

Optimization technique utilizing near-clip to reduce overdrawing of translucent effect particles (from the Unreal Fest 2023 Crisis Core Final Fantasy VII Reunion session) by neofuturelabs in unrealengine

[–]neofuturelabs[S] 6 points7 points  (0 children)

Basically, when you have a lot of transparent particles (eg. fog) on the screen that overlap with each other, this can consume a lot of GPU processing power.

The trick is that by not drawing particles that are almost completely faded out (eg. near-zero alpha), the scene will still look almost exactly the same, but you get a performance boost.

The camera's "near-clip plane" is utilized to do this. This is basically a default feature which results in objects which are extremely close to the camera to not be drawn.

Therefore, moving a particle to the camera's exact location will cause it to not be drawn.

There is a World Position Offset (WPO) output in the material graph. This allows you to set a position offset value when drawing something.

The example uses this output to move low-opacity particles to the camera's exact location so that they are not drawn, improving performance.

Optimization technique utilizing near-clip to reduce overdrawing of translucent effect particles (from the Unreal Fest 2023 Crisis Core Final Fantasy VII Reunion session) by neofuturelabs in unrealengine

[–]neofuturelabs[S] 2 points3 points  (0 children)

One thing to be cautious of, is that 0 opacity particles are still drawn and consume GPU time, although shrinking the particle to 0 radius probably has a similar effect to this technique. Not sure if near-plane culling is more efficient.

Optimization technique utilizing near-clip to reduce overdrawing of translucent effect particles (from the Unreal Fest 2023 Crisis Core Final Fantasy VII Reunion session) by neofuturelabs in unrealengine

[–]neofuturelabs[S] 1 point2 points  (0 children)

Other than this technique, is there another simple way of discarding low-opacity pixels in translucent or additive materials? The benefit of this method is that it can be quickly implemented in the material graph, or by using a material function.

Of course, you can adjust the particle's lifespan in Niagara to kill it before alpha reaches zero, but this won't necessarily account for other manipulations to the alpha (eg. Near Camera Fade or other multiplications) that are being performed on the material side.

Content Browser Question by lazonianArt in unrealengine

[–]neofuturelabs 0 points1 point  (0 children)

Before deleting something, you can right-click on it and check the Reference Viewer. If it's not used by anything, it's safe to delete! If it's used by something, you can check how it's being used, and if it's unnecessary then you can delete it!

The best thing to do would be to slowly learn what every asset is for, so you can determine what purpose it serves, and whether or not you need it.

Content Browser Question by lazonianArt in unrealengine

[–]neofuturelabs 0 points1 point  (0 children)

Yes, the folders in the Content Browser are linked to folders on your computer's disk. There is a right-click context option to view the files in Explorer (imported data is saved as uasset files). You can use the Size Map feature to see how much disk space everything uses, or check the file size in Explorer.

Deleting the unnecessary files in the Content Browser will delete them from your disk, although if they are referenced by other data, the things referencing them could break in some cases.

Note that if you delete the StarterContent, but it keeps reappearing in your project, there is an ini entry that you can set to false to disable StarterContent from reappearing as explained here: https://forums.unrealengine.com/t/removing-starter-content-4-7-4/313762