duzenko 660 Posted March 3, 2019 Report Share Posted March 3, 2019 I am considering the following tuning tool ideaslimit tri per surface"real" skip bump/specular/diffuse textures (bump is already there for interactions AFAIR)draw surfaces with color depending on its tri countdraw surfaces with color depending on its material stage counttoggle decalsskip lights further than X units awayskip entities further than X units awayskip shadows further than X units awayskip lights further than X units awayIf there's something you felt could make a great addition please post here 2 Quote Link to post Share on other sites
RPGista 603 Posted March 5, 2019 Report Share Posted March 5, 2019 Wish I could help here my friend, but Im pretty ignorant about the issue. I remember I found this read to be interesting, but its probably old news to you anyway - https://www.google.com/url?sa=t&source=web&rct=j&url=http://fabiensanglard.net/doom3_documentation/DOOM-3-BFG-Technical-Note.pdf&ved=2ahUKEwjf1O_UmergAhXbHbkGHZsNBX04ChAWMAR6BAgCEAE&usg=AOvVaw0X7cH7bMI1n9eeqjgR9NaP I do like the sound of all the features you suggested, though I wonder if skipping lights and shadows might result in a 'popping' effect once they come into existance inside the players pov? But maybe they wouldnt in your implementation. I would love a sort of true lod mechanics that reduces tris for any geometry, not only selected entities that you have to setup in advance. But I might be dreaming here, no idea if its feasible. Another thing that could be interesting to consider is the AI thinking, the pipeline there, that can have quite an impact on the maps performance... 1 Quote Link to post Share on other sites
stgatilov 1252 Posted March 5, 2019 Report Share Posted March 5, 2019 Is it only for mappers to investigate performance issues on their WIP maps? The ideas don't sound like something you could offer to a player. 2 Quote Link to post Share on other sites
peter_spy 1603 Posted March 5, 2019 Report Share Posted March 5, 2019 (edited) Skipping lights / shadows / entities etc. is already viable with LOD system, and IMO it's mappers who should determine such things, as it depends on dimensions and shape of their map. IMO tools like SEED or func_portal are really underutilized, so maybe a good video tutorial for mappers will do? Speaking of LOD, I'd really love to see some automatic or semi-automatic effect for LOD fade-in, as the current implementation doesn't work at all (I checked). Something that's easily controllable through one value, that would work with both func_portals, shadows, models etc. Edited March 5, 2019 by Judith Quote Misc. assets for TDM Link to post Share on other sites
HMart 337 Posted March 5, 2019 Report Share Posted March 5, 2019 I am considering the following tuning tool ideaslimit tri per surface- Is dynamic based on distance? "real" skip bump/specular/diffuse textures (bump is already there for interactions AFAIR)- What does this mean? Don't we already have that option? I see console commands that say skipbump, skipspecular, etc. will that be different?draw surfaces with color depending on its tri count- The only time I see this being useful is to test if some third party object has to much tris and you can't see it with the regular r_showTris cmd.toggle decals- How is this different from r_skipOverlays? skip lights further than X units away- Very useful especially for outdoor environments.skip entities further than X units away- Very useful especially for outdoor environments.skip shadows further than X units away- Very useful especially for outdoor environments.skip lights further than X units away- see above... If there's something you felt could make a great addition please post here Quote Link to post Share on other sites
Springheel 4645 Posted March 5, 2019 Report Share Posted March 5, 2019 Speaking of LOD, I'd really love to see some automatic or semi-automatic effect for LOD fade-in, as the current implementation doesn't work at all (I checked). Something that's easily controllable through one value, that would work with both func_portals, shadows, models etc. Yes, fading, as opposed to popping, would be great for LOD, if such a thing were possible. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
peter_spy 1603 Posted March 5, 2019 Report Share Posted March 5, 2019 This is supposedly done with masks, but I don't know the specifics: (mute the audio, it will make your ears bleed) Quote Misc. assets for TDM Link to post Share on other sites
duzenko 660 Posted March 6, 2019 Author Report Share Posted March 6, 2019 Yes, fading, as opposed to popping, would be great for LOD, if such a thing were possible.It should be possible - how is it implemented in Animated Grass demo? - Is dynamic based on distance? No, just a tool to statically limit tri per surface to find out if the tri count is becoming a problem. - What does this mean? Don't we already have that option? I see console commands that say skipbump, skipspecular, etc. will that be different?We have an option that replaces material bump/specular textures with white/black images but the shaders still do the weight lifting. Same thing if a material does not have a specular or diffuse stage. The idea is to add an if/else condition to shader so that it does not have to fetch texture and do calculation that does nothing in the end. - The only time I see this being useful is to test if some third party object has to much tris and you can't see it with the regular r_showTris cmd.All tools have more or less limited use. r_showtris is sometimes visually overwhelming - and does not give you a clue about the actual count. - How is this different from r_skipOverlays? Possibly a duplicate. Need to check. Is it only for mappers to investigate performance issues on their WIP maps?Right. And someone should add a Wiki page with a list of things to try if a scene becomes particularly heavy. 2 Quote Link to post Share on other sites
peter_spy 1603 Posted March 6, 2019 Report Share Posted March 6, 2019 It should be possible - how is it implemented in Animated Grass demo? It's not implemented, grass just has 3-4 LOD stages in narrow timeframe. Quote Misc. assets for TDM Link to post Share on other sites
nbohr1more 2172 Posted March 6, 2019 Report Share Posted March 6, 2019 Currently, we only can offer alpha-fading: http://wiki.thedarkmod.com/index.php?title=Alpha-fading Though, I suppose you could use a mult-stage material translucent material and use a parm to determine the alphaof that material: http://wiki.thedarkmod.com/index.php?title=Making_Semi-transparent_textures It would be handy to have more direct access to alpha behavior for lit materials. 1 Quote 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 post Share on other sites
peter_spy 1603 Posted March 6, 2019 Report Share Posted March 6, 2019 (edited) There was a thread about that already, I tested the alpha fading and it just doesn't work. And replacing the regular material with 5-stage one is kind of opposite of performance tuning Edited March 6, 2019 by Judith Quote Misc. assets for TDM Link to post Share on other sites
duzenko 660 Posted March 6, 2019 Author Report Share Posted March 6, 2019 There was a thread about that already, I tested the alpha fading and it just doesn't work. And replacing the regular material with 5-stage one is kind of opposite of performance tuning Can we have a test map to work on your idea?Maybe just a giant garden with trees planted in a grid-like manner? Quote Link to post Share on other sites
peter_spy 1603 Posted March 6, 2019 Report Share Posted March 6, 2019 I could whip up something, but it will probably be next week at the earliest. Quote Misc. assets for TDM Link to post Share on other sites
nbohr1more 2172 Posted March 6, 2019 Report Share Posted March 6, 2019 In the interim, I believe we have Tels old SEED maps like this Pond map in SVN: http://forums.thedarkmod.com/topic/12107-announcement-seed-system/page-6?do=findComment&comment=247177 (Please ignore my noob comments in that thread ...) 1 Quote 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 post Share on other sites
duzenko 660 Posted March 6, 2019 Author Report Share Posted March 6, 2019 In the interim, I believe we have Tels old SEED maps like this Pond map in SVN: http://forums.thedarkmod.com/topic/12107-announcement-seed-system/page-6?do=findComment&comment=247177 (Please ignore my noob comments in that thread ...)Mkay, from the first post in that thread SEED is something very different while LOD means that a model should have multiple detail implementations. That's great surely but I think Judith wanted the models to fade and hide at some distance. 1 Quote Link to post Share on other sites
VanishedOne 549 Posted March 6, 2019 Report Share Posted March 6, 2019 There was a thread about that already, I tested the alpha fading and it just doesn't work.I'm not sure whether it completely works as advertised (even a simple set-up seems frustrating to work out), but it's there; the problem is that for light-interactive materials all you can use is an alpha ramp, because of the engine limitation on partial transparency for light-interactive surfaces. Here's a test map (set Object Details to Normal or the distances may be scaled badly for the map): alphaFadeTest { sort almostNearest noShadows deform sprite nonsolid qer_editorimage textures/darkmod/sfx/candleglow.tga { if (parm3 <= 1) //blend blend blend add map textures/darkmod/sfx/candleglow.tga clamp //alpha parm3 rgb parm3 } } alphaRampTest { noShadows twosided qer_editorimage textures/darkmod/decals/vegetation/cattail_atlas { if (parm3 <= 1) blend diffusemap map textures/darkmod/decals/vegetation/cattail_atlas alphatest (1 - parm3) } } Version 2 // entity 0 { "classname" "worldspawn" "editor_drLastCameraPos" "284.419 -30.0399 -16.4785" "editor_drLastCameraAngle" "-10.2 203.4 0" // primitive 0 { brushDef3 { ( 0 0 1 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 1 0 -256 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 -768 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 -256 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 -320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } // primitive 1 { brushDef3 { ( 0 0 1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 1 0 -320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 -768 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 -320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 256 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } // primitive 2 { brushDef3 { ( 0 0 1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 1 0 -256 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 -832 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 -256 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 768 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } // primitive 3 { brushDef3 { ( 0 1 0 -256 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 -768 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 -256 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 -320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 1 64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } // primitive 4 { brushDef3 { ( 0 0 1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 -768 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 -320 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 -320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 1 0 256 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } // primitive 5 { brushDef3 { ( 0 0 1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 1 0 -256 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 0 -1 0 -256 ) ( ( 0.03125 0 254 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( -1 0 0 -384 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 ( 1 0 0 320 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/mat_shaggy" 0 0 0 } } } // entity 1 { "classname" "info_player_start" "name" "info_player_start_1" "origin" "-192 0 -64" "angle" "-0.000000" } // entity 2 { "classname" "atdm:ambient_world" "name" "ambient_world" "origin" "256 0 0" "light_center" "0 0 0" "light_radius" "1536 768 576" "_color" "0.4 0.4 0.4" } // entity 3 { "classname" "atdm:playertools_spyglass" "name" "atdm_playertools_spyglass_1" "origin" "-192 192 -64" "rotation" "1 0 0 0 1 0 0 0 1" "inv_map_start" "1" } // entity 4 { "classname" "func_static" "name" "func_static_1" "model" "func_static_1" "origin" "512 -192 0" "dist_check_period" "0.01" "hide_distance" "512" "lod_1_distance" "256" "lod_fadeout_range" "600" // primitive 0 { patchDef3 { "alphaFadeTest" ( 3 3 1 1 0 0 0 ) ( ( ( 512 -128 -64 0 0 ) ( 512 -128 0 0 -0.5 ) ( 512 -128 64 0 -1 ) ) ( ( 512 -192 -64 0.5 0 ) ( 512 -192 0 0.5 -0.5 ) ( 512 -192 64 0.5 -1 ) ) ( ( 512 -256 -64 1 0 ) ( 512 -256 0 1 -0.5 ) ( 512 -256 64 1 -1 ) ) ) } } } // entity 5 { "classname" "func_static" "name" "func_static_2" "dist_check_period" "0.01" "hide_distance" "512" "lod_1_distance" "256" "model" "func_static_2" "origin" "512 192 0" "lod_fadeout_range" "300" // primitive 0 { patchDef3 { "alphaRampTest" ( 3 3 1 1 0 0 0 ) ( ( ( 512 256 -64 0 0 ) ( 512 256 0 0 -0.5 ) ( 512 256 64 0 -1 ) ) ( ( 512 192 -64 0.5 0 ) ( 512 192 0 0.5 -0.5 ) ( 512 192 64 0.5 -1 ) ) ( ( 512 128 -64 1 0 ) ( 512 128 0 1 -0.5 ) ( 512 128 64 1 -1 ) ) ) } } } // entity 6 { "classname" "atdm:playertools_lantern" "name" "atdm_playertools_lantern_1" "origin" "0 -64 -64" "rotation" "1 0 0 0 1 0 0 0 1" "inv_map_start" "1" } 2 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
peter_spy 1603 Posted March 7, 2019 Report Share Posted March 7, 2019 (edited) Yup, it works, it's the wiki article that doesn't tell about that part with parm3 condition. Edited March 7, 2019 by Judith Quote Misc. assets for TDM Link to post Share on other sites
duzenko 660 Posted March 17, 2019 Author Report Share Posted March 17, 2019 r_showEntityDraws perf tool added in svn rev 8080.It lists all entities in view with draw calls each generates. 1 Quote Link to post Share on other sites
Dragofer 1430 Posted March 17, 2019 Report Share Posted March 17, 2019 (edited) Something I'd wish for would be for there to be no more leaking of indoor objects to exterior visleafs. Particles are especially notorious at this. My harbour has several hundred drawcalls coming from the ship interior's sacks, beams etc. despite being built in quite a clean way. Maybe a rule could be made that if something's bounds are 90% or more within a closed visleaf it doesn't get rendered? I do remember SteveL having offered to look into this some years ago Edited March 17, 2019 by Dragofer Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
VanishedOne 549 Posted March 17, 2019 Report Share Posted March 17, 2019 Maybe a rule could be made that if something's bounds are 90% or more within a closed visleaf it doesn't get rendered? I do remember SteveL having offered to look into this some years agoI don't think such a rule would play well with regular models, except as an opt-in: imagine setting up a building, with a tower/spire/etc. at one end that protrudes through caulk into the next area because players will expect to be able to see it from the next street over; but then it fails to render and you're wondering why... I fully agree about the problem of particles passing through walls, though. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Dragofer 1430 Posted March 17, 2019 Report Share Posted March 17, 2019 I don't think such a rule would play well with regular modelsYes, it would need some careful thought to figure out whether culling of models from closed visleafs could become more effective without having unforeseen consequences for models that touch multiple visleaves. However, the problem exists also for objects that are fully contained within a single visleaf. Patches that are flush with sloped or diagonal sealing geometry are highly likely to leak despite having all their vertices precisely along the line (my ship interiors use 1:2 and sometimes 1:4 slopes on an 8 unit grid). Well I'd assume the engine draws a box around each object and finds that it intersects the diagonal line into another visleaf. An opt-in would be immensely helpful, i.e. a spawnarg to tie an entity to its origin's visleaf, or until the next door (i.e. if the object spans a multi-visleaf hallway). The simplest form of this would already save hundreds of drawcalls in multiple places for me. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
duzenko 660 Posted March 18, 2019 Author Report Share Posted March 18, 2019 Yes, it would need some careful thought to figure out whether culling of models from closed visleafs could become more effective without having unforeseen consequences for models that touch multiple visleaves. However, the problem exists also for objects that are fully contained within a single visleaf. Patches that are flush with sloped or diagonal sealing geometry are highly likely to leak despite having all their vertices precisely along the line (my ship interiors use 1:2 and sometimes 1:4 slopes on an 8 unit grid). Well I'd assume the engine draws a box around each object and finds that it intersects the diagonal line into another visleaf. An opt-in would be immensely helpful, i.e. a spawnarg to tie an entity to its origin's visleaf, or until the next door (i.e. if the object spans a multi-visleaf hallway). The simplest form of this would already save hundreds of drawcalls in multiple places for me.Test map? Quote Link to post Share on other sites
Dragofer 1430 Posted March 18, 2019 Report Share Posted March 18, 2019 (edited) Thank you duzenko for looking into this, I've attached a test map with some of the offending interiors.leaks.map.txt Edited March 20, 2019 by Dragofer 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.