Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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
Posted

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

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

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

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

Posted
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

 

Posted

@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

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

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

Posted

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

Posted
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

Posted

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?

Posted
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

Posted

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

Posted

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

Posted

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?

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

Posted

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

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

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...