Jump to content


Photo

Fan Mission: A Matter of Hours, by Springheel (28/4/2017)


  • Please log in to reply
51 replies to this topic

#51 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 539 posts

Posted 14 August 2017 - 07:28 AM

Ok, sorry i hadn't realized how old the discussion was, was tired and forgot to see the posting dates, just read the content and felt i should say something. Is the problem of not being that active in this forum, sometimes lose the flow of the discussion, but i'm glad you guys comprehend each other is a testament to the maturity of people on this community.  :)


  • Judith likes this

#52 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 5759 posts

Posted 14 August 2017 - 07:43 AM

Also, since then I managed to learn a bit more about TDMs performance problems. While I’m all about using every polygon in as meaningful way as you can, that’s not the biggest problem for the engine. You can waste polygons here and there, and you’ll be fine. And, if the shadowmesh triangle count is too big, you can always use a simplified substitute.

 

IMO it’s the drawcalls that are much bigger problem. Number of tris per scene scale nicely with better graphic cards, but DC rely on CPU -> GPU pipeline, which isn’t something you can upgrade just like that. The thing is, number of DC rise quickly when you use meshes with multiple materials. Actually, I read somewhere that’s the “easiest” way to clog the CPU->GPU pipeline.

 

Now, TDM relies mostly on tiling textures, and TDM models use like 3-5 materials per model, on average. Some use like 8, 10, I think the highest number I saw was 12-15. That is generally avoided in other games, mostly because any model that uses multiple materials is split into smaller models, as per material, before rendering. So you might think you’re using one mesh, but you actually use 5, every time. Now every model uses DCs, every material uses DCs, every additional material stage in curly brackets uses more DCs (and increases the model triangle count).

 

To avoid this, models have to use as few materials (and textures) as possible, 1-2 at best. Making mesh tilesets, mesh varations that use the same materials, so the number of meshes used is higher than the number of materials is a good idea too. There are big compromises to be made here though. One is simplifying the surface sounds: if you have a model that is part wood, part metal, you have choose which surface is more “important”. It also makes modding more difficult for others. Only the original author knows reasons behind particular UV island placement on textures, and if someone uses mirrored UVs, the whole mindset and reasoning becomes too complex to recreate by anyone else.

 

Personally, I’m all for unwrapped meshes and using all low-poly tricks we know to save on performance, but, as you see, it’s not that simple, and it takes a lot of time. And it’s not like we’re going to see a major switch to that technique in TDM’s assets, for the reasons stated above, and because it would render a lot of current textures and materials obsolete. But that’s probably something for another topic :)

 

That's correct, a perfect example of this was my cathedral map. When it was first looked at by another member, every surface used the same texture with aligned edges, so the engine could batch surfaces and state changes and DC's were really low.

As soon as I started breaking up geometry and patches with different textures, DC's sky rocketed and performance dropped significantly.


I always assumed I'd taste like boot leather.

 




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users