Jump to content
The Dark Mod Forums

Recommended Posts

Posted

I counted and checked more thoroughly... from this angle I can see precisely 10 lights that are turned on, they're all torches or hanging cage fires so not all that high radius or unusual. Tried r_glProfiling but the engine says that cvar or command doesn't exist. r_showtris 3 shows the same thing as 1, 2 however paints more polygons, so here's a new screenshot with 2.

L62WfEK.jpg

Now I wasn't aware that lights create more triangles or cause actual geometry redraws. I'm well aware that high-poly meshes become even more performance intensive when casting shadows obviously, but not that each shadow spawns more triangles used by the GPU. Is this unavoidable? Sounds like something that should be optimized if not so lights can be made to avoid duplicating geometry and use existing data. Anyway this could explain why I get to a high value... 1 million tris though, that still sounds like far more than I should be producing here, though maybe I'm wrong in this case.

Oh, one more thing worth pointing out: While I have no map leaks and all portals are generated accordingly at a first glance, I do have some issue in this area. I had to move a portal because it was flickering and the engine was closing it abnormally. Some of my architecture might be triggering something dmap doesn't understand... may need to make changes just to be sure I'm rid of whatever is producing that, which may or may not be related to my unusual triangle count too.

Posted

It's not so much duplicating geometry, but it has to render it multiple times, once per light. And light interactions are usually the most expensive thing for the GPU to render, especially if your light casts shadows.

  • Like 1
Posted

Okay: It seems using certain models really can bump the polygon count to 1.000.000 at a shocking pace. In the outdoor area the biggest abuser is me using dozens of instances of the models/darkmod/architecture/fencing/fence_spike_01_tall_4_segments.ase fence: Each has 3376 polygons and sadly offers no LOD model to compensate. I might switch some of them out in favor of models/darkmod/architecture/fencing/springset01_bars128.lwo which covers more areas for fewer polygons and also has a LOD model I can set on the func_static. In the meantime even setting "hide_distance 1500" on all the fence pieces helps, offering a fair balance between the snap distance and lowering the polygon count. Will continue to improve.

Posted (edited)

@MirceaKitsune A simple illustration of how tris count grows with lighting. What I have here is an object in a caulked room that is around 380 tris. Look how the tris count grew in comparison to the original number. Especially since ambient + fog is one of the most basic setups, for outdoors in particular. The tris count is almost tripled there already.

Clipboard01.jpg.c9bcf3756fa9e6a179b09e98f836c37d.jpg

Clipboard02.jpg.dc886a0e87ab202c1c2e346b6cb06731.jpg

Clipboard03.jpg.440f907aceeb3db8ff457e49ca14f8df.jpg

Clipboard04.jpg.f01c9cb5d1979e1827d250d723d93e44.jpg

 

Edited by peter_spy
  • Thanks 2
  • Sad 1
Posted

@MirceaKitsune, when @peter_spy said

Quote

That gate at the end of the corridor looks like it uses geometry for all the ornamental pieces instead of alphatest parts, so that might be a culprit as well.

I didn't immediately understand what was meant, but I think he means using a fence or grate texture with transparency, like textures/darkmod/metal/grate/fence_iron_01. This can be applied to one side of a brush (if the gate is immobile) with other surfaces nodraw.

Posted

Throwing another important question in for the meantime: I'm trying to play a set of varied sounds however I don't seem to be able to get it working. Unlike a normal sound that's one file, a sound shader with multiple pieces of audio won't work intuitively: If I enable s_looping it will only repeat one sound in the set over and over again... if I don't then of course it will only play once. city_sounds_varied is an example of one I'm trying to get working on my speaker.

Posted
53 minutes ago, Geep said:

didn't immediately understand what was meant, but I think he means using a fence or grate texture with transparency, like textures/darkmod/metal/grate/fence_iron_01. This can be applied to one side of a brush (if the gate is immobile) with other surfaces nodraw.

I don't know TDM assets much, but typically when you make that kind of ornamental stuff, you try to get away with some transparent cards where players won't notice, so you don't model all the complex stuff on geometry. It's more of a balancing act really.

6 hours ago, MirceaKitsune said:

Tried r_glProfiling but the engine says that cvar or command doesn't exist.

Hmm, r_glProfiling 1 works on 2.08. Did something change in the meantime?

Posted
1 minute ago, peter_spy said:

