Jump to content
The Dark Mod Forums

Water effects not rendered through warp glass


Recommended Posts

As requested, a test map to illustrate the issue of water effects not rendering through warp glass. Original thread starts here: https://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/page/437/#comment-475239

 

tagging @duzenko

In the attached map, there are 3 glass windows looking out over 3 different types of water.  There is a rain weather patch above it, and a rainsplash patch directly above the water. The middle window is clear glass, and the outer ones are clear warp.  You can see that the water isn't visible through the warp glass, nor is the rainsplash. The rain itself is visible through all of them though.

 

 

render.map

  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

OK, so I was wrong

It's not only about surface draw order but also the fact that each distortion takes a backdrop screenshot as a texture

So multiple surfaces/materials will require multiple screenshots, and it's at least worth a preliminary discussion

@stgatilov

BTW I'm not seeing rain splash effect on my config at all

Link to comment
Share on other sites

28 minutes ago, duzenko said:

BTW I'm not seeing rain splash effect on my config at all

Can you see it if you walk right up to the water (i.e. not through the windows)?

I'll double check later, but pretty sure I could see it directly, and through the clear glass window.

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

3 hours ago, duzenko said:

each distortion takes a backdrop screenshot as a texture

So multiple surfaces/materials will require multiple screenshots, and it's at least worth a preliminary discussion

I've never programmed how a shader is drawn in my life, but it seems like you're saying that this "screenshot" is sent out of the graphics card, to become an actual texture. Why? Can't you take the output of the first render pass, with one effect, and use it as an input for a second render pass, and so on? ...or, ideally, if you're really savvy, just apply the effects on the first pixel-by-pixel pass. Anything but sending the data out of the graphics card before it's fully rendered - that must take ages.

Link to comment
Share on other sites

1 hour ago, Nort said:

I've never programmed how a shader is drawn in my life, but it seems like you're saying that this "screenshot" is sent out of the graphics card, to become an actual texture. Why? Can't you take the output of the first render pass, with one effect, and use it as an input for a second render pass, and so on? ...or, ideally, if you're really savvy, just apply the effects on the first pixel-by-pixel pass. Anything but sending the data out of the graphics card before it's fully rendered - that must take ages.

That's what I meant, yes:

Quote

you take the output of the first render pass, with one effect, and use it as an input for a second render pass, and so on

 

Link to comment
Share on other sites

@Frost_Salamander

Should it be implemented as material flag. entity spawnarg, or global map parameter? I'm reluctant to force enable this for all because it's a huge potential fps drop in existing missions

BTW I can see the splash particle now but you should really stretch it to the size of the rain particle because it's rather confusing otherwise

Link to comment
Share on other sites

27 minutes ago, duzenko said:

@Frost_Salamander

Should it be implemented as material flag. entity spawnarg, or global map parameter? I'm reluctant to force enable this for all because it's a huge potential fps drop in existing missions

I'll let others weigh in on this as well as I'm a relatively inexperienced mapper (I've only got one FM under my belt). 

  • How would it work as a material flag?  I feel like I wouldn't want to have to fiddle with materials files if I'm just using stock textures. 
  • If it was an entity spawnarg, would it go on the window or the water entity?  This might be the best for fine-grained control
  • global map parameter - would this be a spawnarg on worldspawn like we do for the shop entity?

Would it really affect that many existing missions?  Maybe my memory isn't that great, but I don't remember seeing a lot of glass used in existing FMs, but could be totally wrong...

32 minutes ago, duzenko said:

BTW I can see the splash particle now but you should really stretch it to the size of the rain particle because it's rather confusing otherwise

I didn't even know you could stretch particles.  Or do you mean the size of the patch?  Not sure what you mean here 🙂 

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

https://drive.google.com/file/d/0B9OoHSmkeSeNZWdyZFliQkNsVTA/view?usp=sharing&resourcekey=0-4XspmLMtaTte6z6CuIB42g

When game has loaded, go to console and toggle r_ignore 0/1 to switch this on and off

This is not a 'fix', just something to play around while we discuss this further

We still need to decide how we make your design to opt it into this

image.png.ce4cfea32a7b8fde05297b1c4fd77c13.png

Link to comment
Share on other sites

11 minutes ago, nbohr1more said:

Related internal discussion?

 

I totally forgot about that

Still, if we just add the drawSortOffset spawnarg on the window entity it's unlike to make it overlap properly, no? It's hard for me to check because the test map window is a brush, not an entity.

I think this request is different to that, - @Dragofer asked for "regular" translucents, while we're talking about screenshot-based distortions here.

Link to comment
Share on other sites

@duzenko

you could just change one of the windows that are using clear_warp to a func_static.  Do you want me to attach a new version of the test map? If so, is there anything else I can put in it to make it more useful?

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

1 minute ago, Frost_Salamander said:

@duzenko

you could just change one of the windows that are using clear_warp to a func_static.  Do you want me to attach a new version of the test map? If so, is there anything else I can put in it to make it more useful?

I think that's the only change worth your time right now

Yes, please attach new version

Link to comment
Share on other sites

here you go.  The warp window on the far right (as you face the water) is now a func_static.

 

 

render.map

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

the only other thing I did (and I forgot to mention, sorry) is I made the windows a bit thinner, but that shouldn't have made a difference in terms of the number of surfaces right?

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

5 minutes ago, Frost_Salamander said:

the only other thing I did (and I forgot to mention, sorry) is I made the windows a bit thinner, but that shouldn't have made a difference in terms of the number of surfaces right?

I suppose so - I will play with it more

Link to comment
Share on other sites

just had a look, and there is definitely only the one window entity there that was formed from a single brush. If anything else changed I have no idea what is was...

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

Sorry, can we have another model/material combination here?

I'm asking because since the window is two-sided (per material) and has a reflection stage which triggers it to generate a second set of back faces, on top of already having two geometry layers

It makes debugging and testing cumbersome

Link to comment
Share on other sites

Sure, but I'll need you to specify exactly what you need because I don't really understand what's happening on the same level as you do. Name it and I'll add it to the map.

If it's not two-sided how do we replicate the issue?  Do you want a 'window' with only one face textured with the warp glass?

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

8 minutes ago, Frost_Salamander said:

Sure, but I'll need you to specify exactly what you need because I don't really understand what's happening on the same level as you do. Name it and I'll add it to the map.

If it's not two-sided how do we replicate the issue?  Do you want a 'window' with only one face textured with the warp glass?

Good question

Yes, just one face

And ideally with a material name that does not exist, such as "test_warp". I'll write a material file for it and give it to you later. This standard two-sided reflective material is messy.

Link to comment
Share on other sites

Let me get this straight:

- I change the window so it's only using the warp texture on one face.  Does it matter what's on the other side?

- I use a material name that doesn't exist.  How do I do that?  Should I copy/paste the existing shader to a new one, call it 'test_warp' and put that in the map?  You won't have it, but is the point that you will write one?

Sorry if I'm being thick - just want to make sure I understand before I upload a new version...

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

2 hours ago, Frost_Salamander said:

Let me get this straight:

- I change the window so it's only using the warp texture on one face.  Does it matter what's on the other side?

- I use a material name that doesn't exist.  How do I do that?  Should I copy/paste the existing shader to a new one, call it 'test_warp' and put that in the map?  You won't have it, but is the point that you will write one?

Sorry if I'm being thick - just want to make sure I understand before I upload a new version...

There should be one face in total

Just replace the current material name on the surface to "anything_else"

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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...