Download

Support for large number of animated actors (like Medieval Total War)

I have been posting the following questions in the “General Discussion” forum. So far no replies, unfortunately.
I am posting here in the feedback forum in the hope that some official response / comments from Epic would be forthcoming.

I am an Indie developer working on a Medieval Total War style game. I program in C++.

Two broad areas of concern for me before I commit to Unreal Engine 4:

1* Support for rendering large number of animated meshes using SKINNED INSTANCING :


See the technique that NVIDIA published a couple of years ago. This involves the use of skinned instancing (DirectX 10 and above) with three levels of LOD.
This enables the NIVIDIA tech demo to render around 10000 animated meshes with three levels of LOD using the hardware supported skinned instancing technique.

http://http.developer.nvidia.com/GPUGems3/gpugems3_ch02.html
http://developer.download.nvidia.com/SDK/10/direct3d/Source/SkinnedInstancing/doc/SkinnedInstancingWhitePaper.pdf

2*Support for switching from animated meshes to animated imposters far away from the camera


I am trying to increase the number of animated characters that I could render simultaneously in the view frustum.

I have gone through the documentation for imposters and flipbook animations. Great features.

I am thinking of the following scenario:

*Use an animated mesh for a character in the near and medium distances from the camera.

*Change to imposters in the far distance.

So far, imposter examples talk only about static meshes.

I have a vague idea that flipbooks would solve my problem.

For a given animated character, is there a technique to switch from animated mesh to flipbook based imposters based on distance from camera?

Everything else in UE4 seems like a dream come true for me. The above two are the gating items before I subscribe.

Wow, that’s interesting, I can see that for sure the grahics or animations are really going to be great… :smiley:

That is a really interesting idea. I would love to see a massive crowd demo in UE4 :slight_smile: It would certainly be worth trying a flipbook as an LOD. Each PrimitiveComponent has a ‘ReplacementPrimitive’ pointer which I think you can use to switch to a lower-detail representation. You may need to add some higher-level batching though to support 10,000 units.

James, hi!

Thanks for the feedback.

*By higher-level batching, do you mean occlusion culling based on view frustum? Or did you have something else in mind?

*Since you are working on the UE4 engine, could you please comment on whether the **core engine **(assuming C++ programming and not Blueprints alone), has the juice to deliver 10,000 animated characters performance?

*Also, is it OK to send you a PM?

Best Regards
Fred

I mean drawing lots of characters in one draw call.

I do not think you could do it as 10,000 ticking, animating Pawns. Just that many virtual function calls is going to be costly. I think your lowest LOD is going to be something closer to a particle emitter - one crowd manager that can update and render all the very lowest detail imposter characters. That would be a new system, but certainly something that could be built in UE4.

I never check PMs I’m afraid!

Did you get a chance to read the two NVIDIA links in my original post?

I am eager to hear your thoughts on whether something akin to that is possible using UE4?

The NVIDIA people are using DirtectX 10 calls, use 3 levels of LOD and use the graphics shader to embed animation data.

yeah, it would be great to support large crowds of skeletal meshes… using flipbook over a distance is my plan too (visibility switch from/to lod models and flipbook). with another engine I could easily do it, probably possible with UE4 too… exact lighting is not very important under a certain size on screen.

what I don’t know is how to animate characters without using their Ticks. I mean handle everything in one loop by the unit manager in C++? (more exactly one loop for AI and then another loop for animation and rendering related stuff is what I want to port to UE4). I would be happy with a little help to find the direction. :slight_smile:

Well if you have problems, actually try putting 2d actors as the game characters! (personally I think it would give the game some character) I would also really love to see a medival total war based game. That was one of my favorites!