Hmm, r_glProfiling 1 works on 2.08. Did something change in the meantime?

Yes, starting with 2.10 dev builds, it was replaced with an external profiler. I'll try to write up some documentation for it when I find the time.

  • Like 1
Posted
1 hour ago, MirceaKitsune said:

Throwing another important question in for the meantime: I'm trying to play a set of varied sounds however I don't seem to be able to get it working. Unlike a normal sound that's one file, a sound shader with multiple pieces of audio won't work intuitively: If I enable s_looping it will only repeat one sound in the set over and over again... if I don't then of course it will only play once. city_sounds_varied is an example of one I'm trying to get working on my speaker.

I don't think you can have a single sound shader which loops through more than one audio file continuously.

You can either have a single audio file which loops (e.g. most ambients), or multiple one-shot audio files which get chosen at random when the shader is triggered (e.g. footsteps).

Posted
56 minutes ago, peter_spy said:

I don't know TDM assets much, but typically when you make that kind of ornamental stuff, you try to get away with some transparent cards where players won't notice, so you don't model all the complex stuff on geometry. It's more of a balancing act really.

Hmm, r_glProfiling 1 works on 2.08. Did something change in the meantime?

That's why for huge fences or distant ones the player doesn't get a close look at,  I use a textured face. For smaller fences the player gets a close look at, I use one of the metal fencing meshes... sadly those can end up being quite performance intensive.

15 minutes ago, OrbWeaver said:

I don't think you can have a single sound shader which loops through more than one audio file continuously.

You can either have a single audio file which loops (e.g. most ambients), or multiple one-shot audio files which get chosen at random when the shader is triggered (e.g. footsteps).

I see. DarkRadiant shows the sound shader as containing multiple clips... I suspected that meant s_looping would randomly go through them, however it seems that's not the case. I wonder if having a repeated trigger targeting the speaker would work? Should probably do a better job finding a continuous loop though.

Posted
8 hours ago, MirceaKitsune said:

 Tried r_glProfiling but the engine says that cvar or command doesn't exist.

 

Download and run Tracy

In game console, try

com_enableTracing 1

 

Posted
15 hours ago, OrbWeaver said:

So the million-triangle scene might actually be 100k triangles falling within the radius of 10 lights.

Yup, unfortunately. Also, I didn't show that in the example, but try adding custom { } stage to the material your object uses, and you'll get +1 drawcall and +base amount of triangles again.

12 hours ago, OrbWeaver said:

I don't think you can have a single sound shader which loops through more than one audio file continuously.

You can either have a single audio file which loops (e.g. most ambients), or multiple one-shot audio files which get chosen at random when the shader is triggered (e.g. footsteps).

Haven't worked with sound shaders yet, but I remember I made a melody for Deadly Shadows, where I could use either several parts (different files) looped and chosen at random, or at least the same file played at different pitches. If you can't have such thing in TDM, that would be a good idea for improvement.

  • Like 1
Posted

I have a locked door unlocked with a key. The key is worn by an AI, bound with bind / bindtojoint spawnargs. I understand from the wiki article the AI should automatically be able to unlock the door. Yet when I path my AI to walk through the locked door, they try to open it but it only moves the handle and gives the locked sound and that's it. Am I missing something?

Posted (edited)

Did you add "can_unlock" "door_name" field to the AI? The AI having the key to the door doesn't matter. See this video, from 43:25.

 

Edited by roygato
  • Like 1
Posted
2 hours ago, roygato said:

Did you add "can_unlock" "door_name" field to the AI? The AI having the key to the door doesn't matter. See this video, from 43:25.

 

That solves it, thanks! Was under the impression that binding the key to a door to an AI will automatically let them unlock it. I presume there's no way to make the AI stop being able to unlock the door once you steal the key from them.

Also I wanted to ask if anyone could please check a little something for me: If you create a func_emitter and give it the model tdm_ceiling_dust.prt, are you able to see the particles in-game? All other emitters work fine for me, whereas this one even has the effect showing in DarkRadiant... for some reason however I cannot see any particles in-game for this one definition.

Posted

About the key and AI. I know that I've had AI with keys that could open locked doors OK, even without "can_unlock" set. (Though I ended up using can_unlock anyway, so that AI paths will still be traversed even if the key is pickpocketed.)

However, given your problem, it may be that only def_attached keys work that way, not ones added using bind.

