Jump to content

Where do they get all that speed from?


havenphillip
 Share

Recommended Posts

Leadwerks has all but ruined video gaming for me. I just look around trying to figure out how they made those scenes now. I was playing Last of Us II and some of those forest scenes are just amazing. My question is how are they able to put so much stuff in the scene without losing speed? If I could even make Uncharted quality I'd be happy. Is it polygon count or LOD systems or both or none or what?

Link to comment
Share on other sites

It is a lot of lod and optimized meshes and a lot of optimized level design and tricks. But the most important thing is that these commercial engines are highly optimized for the exact use case. While Leadwerks is designed to meet a lot of diefferent kind of games or scenarios the commercial ones are mostly ( not all) modified for each game. Also the engine developer have a lot of support from gpu vendors and the gpu drivers are commonly updated to work best with these engines. Another point is that at least on windows mainly dx12 is used which gives a lot more room for optimization than OpenGL. Once ultraengine is out which uses Vulkan, which is much closer to the hardware and dx 12 I think we will see a close competitor to the current “state of the art commercial engines”.  
But in defense to Leadwerks I think with a clever level design and the use of lod and other tricks the mentioned levels can be done in le as well. 

  • Like 2
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

7 hours ago, klepto2 said:

But in defense to Leadwerks I think with a clever level design and the use of lod and other tricks the mentioned levels can be done in le as well. 

A lod system basically looks like three copies of the models and textures with varying degrees of polygons/resolution, right? Is any other thing to it? I always feel like I'm probably going to miss something obvious.

Link to comment
Share on other sites

Leadwerks has an issue rendering to many objects at once. Resolution and the amount of post processing also effects framerate.

Shadmar or someone told me a long time that a reason that post effects were normally slow was because each shader loaded opens and closes the buffer. It's been like 5 years, so don't quote me on that.

  • Like 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

8 hours ago, havenphillip said:

A lod system basically looks like three copies of the models and textures with varying degrees of polygons/resolution, right? Is any other thing to it? I always feel like I'm probably going to miss something obvious.

Yes, but there are also HLOD systems where different levels might have different hierarchy so some objects aren't even present on some lods.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I'm not an expert on the topic but, I have seen LOD, important in mesh and textures. Heard that mesh or textures can be placed in an array for one draw call. Instancing in the shaders. The creation of 3D mesh Imposters that look good a little closer than a Billboard would. Use clustered grass patches  instead of single grass. Culling of coarse. And with the speed of SSD and nvme. You can stream your game for a huge world.

Ex. When walking to a house door and when opening it every thing in the house can be loaded at that point. Terrains can be streamed as well.

So Memory is loaded with Things that get closer to you. And everything moving further away gets deleted from memory.

Turning off physics features when an object get's further away may help as well. Baking shadows for static objects. Unless you have moving lights.

And probably a few more optimization techniques I can't think of at this moment.

 

LOD does not have to be three it can be two or it can be more than three.

  • Like 1

Intel Quad 9300 2.5

Windows 7 64 bit

nforce 780i SLI MotherBoard

Sapphire, Ati Radeon HD 5770

8 GRam

Link to comment
Share on other sites

19 minutes ago, havenphillip said:

Subquestion how much do you think texture resolution plays into the speed? Like high res up close but low res far away.

 

I would think this would have to do with VRAM and how much your scene and system is using. 

  • Like 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Also with the new  upscaling of graphics I believe we are getting to a point where extreme high textures are not really needed. For close up. There is no need for high rez textures when objects are just a few meters and further from the player.

  • Like 1

Intel Quad 9300 2.5

Windows 7 64 bit

nforce 780i SLI MotherBoard

Sapphire, Ati Radeon HD 5770

8 GRam

Link to comment
Share on other sites

1 hour ago, havenphillip said:

Subquestion how much do you think texture resolution plays into the speed? Like high res up close but low res far away.

 

I think resolution theoretically has some effect on speed, but in practice I've never seen it have any noticeable effect at all. Just make sure you don't run out of  vram and ram.

  • Like 1
Link to comment
Share on other sites

The most simple answer is... Think if you have a very simple engine that was made back in 1990. That it has only two classes: Room + Object, thus the entire world can have an unlimited number of rooms (linked list) and each room can only have 100 objects. When you are in a room only 100 objects can be updated renderered, the other rooms are not updated or rendered they just are skipped, or if unloaded for good if they are really far.

More or less this is the idea of Octree Occlusion Culling, or Bounding Volume Hierrarchy

So say for example the camera can throw a raycast and hit only 10 world cells then all of these objects inside these cells, are made visible so they are rendered, additionally some elements get "lod-ified" or others get hidden until they are super close.

 

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

 Share

×
×
  • Create New...