Jump to content
The Dark Mod Forums

My first map – questions & work in progress


peter_spy

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.thedarkmod.com/index.php?title=SEED_-_Watching_entities

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

 

http://www.indiedb.com/mods/the-dark-mod

 

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

Link to comment
Share on other sites

 

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

 

http://wiki.thedarkmod.com/index.php?title=SEED_-_Watching_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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

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

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.com/mods/the-dark-mod

 

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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
  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 6 months later...

Man, I haven't bumped this thread in ages. I could do an asset dump, but I'll leave that for later, as mesh tileset for corridors is almost complete :)

 

Now I'm working on my first door, and I have problems with default frob settings. The small grate below is on hinges, with origin point placed on the side, to make it snap to grid better, and go along with the door. The thing is, frob uses origin point, and it kind of flickers on and off when I approach the grate:

 

obraz.png

obraz.png

 

My question is, do we have a command to see frob bounding box in-game? And, is there a way to model frob box, e.g. like a collision model? That would make things easier and more controllable than tweaking some numbers, at least for me.

  • Like 1
Link to comment
Share on other sites

 


do we have a command to see frob bounding box in-game?

tdm_frob_debug_bounds

  • Like 3

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Thanks Obs, this might come in handy. For now, I decided to have this little box in the middle, so when player looks at the center of the grate, frobing wil be a bit easier.

obraz.png

 

If during playtests people will report problems with shooting stuff through the grate, I'll change it so it doesn't allow any object through.

Edited by Judith
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I'm making candles right now, and I guess I'll have to give them some basic functionality like flame and smoke particles, as well as the ability to be extinguished by player, whether by frob or water stim. Any idea where I should start looking that kind of stuff? I tried to use candle_tall as a reference, but couldn't find it, neither in defs nor in light scripts.

  • Like 1
Link to comment
Share on other sites

  • 11 months later...

So, almost a year later, here's the model set that will be released sometime later in 2019. I didn't know quite a few things back then, so I'll probably fix the errors first.

 

Cool Builder props ! All your work ? These'll look really nice if included in the next building modules release or as main assets. :)

 

If I may nitpick one thing, isn't the Builder quote on that decorative stone slab potentially copyrighted ? It comes from a Thief cutscene, so I'm not sure whether it breaks copyright or doesn't. You might want to ask demagogue or Springheel, if you're still using it.

Edited by Petike the Taffer
Link to comment
Share on other sites

Yup, that's all built from the ground up.

 

You're right about the quote, it was a placeholder and I forgot to change it. I'll either make a few skins with a few proper TDM world quotes, or distribute it with .xcf files, so people can easily put their own texts there.

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

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.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...