Showing posts with label optimization. Show all posts
Showing posts with label optimization. Show all posts

2018/04/30

Rendering huge crowds in Unreal 4! (Also, we moved!)

Hey, this is Lussy.

This month has been a particularly tiring one. We moved into our new apartment together, so we're still adjusting to all the changes, and we're still trying to find everything that we can't find since then. Like console memory cards.

With this move, however, we finally have a real home office! We both got new desks and lamps, so hopefully our persistent back pain and eye strain will go away. One day. One day soon. Please.
While Geril got himself a regular desk, I opted for an adjustable standing/sitting desk. So maybe the back pain will turn into leg muscles. Who knows. It's good to have the option of standing up while working, anyways.

In other news, we've been working on a massive background-crowd system. You know how in war scenes you have to show large crowds marching forward, or running into the enemy? That's what we're working on, but inside Unreal 4.

We already had a smart crowd system that could react to other crowds and even initiate combat with each other, but no computer could handle rendering 10 000 of those soldiers all at once in Unreal. So we made a simple crowd that can only march forward at various speeds and follow the terrain's slope. For this purpose, we decided on creating 3-frame 'animations' for characters: 3 static meshes that would alternate while marching, like a flipbook. These static meshes don't strain the engine so much, so we could easily show more than 10 000 of them, while also giving the crowd the illusion of being animated.

The static meshes had to be heavily simplified for LODs, and Geril did all of that by hand. This is what our simplified horsemen's LODs look like:



Pretty... artsy.

So, that was our approach for creating a very light crowd in Unreal 4. Would you do this differently?

Until next time!

2017/10/31

A GPD Win post!

Hi!

This month we've taught horses to follow paths, made a character creation system and also put together some complex interactive materials. All that in Unreal 4. Too bad we can't show any of this right now, because it's for our current job. In any case, we're learning a lot working full-time in Unreal 4!

There's a thing we only briefly mentioned in our previous post but didn't elaborate on it: the GPD Win that Lussy created the rhythm game project with, using Unreal 4.

The GPD Win is advertised as a portable Windows 10 PC, and Geril bought one about 3 months ago. At first he considered getting a LattePanda, but figured it would be too much trouble to make it stable. (Since, funnily enough, Geril bought it for work, stability is a huge concern)

Even though our GPD is for work, we still use it to play some games: we play World of Warcraft on it using random public Wi-Fi hotspots; Fallout: New Vegas and various indie games. For example, Cuphead runs with a stable 60fps.

To play any "serious" modern games on it, we need to do some heavy work and tweaking just to get it running in a bearable manner, so we don't do it very often. It's just too much effort, but it's just about what we expected.

But as for Unreal 4, we had no clue how it would run. It's a huge relief that it runs well, surprisingly well. Of course everything that can be set to low has to be set to low, and everything takes a really long time to load and compile.

At first, Geril created simple materials, material instances, particle effects and levels. Editing materials is fine, but compiling shaders is a problem - probably because the built-in storage is really slow. It also gets very hot when compiling shaders (and even the maximum fan speed doesn't help), so we actually had to leave it in the fridge for an hour to complete compiling about 5000 shaders. Well, at least anyone who opened the fridge had a laugh.

The framerate immediately drops in the editor when working with any lights in the scene. Funnily enough, playing in editor produces better framerates than not starting the scene at all.


What really works well on it though are blueprints. Last month's practice project was created almost entirely on the GPD, and apart from the controls (using blueprints with analog sticks...), there wasn't much to complain about.

We could talk about what's actually in the GPD, but we think it's irrelevant - it's basically a 64 bit PC, and Windows PCs are known for their customization options, therefore any issues can ultimately be solved. We were positively surprised how agile the Unreal Engine is, and how much work can be done using such a tiny machine.

So we can work even on the go! Yay... I guess?

With that said, Happy Halloween! (The Halloween spirit evaded us this year)