Jump to content


Photo

My first map questions & work in progress

newbiequestions duh

264 replies to this topic

#251 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 08 June 2017 - 12:54 PM

Ok, so it's a bit more complicated with my laptop. While I can have pretty high number of drawcalls and triangle count:

 

Clipboard01.jpg

 

it's the shadows that bring the hardware to its knees, just like Steve said. I will most likely hit the shadow limit before any triangle or drawcall limit, so all I have to do is to stay below 130k per scene:

 

Clipboard02.jpg

 

Which seems like a a pretty generous limit. So far my scene has around 15k for shadows. And this is all without SEED, so there should be some room for improvement as well. All in all, that's definitely good news :)



#252 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36575 posts

Posted 08 June 2017 - 01:32 PM

A shadow count of 130k is quite high.  I always recommend less than 100k at most, preferably < 80k.  Though from lots of testing, there isn't any magic bullet...sometimes the numbers interact in unusual ways, and performance can rise and fall when there doesn't appear to be much reason for it.

 

Kind of pointing out the obvious, but if you work with loads of meshes, you have to use SEED.

 

 

I suspect SEED is highly under-used.  Partially because the documentation for it is, at least for me, extremely unhelpful.  Case in point, the "Seed -- combining entities" page does not actually explain how to use SEED to combine entities.


  • HMart likes this

#253 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8128 posts

Posted 08 June 2017 - 01:42 PM

A shadow count of 130k is quite high.  I always recommend less than 100k at most, preferably < 80k.  Though from lots of testing, there isn't any magic bullet...sometimes the numbers interact in unusual ways, and performance can rise and fall when there doesn't appear to be much reason for it.

 

 

I suspect SEED is highly under-used.  Partially because the documentation for it is, at least for me, extremely unhelpful.  Case in point, the "Seed -- combining entities" page does not actually explain how to use SEED to combine entities.

 

Yeah, that article needs to be updated with the actual implementation here:

 

http://wiki.thedarkm...tching_entities


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#254 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36575 posts

Posted 08 June 2017 - 01:49 PM

 

Yeah, that article needs to be updated with the actual implementation here:

 

http://wiki.thedarkm...tching_entities

 

I read that one too, but even that doesn't help much.  Most of it explains when and why you might want to combine entities, but it doesn't actually explain how to do it.  There's one reference to a SEED entity, but nothing about where to find it or how to use it.


  • HMart likes this

#255 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 08 June 2017 - 01:51 PM

I didn't understand much of it either. I actually used the watch entities option. All you have to do is surround your scene with brush,right-click, create SEED entity, create link from SEED to one instance of a model and put the seed_watch_brethren 1 property in it. It reduces drawcalls a lot, shadows and model tris go down too. It probably could do wonders with things like grass and forest missions.

I agree on 80-100k, those test don't involve AI and other calculations, so having more overhead is always a good idea.

#256 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 381 posts

Posted 08 June 2017 - 01:52 PM

I await to see the SEED implementation used practically in a map. If you use seed_watch_brethren and turn g_showEntityInfo on, you'll see that SEED combines entities as it pleases, meaning entities that aren't practically next to each other will have wild bounding boxes that will, no doubt, show up through VPs and overdraw.

 

Another thing is the wiki mentions using hide_distance, but when all your entities are combined into one all of them hide at once. I tried to SEED combine the fencing in Parkins' house in KOD when devving it only to find that as a fun surprise. 


My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#257 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5305 posts

Posted 08 June 2017 - 01:54 PM

It also depends the specific hardware used. The bottlenecks can vary depending on that.

 

But in general your observations meet the expectations. idTech4 is good at dealing with lots of tris. Shadows are the real performance killer. (This and bad visportalization).


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#258 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36575 posts

Posted 08 June 2017 - 02:08 PM

Another thing is the wiki mentions using hide_distance, but when all your entities are combined into one all of them hide at once. I tried to SEED combine the fencing in Parkins' house in KOD when devving it only to find that as a fun surprise.

 

 

Ah, well that answers a question I had.  Not useful for me then.



#259 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8128 posts

Posted 08 June 2017 - 02:31 PM

As I take it,

 

Well, in the world of SEED "cull_range" takes on the same role as "hide_distance" according to the docs.

I haven't tested whether that works any better though.

 

As for the workflow:

 

  • In DarkRadiant, create a brush the size of the area you want to cover
  • With that brush still selected, 24px-Right_mouse_button_2d.png and select Create entity and select Darkmod/Info/atdm:seed

