Jump to content

hide_distance broken again?


grayman
 Share

Recommended Posts

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

I just tried it on a LOD entity and it worked fine. Is it supposed to work on regular func_statics?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Yes, I'm pretty sure hide_distance was present before there was even a LOD system (or was part of a rudimentary one made

before 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

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

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

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.

Link to comment
Share on other sites

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

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.

  • Like 1
Link to comment
Share on other sites

  • 5 years later...

@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

@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? 

 

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

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

  • Like 1
Link to comment
Share on other sites

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

Guest
This topic is now closed to further replies.
 Share


  • Recent Status Updates

    • peter_spy

      It's funny how perception changes over the years. I've been replaying Bioshock in its Remastered version, and I'm surprised how bad the level design actually is. It's just a series of abstract corridor mazes that you can't really map out in your head. There's nothing that would ground them in any kind of reality, fictional or otherwise, no sense of place people could live in. It's almost like Wolfenstein 3d with cool art deco assets.
      · 9 replies
    • STiFU

      Anyone here played Inscryption? At first, I was like "no, I am not going to play a stupid card game", but this game is so much more than that. It is so meta, full of 4th wall breaks, and feels so damn spooky and weird because of it. Absolutely recommended, if you can stand the visuals. I recommend not reading up too much on it, as that could easily spoil half the incredible surprises. Just know that what you see in the beginning is by far not everything.
      · 4 replies
    • freyk

      Tried to make a tdm advertisement commentpost at one of civvie11 youtube videos about T2. Post got marked as spam. His problem (to not discover TDM for himself),..not my problem.
      But some help of some fellow TDM yt-videocomment posters would be nice. To ask him and others, to play TDM. To get more players/creators. 
      · 5 replies
    • datiswous

      Currently Profile Information has 3 fields, these are shown in forum posts under your avatar:
      1. Gender
      2. Location
      3. Interests
      I think that it could be useful to have an extra field called "Operating system" (under location). It can be useful for tech support and to see what people use.
      Alternatively it could be a more general term, like PC system, so that you can for example state that you use an AMD gpu.
      · 2 replies
    • OrbWeaver

      Greetings fellow kids.
      · 11 replies
×
×
  • Create New...