Jump to content
The Dark Mod Forums

Simulating atmospheric perspective


Springheel

Recommended Posts

Good question. Maybe in a section on visportals in the wiki?

 

The visportal article is very lengthy and didn't seem to have a good section it would relate to. There doesn't seem to be a Sky page surprisingly enough. I added a blurb in the Skybox Basic Details page where visportaling is talked about.

 

It's well covered in the City Street Visportal Tutorial which is where I learned about it.

 

Perhaps where I did as well, although I doubt I've ever searched the wiki for "City", heh, but it would've been a result googling the wiki for "visportal".

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Small example-map ( it's very artsy ) in the attachments. It has 2 sides of map with the same setup, but one side uses func_static over the skybox.

 

Can you help me parse what I'm seeing?

 

It doesn't appear that this map uses a skyportal, so the caulk isn't displaying anything. The only decal I can see is the decal over the top of the map on the right hand side. But it looks like a skybox decal over a skybox brush?

Link to comment
Share on other sites

Ok, I've tinkered with the map to make it closer to my situation. I've added a portalsky, for starters. When the map starts, you are looking towards two caulk walls, one on the left and one on the right. You can just make out the func_static tree and statue that are on the other side of a caulk brush. As you can see, the sky is not affected (good), but the caulk brushes are being fogged (bad).

 

What I would like is a way for the caulk brushes to show the portalsky without being fogged. Or alternately, let portalsky brushes show func_statics the way caulk does.

 

In the screenshot below, the caulk DOES show as transparent, except for the top of each brush which are making those white bars. In the game you'll see the entire area below that is white too. Erase those white bars and that's exactly how I'd like it to look in game.

sky_fog_caulk2.map.txt

post-9-0-62719400-1391044587_thumb.jpg

Link to comment
Share on other sites

Can you help me parse what I'm seeing?

 

It doesn't appear that this map uses a skyportal, so the caulk isn't displaying anything. The only decal I can see is the decal over the top of the map on the right hand side. But it looks like a skybox decal over a skybox brush?

 

It's a very basic example but the basic idea is there - i've edited your attached map again with a similar approach ( this time just using caulk behind the func_static sky parts ).

 

Another thing worth trying would be adding the following keywords to the skyPortal material :

 

noFragment
qer_nocarve

 

Then reloading the material and recompiling the map.

It causes the skyPortal brush to not be "cut away" where caulk touches it - that may or may not already be enough to fix the problems in your case.

sky_fog_caulk3.map.txt

Link to comment
Share on other sites

Cool! Just loaded the map, and now the left side looks exactly the way I want it. I'll study how you did it.

Link to comment
Share on other sites

Huh, so it's just turning the portalsky brush to caulk and then putting a portalsky decal in front? I wonder why that fixes it?

Link to comment
Share on other sites

The skyPortal func_static is just triangles to draw for the engine, caulk doesn't actually draw anything at all and in the case of these "holes in the sky" it seems to write the depth of the void behind it which is used by the fog and causes it to draw a strong fog color value.

 

One thing i'm not entirely sure of is if these func_statics may disappear if the leaf that contains their origin gets closed, or if the engine properly takes the model-bounds into account.

 

Please try the approach with the edited portalSky material too, if that turns out to fix the problem completely then that's the preferred way imo as it requires no in-map workarounds.

Link to comment
Share on other sites

Please try the approach with the edited portalSky material too, if that turns out to fix the problem completely then that's the preferred way imo as it requires no in-map workarounds.

 

Will do.

 

edit: Tried editing the portalsky, but it didn't seem to have any effect.

Link to comment
Share on other sites

I modified the mtr out of game, dmapped and then loaded the map. No good?

Link to comment
Share on other sites

Strange, i definitely see a difference when adding these keywords to the material, the parts that were normally "caulked away" show as proper sky after a compile of the testmap. The only artifacts that remain are due to PVS culling.

 

Oh well, maybe the func_static workaround is the better approach in your case.

Link to comment
Share on other sites

I loaded sky_fog_caulk3.map into DR and I've been I've been looking quizzically at it for 15 mins. I was expecting some trick placing sky texture in front of or behind the affected caulk wall to fix it, but the map doesn't: It just places big sky-textured FS in front of the void-sealing geometry. Have I understood it right now? (might also be helpful as a starting point for what should go in the wiki article, if the modified sky texture can't be made to work):

  • Caulk doesn't draw. It lets you peer into the void.
  • Useful trick: if you have any skyportal texture rendered somewhere in the area, it'll get painted over any void seen though caulk (but not on the surface of the caulk -- that was my confusion).
  • A quirk means that fog also gets painted over the void, and it'll be an infinite amount of fog. (EDIT: again, this fog is painted over the void, not on the face of your caulk brush, although it looks like that).
  • Caulk used as visleaf sealant cuts off brushes, including your sky brushes.
  • Caulk doesn't cut func statics.
  • If you cover any void-sealing brushes that would normally have sky texture on them with a single, large func static painted with sky texture, then caulk won't show you any void because every possible view angle is occupied by an FS that stretches out of your current visleaf. So no void, no infinite fog.

Edited by SteveL
Link to comment
Share on other sites

Actually, after writing that, a possible problem with the method occurred to me. It only works if every view angle through the caulk is occupied by the FS. That's the case in the test map, but probably not in many real maps. If there are any brushes in the way, the caulk in front of those brushes will get fogged. I just tried it out on sky_fog_caulk3.map by lowering the brushes below the caulk a bit, and yes, unfortunately, we're back to fogged caulk :-(

 

EDIT: Sorry, my bad. Of course the brushes get clipped by the caulk. My quick test deceived me because of the short opacity radius of the fog. I increased it to 20k, and the illusion (and fog) were gone.

Edited by SteveL
Link to comment
Share on other sites

Once I go through the process myself I'll add it to the wiki. But I'm saving the fog for the end now.

Link to comment
Share on other sites

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...