Note:
If you want to resize the SEED entity after creating it, select it with SHIFT + 24px-Left_mouse_button_2d.png and press TAB to select the brush, then resize it normally.

        The next steps could either be for existing entities inside the SEED brush or you could add new entities now.

 

Link each entity from the SEED entity by selecting first the SEED, then the entity, and then press CTRL+K.

 

Add combine, cull_range, (etc) spawnargs to either the (target) entities or the SEED entity (depending how granular you want to get with what is controlled by SEED).


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#260 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 08 June 2017 - 02:41 PM

Maybe I did something wrong, because I could never resize SEED brush after I created the entity. Nvm, tab option works. Also, you should use SEED at the very end of your mapping process, because if you start cloning meshes within it, weird things can happen. At some point I cloned the lamp mesh in my map, it wasn't even linked to SEED, and when launched the game, I had over 21M tris worth of lamps at my ceiling.


Edited by Judith, 08 June 2017 - 03:51 PM.


#261 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 557 posts

Posted 08 June 2017 - 06:22 PM

Don't know if this is true anymore, but when i was playing with making my own TDM mission, i saw that some light prefabs add a light for any single candle and all of them casted shadows, causing a really ugly shadow crisscross on the floor, and we all know what happens in this engine when many lights hit the same surface at the same time, that is totally the wrong thing to do, it should be one light for one prefab, no matter if the model has 20 candles, just imagine how much light those 20 candles would cast and make the single light size accordingly to that.

 

Btw imo a good way to cut on shadow casting, and I've said this before, is to follow what Frictional Games does, even tho they use a deferred shading render (so they can have many more, non shadow casting and small lights, then TDM at one time) they still suffer from the same limitation for shadow casting lights, what they do is give a importance scale for their lights in the scene, the hero lights (one or three) are the most prominent the ones that illuminate the most and the ones that cast big and obvious shadows, for example a skylight window in the ceiling casting lighting and shadows into a room, a open window casting moon light into a big corridor, a fire place casting big scary "dancing" shadows, etc, then all the other small lights don't cast any shadows, a light illuminating a painting, a unimportant candle on a small table in the corner, etc, is not perfect i know and one thing that TDM lacks that FG games add (after penumbra) was SSAO, this helped ground the objects even if they didn't casted any shadow.



#262 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 09 June 2017 - 12:48 AM

That's definitely a waste, if you have multiple light models (like candles) in a small area, they should just be models, and you should use one source of light for them all. Model + light combo is useful when that source of light is one of the major ones in the scene.


  • HMart likes this

#263 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 10 June 2017 - 07:26 AM

Ok, I did one more test on my desktop PC to see the hardware gap between it and my laptop, in terms of number of overlapping lights. As I expected, it's huge. GTX 1060 can handle 32 36 overlapping, shadow-casting lights, + ambient + fog, before framerate goes below 60, in 1440p. Definitely not going to exploit that in any way, although that hardware is going to be cheaper someday, which means more freedom for mappers. For me it's more freedom in lighting design now, and making some adjustments later.

 

Clipboard02.jpg


Edited by Judith, 10 June 2017 - 07:29 AM.

  • Spooks likes this

#264 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 557 posts

Posted 11 June 2017 - 09:31 PM

Judith please on take this wrong but imo that is hardly a fair test, there's no AI, no sound and portal calculations, no particles, the amount of polys is also relatively low, i don't see any shadows either, on that small square scene there's no doubt that idtech 4 would be able to eat overlapping lights, the render is very well optimized but do the same on a real scene and you will see overlapping lights capability falling really fast.

 

Btw imo you can light a scene really well with a minimum amount of lights, if you are just careful with light size and clever with the play of light and shadow, personally I don't want a TDM scene to be really well illuminated, shadows should exist for the player to hide in. 



#265 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 660 posts

Posted 12 June 2017 - 01:10 AM

Yeah, we talked about this on Discord yesterday. Placing a just a few shadowcasting objects brings the framerate down, and the number lights goes down to 18. Which is still a lot, but I won't be using that much anyway. The idea is to try to pinpoint general scene complexity, both in terms of lightning and geometry, and to get stable 60 fps on my desktop, and at least 30 fps on my old laptop.

 

As for good lighting, it requires either fake GI and lightmaps, or using multiple lights to simulate light bounces, so that's mostly what those tests are for. In "real-life" situations, on my laptop fps goes down to 45 with just two overlapping lights, so I'm trying to find something in-between.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users