Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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.

Posted

IIRC, the wiki says, "set this and if the seperation distance becomes larger, the object disappears". Or something like that. (not home atm)

Posted

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

Posted

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.

Posted

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

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.

Posted

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.

Posted

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
  • 5 years later...
Posted

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

Posted

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

 

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

  • Like 1
Posted
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...)

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

Posted
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

Posted

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

Posted
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

Posted

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.

  • Like 1
Posted
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
Posted

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. 

Guest
This topic is now closed to further replies.

  • Recent Status Updates

    • Ansome

      I'm back! Happy new years, TDM folks!
      I brought with me a quick update for my first FM that fixes up a lot of small issues that didn't get caught in beta testing. I didn't exactly expect it to take me nearly 9 months to release a patch, but it's been a wild year to say the least. Teaching, finishing up my Master's of Education, and all manner of other events forced me to drop out of the anniversary FM contest and ate up all my time, but I'm back again in a comfortable position to start catching up on all the new FMs. I may even start work on another spooky project of greater length and difficulty in the coming year.
      Thanks again for the warm welcome to the community and have a happy new year!
      · 2 replies
    • JackFarmer

      I got myself the apple tv trial subscription. I have to say, “Foundation” (season 1) is very exciting. Shall I read the books as well?
      · 2 replies
    • datiswous

      One more like..
       

      · 3 replies
    • snatcher

      TDM Modpack v4.6 released!
      Introducing... the Forward Lantern mod.
      · 0 replies
    • JackFarmer

      Where is the "Game Connection" element in the Linux version of DR? I could swear, I saw that in an older build (which I conveniently deleted a few days ago).
      · 5 replies
×
×
  • Create New...