Some basic questions on UE4

Hello guys. I wanted to start creating a 3-rd person game on UE4 in near future. I’ve got some expereince working with Unreal 2 engine, but it was a long time ago.
Can somebody answer my questions, regarding EU4 please?

  1. Character skins/clothes - i want to make customazible chracters (clothes only), and i would like to ask - how should i “rig” my character in the first place (in Maya). Do i have to keep “clothes” as a separate objects (rigged to the bones), or they should be a part of the character?

  2. Character lip-synch. Is there some automated system, to create lip-synch for the characters? Should i use “face bones” or it’s better to use a “blend shapes/morphes” for the face animations?

  3. LOD levels - is it possible to enable LOD blending somehow? It looks silly, how the objects instantly change it shapes on distance. Rendering quality is great, but this thing is ruining all immersion.

  4. UE4 optimization - i’ve seen some examples before, and they looks pretty laggy to me. Even adding a “moving” grass to the terrain adds some “spikes” and other things. Is it possible to optimize such things anyhow? Or there’s a limitations on how “deep” you can go, to tweak some parameters.
    I want to create a pretty big open map, and i’m afraid it’s going to be laggy on slow pc’s. I know about anti-portals (from UE2), and object distance-culling, but still…

Thanks.

Generally, if you have different skins for different clothes, the easiest thing to do is to have separate skeletal meshes for each outfit or configuration of pieces. So you can have the pieces separate in Blender or Maya or whatever but import them together as one mesh for your character. That is the easy way - so you would change from one complete outfit to another outfit. That’s the way it has been done for the Paragon characters. If you want to mix a range of t-shirts, with a range of pants, with a range of hats or whatever dynamically in game, then it is more involved. I don’t have a complete answer on that because it is not something I have ever looked into. So keep your clothes separate in your modelling tool but not in Unreal. It will just one mesh.

I don’t think there is any built-in lip sync. How you do the animation is up to you because it is outside the engine. You would create your facial animations however you want but they would e recorded on your modelling tool and then just played back in the engine at the appropriate time, according to how you have set up your character. There is a limited ability to record animations inside the engine but it isn’t really workable for a full character animation set. It is only really to help you get something going quickly. You can snip frames out of your animations in the engine though, and change the playback speed.

With the LOD, it is really a question of getting the distances correct. I think the default is for them to be switched according to how much screen size the mesh is taking up but you can switch off the automatic settings and put a precise value that corresponds to your LOD mesh. If the mesh seems to jump down in detail too quickly it is just because the distance is too short.

There are a million reasons why things can lag, so I will not speculate on what your particular issue is. But there is a lot of control in the engine over the rendering quality, the lighting quality, LODs, level streaming, culling. You can also optimise your content, reduce the poly count, reduce the draw calls. You can’t have everything, it is up to you as a game designer to chose what is important for your game and dial down everything else that isn’t important. Good luck

  1. You use just one skeleton (or if you have more than one body type, you would use the same bone/control names in each skeleton (I’m probably wrong on this one point ← as I’ve not done this with different sized skeletons)). Whenever you export from Maya/3DSMax/Blender, you need to select the clothing mesh (intended to be separate from the rest of the player mesh) and the full skeleton rig, and export that out as one FBX. You repeat that export for every mesh you need. When you bring the asset into unreal, the first asset will establish the skeleton, then every subsequent mesh with the same skeleton should automatically target that skeleton on import (the skeleton select will say “empty” if it does not; in which case, you messed something up between exports like you may have missed part of the skeleton in the selection).

  2. I’m not a professional animator so I’ll just say that I use face bones to do base-level movement of the jaw, the eyes, and the eyelids. Like 1 bone for each of those items. And all they do is swing up and down. Then for eyebrow movements, mouth/nose scrunching, all your mouth shapes for lipsyncing, yadda, that’s all morph targets/blend shapes. I don’t know for Maya, but 3DS Max and Blender you do not need to select the morph target meshes on export, the parameter/modifier on your base mesh will bring those in for you. (Found a bug in Blender where you can’t get morph targets if you also have a Edge Split modifier in the stack). Those face morphs can be baked animations that come in with your skeletal mesh imports, or you can drive them manually with blueprints (which gets interesting).

  3. LOD levels, goatsucker has all that info as I would treat it. So no new info from me.

  4. Basically you need to just be really creative about how you hit all your LODs, and figure out what to cut corners on. For instance, you could have 3 homemade LODs for a grass mesh, where LOD 0 has 80 polys and a 2k texture; LOD 1 is 16 polys and a 512 texture and swaps at 15% screen space; LOD 2 is 1 plane, a 128 texture and swaps at 3% screen space, then you cover the .5% distance with just a good looking grass terrain layer and hopefully you never have more than 500 grass meshes on screen. Or be lazy and switch on Foliage auto LOD in the grass mesh asset. Or stylistically have the grass rise out of the ground to meet the player when you get close, and shrink back into the ground when you get far, then only have a 0LOD and you just cull the grass mesh when it’s below the terrain. Really there’s a lot a loooot you could do.

Thanks for the answers.

I still don’t get it about the LODs. Here’s what i’m searching for: LOD Blending - YouTube
Is it possible to do such thing in UE4 somehow?

For example, look how ugly it is looking in EU4, when it comes to tree LODs on this video: [UE4] Tropical Island Environment - YouTube

You have complete control over LOD behaviour. You can set distance of each LOD (based on screen size) as well as how many LOD’s there are.

The second video is ugly looking because whoever created it was most likely bottlenecked by their GPU, you could easily get rid of the popin with a hit to the framerate. The issue you highlighted is not coincidental but rather a fundamental hurdle you’ll encounter when creating modern games, the foliage comes at a cost and you have to balance fidelity with performance to match your userbases hardware. Just look at Breath of The Wild on the Switch, the game looks bad because the foliage takes so much processing power the aliasing goes through the roof due to limited resources.

If you play with the Boy and His Kite UE4 demo you’ll see just how significantly the foliage can affect performance, making things look pretty takes a lot of processing power.

What are you mean? I’m talking about LOD blending, and not about how much polygons i have in the frame. I would rather use 2 crossed-polygons grass mesh, but have them appearing/disappearing smoothly on the screen.
Even in UE2 (from 2003) you have “fade in” / “fade out” parameters for terrain decals, like grass - so it was disappearing smoothly. And right now, 15 years later, it is a bottleneck for modern pc’s? lol
In fact - it’s probably the first game engine (from the popular ones), where i can’t see this feature build-in by the default, and it’s really surprises me.

P.S. I think i found it: https://www.youtube.com/watch?v=2B2ALZWcqAE
It’s pretty expensive for a “must have” feature, but still…