Posted (edited)

Trying to add a number wheel lock (3 digits) to my FM for the first time. I seem to be running into an issue which may be an bug in vanilla TDM, I probably have to work around it doing things differently in my FM for now (let me know how).

I added the entity atdm:combination_lock and gave it a combination as well as targeting the door it's meant to open. Unfortunately the presence of this entity causes a map crash with the following error:

ERROR:Script object 'numberwheel' not found on entity 'idMover_atdm:numberwheel_6595'.

How do you suggest working around this problem? I know this type of number wheel works as I've seen it in other FM's, however I'm assuming it won't be as easy as adding that entity to my map until whatever bug causes that crash is solved.

Edited by MirceaKitsune
Posted (edited)
3 hours ago, MirceaKitsune said:

Trying to add a number wheel lock (3 digits) to my FM for the first time. I seem to be running into an issue which may be an bug in vanilla TDM, I probably have to work around it doing things differently in my FM for now (let me know how).

I added the entity atdm:combination_lock and gave it a combination as well as targeting the door it's meant to open. Unfortunately the presence of this entity causes a map crash with the following error:

ERROR:Script object 'numberwheel' not found on entity 'idMover_atdm:numberwheel_6595'.

How do you suggest working around this problem? I know this type of number wheel works as I've seen it in other FM's, however I'm assuming it won't be as easy as adding that entity to my map until whatever bug causes that crash is solved.

1. Open your maps folder and create therein a script-file with the name of your mission (missionname.script) and the following content:

Spoiler

 

void closeBar(entity ent)
{
}

 

 

2. Select a random func-static entity in your mission and give it the name "safe_bar"

 

3. Put the attached scripts in your script folder. Grayman once created them for me. If my recollection is correct, they made sure that the number wheels also work if players had a certain gameplay setting ("Open door on unlock - no" - or something like that).

Not sure if theses three scripts are still needed. You can check the mission without them and try the different setting for Open door on unlock and see if it works now.

 

tdm_custom_scripts.script tdm_numberwheel.script tdm_numberwheel_lock.script

Edited by JackFarmer
Posted

Thanks. Never had a default asset requiring custom scripts to work before. Sounds like they were omitted from TDM... could any dev confirm this perhaps? If the numberwheel entity wasn't available at all I'd assume it just wasn't included in vanilla, but if the def and its model are there yet only the scripts aren't it sounds like a potentially incomplete package.

Also could someone check the model tdm_ceiling_dust.prt please? I'm curious why this one particle model appears to work in DarkRadiant yet in TDM I never see the particles coming from my func_emitter.

Posted
43 minutes ago, MirceaKitsune said:

Also could someone check the model tdm_ceiling_dust.prt please? I'm curious why this one particle model appears to work in DarkRadiant yet in TDM I never see the particles coming from my func_emitter.

My guess is that it's a single-cycle particle designed for triggered events. You can check this via the particle editor.

Regarding the numberwheel system, that was originally made for A New Job, but by oversight the script wasn't pasted over into core TDM from the FM. To fix this permanently, someone would have to create a new copy of the asset using a renamed version of the script so that it doesn't conflict with existing missions that have the original script ( = crash to desktop.)

Posted
5 hours ago, Dragofer said:

Regarding the numberwheel system, that was originally made for A New Job, but by oversight the script wasn't pasted over into core TDM from the FM. To fix this permanently, someone would have to create a new copy of the asset using a renamed version of the script so that it doesn't conflict with existing missions that have the original script ( = crash to desktop.)

I see. Can core not fix it in that case? The official entity could simply reference a different script with a slightly different file / function name.

Posted (edited)

Need help with another one. I'm trying to attach an atdm:loot_amulet_wearable to an AI and a ragdoll using bind and bindtojoint. The loot sticks but there's a problem: For the living AI it randomly causes it to spin in place as if disoriented, whereas the ragdoll will jump all over the place like crazy. This seems to be due to the wearable's collisions.

I tried setting "noclipmodel 1" and "solid 0", however both of these cause the model to no longer be frobable therefore the loot can't be picked up. How do I disable collisions on attachments but without disabling frobbing too?

Edited by MirceaKitsune
Posted

Has anyone ever created a utility program that would examine a TDM pk4 file and print out a list of ALL included but unused resources?

  • Like 1

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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...