Frost_Salamander Posted June 20, 2022 Report Share Posted June 20, 2022 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 1 Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 21, 2022 Report Share Posted June 21, 2022 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 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 21, 2022 Author Report Share Posted June 21, 2022 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. Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
datiswous Posted June 21, 2022 Report Share Posted June 21, 2022 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. Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 21, 2022 Author Report Share Posted June 21, 2022 yeah just double-checked, can definitely see the rain splash.. Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
Nort Posted June 21, 2022 Report Share Posted June 21, 2022 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. Quote Link to comment Share on other sites More sharing options...
duzenko Posted June 21, 2022 Report Share Posted June 21, 2022 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 Quote Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 @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 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 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 Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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 Quote Link to comment Share on other sites More sharing options...
nbohr1more Posted June 24, 2022 Report Share Posted June 24, 2022 Related internal discussion? 1 Quote Please visit TDM's IndieDB site and help promote the mod: http://www.indiedb.com/mods/the-dark-mod (Yeah, shameless promotion... but traffic is traffic folks...) Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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. Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 @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? Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 here you go. The warp window on the far right (as you face the water) is now a func_static. render.map Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 1 hour ago, Frost_Salamander said: here you go. The warp window on the far right (as you face the water) is now a func_static. render.map 36.64 kB · 1 download Something else changed though and it now behaves differently It was 14 surfaces to draw, now it's 16 Quote Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 Here I single out the window entity and no clipped into it So it's two layers now, and I think it was only one? Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 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? Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 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... Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 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? Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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. Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted June 24, 2022 Author Report Share Posted June 24, 2022 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... Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, In Plain Sight High Expectations Link to comment Share on other sites More sharing options...
duzenko Posted June 24, 2022 Report Share Posted June 24, 2022 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" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.