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

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

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

    • peter_spy

      What a lovely game, perfect way to relax before sleep.
      · 3 replies
    • STiFU

      Anyone here clocking in some times in Neon Light?
      · 0 replies
    • JackFarmer

      Boris Johnson's resignation does not change the fact that Australia is home to 29 million kangaroos and Wales has a population of just over three million.

      If the Australian kangaroos were to invade Wales, one resident would have to fight almost ten kangaroos at a time.
      · 8 replies
    • peter_spy

      Deathloop – what a mess of a game. I'd love to see a post-mortem on it some day. I hope Arkane is doing okay though.
      · 27 replies
    • OrbWeaver

      I like house-cleaning and taking out the trash.
      · 3 replies
×
×
  • Create New...