Jump to content
  • entries
    941
  • comments
    5,894
  • views
    867,684

Beta update available


Josh

3,001 views

 Share

A new build is available on the beta branch on Steam. This updates everything, C++ and Linux included.

 

A bug where the editor skipped navmesh calculation on brushes is fixed.

 

We're updated to the latest version of the Steamworks SDK, which may fix some Workshop upload and download issues.

 

Animation now calculates more than twice as fast as previously. This was achieved by optimizing the animation code, implementing some inline functions, and by changing the way the matrix updating works. The UnlockMatrix() command will now accept a single integer parameter for the update type. Zero will perform no updating. This should only be used if the entity's 4x4 matrix has been manually set. (So really, it should never be used by you.) 1 is the default setting which updates the entity's bounding boxes, octree node, etc. 2 is used to only update the entity's 4x4 matrix, which is much faster.

 

The animation manager script is modified to use the fastest method on bones:

--Unlock entity matrix if any animations were applied
if doanimation==true then
   self.entity:UnlockMatrix(2)
end

 

If you are using large numbers of animated characters, another easy way to make things even faster is to only animate them every Nth frame. If you have a large number of characters the lack of continuous motion each frame won't really be noticeable.

 

Update your project to get the latest Steamworks DLL.

  • Upvote 12
 Share

10 Comments


Recommended Comments

Thank you! Animations were the only thing in LE eating my FPS... can't wait to see if there's a noticeable FPS boost.

 

Edit: Gained a solid 20 FPS on a scene w/ about 10 crawlers. smile.png

Couldn't be happier, gained tons of FPS in my actual test scene. 0.o

 

Although (of course) animated NPCs are still the most expensive thing in my project, drop about 25-60 FPS per crawler. Is that normal?

FPS:

-7 crawlers, 180 FPS.

-5 crawlers, 300 FPS.

-2 Crawlers 750 FPS.

Tested on a new project w/ a 1024x1024 terrain, and a hollowed box containing the crawlers and the player inside.

Link to comment

Give me a few minutes, I'll post some screenshots its a fresh project.

 

Edit: here's the map file since you wanted that instead.

https://www.upload.ee/files/6069655/start.map.html

 

Edit#2 since you think I'm lying to you about FPS numbers -.- :

-1 Crawler http://i67.tinypic.com/6ibb6h.jpg 742 FPS

-2 Crawlers http://i67.tinypic.com/174fty.jpg 580FPS

-3 Crawlers http://i65.tinypic.com/2n8v3u0.jpg 369FPS

-4 Crawlers http://i63.tinypic.com/8wk47p.jpg 350FPS

-5 Crawlers http://i64.tinypic.com/33cyah2.jpg 270FPS.

-6 Crawlers http://i67.tinypic.com/2432gdg.jpg 216 FPS

-7 Crawlers http://i63.tinypic.com/2mgtwrq.jpg 162 FPS

 

So as you can see, I'm not lying to you about the numbers, don't know why you'd think I'd make up FPS numbers... -.- I'm not complaining about the performance it's fine, I'm wondering why it starts out with such immense drops.

Link to comment

Since the update my C++ projects no longer work creating a window....

 

 

 

Window *window = Window::Create(windowName, 0, 0, windowWidth, windowHeight, windowFlags);

 

//Create a context

context = Context::Create(window);

 

 

Context *con = Context::GetCurrent(); // Run Debuging... context->window unable to read memory

 

Window *win = con->GetWindow() // <- Returns NULL

Link to comment

Looking forward to checking out the increased animation performance but my game isn't starting up correctly, probably due to the context bug others are experiencing.

 

I'm always trying to improve performance in my games so I love seeing updates like this! :D

Link to comment

@Crazycarpet

Why wouldn't you expect to see big drops at the beginning? Seconds per frame should be linear but frames per second is an inverse function so the drop should be high at first.

 

@Josh

It's good to see the bounding boxes recalculation being better designed. Have you tried keeping an internal tree (in array form) using structs for bones instead of classes? This should help speed up parent transformation lookups immensely.

Link to comment

1 crawler : 550 fps

16 crawler : 320 fps

 

I just used the mdl and the simpleanimationscript.

No character controller.

Link to comment

I doubt that bone animation alone would make those drops.

 

More likely check for skinning (Is it using a hardware or software solution?) or the geometry since there is no LOD. (Is the geometry is using hardware instancing or copying the mesh data for each instance of the crawler to the GPU?)

 

Animations will only do transforms on the bones, this require some CPU calculations but with the improvement that Josh have made, I'm almost certain it's not related at all with the frame drop, on the contrary it should improve when you have lots of meshes animating. Most meshes have less than 75 bones..., But with 10 crawlers, there is around 750 bones to animate per frame...

 

Skinning is much more data intensive as it will take the information from the bones transforms and will adjust the position of EACH vertices using a weight factor. If this is done on the CPU, each instances will like drop the FPS as you report. If your character have 10k vertices, the geometry will likely update the data of all those 10k vertices per frame. So 10 crawlers will require updating 100k vertices per frame! Also I know that normals need to be recalculated (normal maps on animated models), and this might also take a toll since the vertices are being manipulated.

 

@Crazycarpet

I'm sure that Josh never thought that you were lying. He was only not sure about your results and asked if you can provide him with some tests so he can double check. Thanks for the screenshots and the scene.

  • Upvote 1
Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...