grayman Posted July 26, 2015 Report Share Posted July 26, 2015 A few years back, hide_distance stopped working in 1.03. It got fixed. I haven't used it before, and am now trying to use it to manage rain particle patches. But it doesn't work. I also tried it with a simple func_static brush with a low hide_distance setting, and the brush never disappears. Anyone else seeing this? Thanks. Link to comment Share on other sites More sharing options...
Springheel Posted July 26, 2015 Report Share Posted July 26, 2015 I just tried it on a LOD entity and it worked fine. Is it supposed to work on regular func_statics? 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 comment Share on other sites More sharing options...
grayman Posted July 26, 2015 Author Report Share Posted July 26, 2015 IIRC, the wiki says, "set this and if the seperation distance becomes larger, the object disappears". Or something like that. (not home atm) Link to comment Share on other sites More sharing options...
Springheel Posted July 26, 2015 Report Share Posted July 26, 2015 I just tried it on a func_static and it didn't work. I can't say whether that's a change in behaviour or not. 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 comment Share on other sites More sharing options...
nbohr1more Posted July 26, 2015 Report Share Posted July 26, 2015 Yes, I'm pretty sure hide_distance was present before there was even a LOD system (or was part of a rudimentary one madebefore Tels joined... (saw some earlier developer discussion on that when the original Mod SDK was released, interesting stuff )).It might have gotten a LOD dependency when Tels' code was integrated? 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 More sharing options...
grayman Posted July 26, 2015 Author Report Share Posted July 26, 2015 Here's the wiki reference. Though this appears on a "LOD" page, it simply talks about being able to hide any func_static, with no mention of any other LOD functionality needing to be specified. Looks like it was broken when LOD was added. (LOD is quite complex.) That having been said, what other spawnargs do I need to give to a func_static to make it disappear at a certain distance? Perhaps I can do what I need to do with the broken system instead of having to go fix the break. Link to comment Share on other sites More sharing options...
grayman Posted July 26, 2015 Author Report Share Posted July 26, 2015 I searched through the existing maps and here's an instance of a simple func_static in Alberic's Curse that uses hide_distance: // entity 138 { "classname" "func_static" "name" "func_static_1186" "dist_check_period" "1" "hide_distance" "1000" "lod_hide_probability" "1" "model" "func_static_1186" "origin" "-333 -815 135" // primitive 0 ... } (This is for a fuzzy grass texture on a patch.) dist_check_period defaults to 0.5 if not present and lod_hide_probability defaults to "1" if not present, so the minimal hide_distance spawnarg had to have worked at one time. Link to comment Share on other sites More sharing options...
Springheel Posted July 26, 2015 Report Share Posted July 26, 2015 I tried adding "dist_check_period" "1" to the test func_static and it still didn't disappear. I don't see anything else in the lod_base entity that seems like it would impact this issue. 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 comment Share on other sites More sharing options...
grayman Posted July 26, 2015 Author Report Share Posted July 26, 2015 I'm guessing that something was added with LOD that accidentally made it required for even the simple hide_distance to work, thus breaking all the "hide_distance only" func_statics in released maps at that point. Link to comment Share on other sites More sharing options...
grayman Posted July 26, 2015 Author Report Share Posted July 26, 2015 I found the problem. It was introduced by the solution to #3912, last November, for 2.03. I'll PM SteveL. Link to comment Share on other sites More sharing options...
nbohr1more Posted July 26, 2015 Report Share Posted July 26, 2015 Ah, so a v2.03 workaround would be to include an invisible model in the entity def. Good catch. 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 More sharing options...
SteveL Posted July 27, 2015 Report Share Posted July 27, 2015 Yep, good catch. This is a bug that'd be unlikely ever to be noticed by testers. And it's not something I (or we) thought of while discussing the mechanics of this change in the forum and on the tracker :-/ The simplest workaround in 2.03 is probably to place an empty "model_lod_1" "" spawnarg on the entity. The presence of any model_lod_ spawnarg will stop LOD being disabled. 1 Link to comment Share on other sites More sharing options...
nbohr1more Posted July 15, 2021 Report Share Posted July 15, 2021 Can someone confirm whether this is broken again? ( for func_emitter ) https://bugs.thedarkmod.com/view.php?id=5668 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 More sharing options...
nbohr1more Posted July 16, 2021 Report Share Posted July 16, 2021 @stgatilov @kingsal @duzenko @MirceaKitsune I pinged Duzenko about this on discord, I was gonna try to fix it myself by adding a hide_distance check to Emitter.cpp but needed a little guidance on where to find an example of the hide_distance check ( I think it's in SEED.cpp ? ) Duzenko instead wanted to take a crack at it. Anyone able to provide a test map with: 1. lod fade in entity 2. lod fade out entity 3. LOD model entity 4. hide distance entity 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 More sharing options...
kingsal Posted July 16, 2021 Report Share Posted July 16, 2021 @nbohr1more @duzenkoI could probably cook up a simple test map this weekend. I imagine we want func_emitters, SEEDs, and maybe a couple various func statics. Side note: We do not have fade in/out capabilities currently. Fade in and out doesn't currently work on LODs. Having that would prevent a lot of that annoying popping in and out on hide. Is it possible to add this to the list of things to explore? Volta Missions: Volta and the Stone, Volta II: Cauldron of the Gods Standalones: Snowed Inn, Hazard Pay (2.10 BETA) Link to comment Share on other sites More sharing options...
stgatilov Posted July 16, 2021 Report Share Posted July 16, 2021 1 hour ago, nbohr1more said: a little guidance on where to find an example of the hide_distance check ( I think it's in SEED.cpp ? ) Certainly it is part of LOD. Look somewhere in idEntity. 1 Link to comment Share on other sites More sharing options...
nbohr1more Posted July 16, 2021 Report Share Posted July 16, 2021 23 minutes ago, kingsal said: @nbohr1more @duzenkoI could probably cook up a simple test map this weekend. I imagine we want func_emitters, SEEDs, and maybe a couple various func statics. Side note: We do not have fade in/out capabilities currently. Maybe because the engine can't do alpha blends? Having that would prevent a lot of that annoying popping in and out on hide. Is it possible to add this to the list of things to explore? The fade-in values modify the material alpha. To make lit materials fade would require making hybrid materials that feed the lit stages to the alpha stages. Probably better done as a hard-coded engine thing though rather than a material hack. 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 More sharing options...
peter_spy Posted July 16, 2021 Report Share Posted July 16, 2021 39 minutes ago, kingsal said: We do not have fade in/out capabilities currently There is alpha fade in and out, it needs alpha channel in the texture and particular material setup. I wasn't able to blend between lod stages though, only fading out from nothing to fully rendered object. Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted July 16, 2021 Report Share Posted July 16, 2021 1 hour ago, kingsal said: @nbohr1more @duzenkoI could probably cook up a simple test map this weekend. I imagine we want func_emitters, SEEDs, and maybe a couple various func statics. Side note: We do not have fade in/out capabilities currently. Maybe because the engine can't do alpha blends? Having that would prevent a lot of that annoying popping in and out on hide. Is it possible to add this to the list of things to explore? At least have a look at it, maybe we can kill more than one sparrow with one cannon Link to comment Share on other sites More sharing options...
kingsal Posted July 16, 2021 Report Share Posted July 16, 2021 @peter_spyReally? Thats great. Do you have an example of that material set up? I swore I read somewhere that doom can't do alpha blends, maybe that get patched into TDM at some point.. I dunno. @nbohr1more @duzenko I can throw in some lights and other func statics in the test map so we can test stuff like that. Volta Missions: Volta and the Stone, Volta II: Cauldron of the Gods Standalones: Snowed Inn, Hazard Pay (2.10 BETA) Link to comment Share on other sites More sharing options...
duzenko Posted July 16, 2021 Report Share Posted July 16, 2021 1 minute ago, kingsal said: @peter_spyReally? Thats great. Do you have an example of that material set up? I swore I read somewhere that doom can't do alpha blends, maybe that get patched into TDM at some point.. I dunno. @nbohr1more @duzenko I can throw in some lights and other func statics in the test map so we can test stuff like that. Here's a quick draft by biker if you're interested https://cdn.discordapp.com/attachments/792307226399604746/865627549782114305/dkotest.map It's being discussed on Discord as well The biker's version does not load for me on svn due to @stgatilov's ongoing work in that area Link to comment Share on other sites More sharing options...
peter_spy Posted July 16, 2021 Report Share Posted July 16, 2021 @kingsalIt might be Tels' work, no idea either. I did some experiments with it and I have some snippets in my notes, but I must have discarded that test map. We can use Discord and try to recreate it though. Misc. assets for TDM Link to comment Share on other sites More sharing options...
stgatilov Posted July 16, 2021 Report Share Posted July 16, 2021 Regarding the error that @duzenko got. The way "image_preload 0" works makes no sense for CPU-resident textures. I suppose if image is CPU-resident, then it must be loaded immediately even if someone has enabled not-officially-supported on-demand texture loading. 1 Link to comment Share on other sites More sharing options...
duzenko Posted July 16, 2021 Report Share Posted July 16, 2021 1 hour ago, stgatilov said: Regarding the error that @duzenko got. The way "image_preload 0" works makes no sense for CPU-resident textures. I suppose if image is CPU-resident, then it must be loaded immediately even if someone has enabled not-officially-supported on-demand texture loading. Of course, I will fix that tomorrow unless someone beats me to it 1 Link to comment Share on other sites More sharing options...
HMart Posted July 16, 2021 Report Share Posted July 16, 2021 Is this fade in and out even possible? I know almost nothing about rendering but I tried to do it, in Dhewm3 and no matter what i tried, it just didn't worked, the only alpha fading, I could do was on lights and material colors, alpha was always totally invisible or visible, there was no in-between. The only "fade" I could easily do, was the normal monster burn effect used on Doom 3, but is bad for LODing and like I said uses alpha testing, not alpha fading. Perhaps you need a shader for this that Doom 3 and Dewm3 engine lacks? Btw this seems very strange, when you have the translucent option, but it seems to be a hack and objects with it on, do not interact with light, bad for grass, it stays full bright in shadow, but I could be totally wrong and just not knowing how to do it, very probable, like I said, I'm not a graphics/rendering guy. Also Quake Wars engine seems to do LODing using a technique called alpha dithering, not alpha fading, if you guys extract the quake wars assets, you will see in Textures/common the various dither textures they use for the fading affect, to my ignorant eyes, seems to be used just for a texture animation, where you change a alpha mask texture for one with more and more pixels disabled, and small and small in size, in a grid like pattern. Link to comment Share on other sites More sharing options...
Recommended Posts