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

Link to comment
Share on other sites

21 hours ago, Frost_Salamander said:

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.

For what it's worth, I tested and this is what I see as well.

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 🙂 

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?

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

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?

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?

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

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.

 Share

  • Recent Status Updates

    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 3 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 8 replies
    • Xolvix

      I still play classic Doom (albeit with user-made mods and maps rather than the original campaign) on a regular basis. A game from the early 90's which has still got a healthy following in 2022. Pretty amazing.
      · 3 replies
    • Nort

      I'm beginning to understand why people who aren't into social clubbing "don't last long" on this project, and why it's so full of holes. When moderators are siding with bullies, by closing down threads that they derail, then I start to wonder if I should support the platform to begin with.
      I'm sure that the core development is solid, but when you're constantly tone policed and bullied, and moderators are playing into it too, then the project will just drive away talent, and replace it with socialites instead. ...and without talent, you only end up with a small skeleton crew trying to do everything themselves.
      ...so Dragofer and Airship Ballet, and all you other socialites, you win. From now on I'll just keep to myself. You'll never be able to do my work, but at least you'll be happy together, and that's what matters to you.
       
      Update
      Actually, I have to revise my statement:
      I actually messaged greebo - the top dog, I gather - about nbohr1more's outburst of insanity below, and since I haven't even heard back from him, I just have to assume that there's not a single core programmer here, who's not backing nbohr's threats. ...and that's bad.
      ...so if you're a newbie reading this, or an honest soul like ZergRush, then just slowly back out of these forums, run, and don't look back. This is nothing more than a cult posing as a game development project, using Thief and IDTech4 to sucker hopefuls in, to do work for them, while trying to cajole them into something going on behind the scenes, which apparently - according to nbohr - is something that should be hidden from the state. These people aren't programmers - they don't even understand things like how to fix the simplest bugs. All they have, is an engine, and an IP, and some sort of fascist social cult. There was some other project I saw being made in the Unreal Engine. Try joining that project. ...or start a project of your own. Anything but this asylum.
      Hopefully that was "divisive" enough for a final post, because at this point I really want people to leave this place. This project is, on a management level, just awful garbage, run by garbage people, apparently from the top down, and I'm just glad that they have a garbage place to stay, together, and hopefully forever.
      Nort
      · 9 replies
    • The Black Arrow  »  Araneidae

      A spidey! I love spideys 🕷️
      · 0 replies
×
×
  • Create New...