World of Banished

Conversations => General Discussion => Topic started by: Paeng on May 16, 2017, 05:46:55 AM

Title: Pink Water
Post by: Paeng on May 16, 2017, 05:46:55 AM
That new canal water is taxing my graphics setup... too weak, LOL   :D

* And I fear there is not much I can do about it right now...  :-[

Title: Re: Pink Water
Post by: calli74 on May 16, 2017, 09:29:35 AM
I have the same problem, I tried changing to DX9 but then my game crashed so I don't know if that helps. My graphic card is 5 years old though :(, an ATI HD 7700.
Title: Re: Pink Water
Post by: Bartender on May 16, 2017, 09:45:43 AM
Hmm, that is odd indeed. Could you guys post a screenshot of your video settings so I can try to reproduce the error? I see that the regular water is not doing this, which leads me to believe that it might be something I did in the code. It's very strange how it cuts off on the left side of the screenshot though, or is that a bit of regular water we're seeing there?

Changing the DX while the game is running crashes it for me too, try changing it in the menu.
Title: Re: Pink Water
Post by: RedKetchup on May 16, 2017, 10:02:51 AM
?? wut ??

is it an old ati too @Paeng ?
Title: Re: Pink Water
Post by: Paeng on May 16, 2017, 10:36:11 AM
is it an old ati too

No, this is on my laptop... Intel(R) HD Graphics 3000... driver is current.


Could you guys post a screenshot of your video settings

Attached...

Quote
I see that the regular water is not doing this (...snip...) It's very strange how it cuts off on the left side of the screenshot though, or is that a bit of regular water we're seeing there?

Correct, where the canals touches "true" water (either stream or creek) this does not happen...

Quote
Changing the DX while the game is running crashes it for me too, try changing it in the menu.

Well, I tried every possible setting (reasonable or unreasonable)  ;)

The pink wouldn't budge at all... and for whatever this might be worth - it's a "singularity", never seen anything like it before   :)


Title: Re: Pink Water
Post by: RedKetchup on May 16, 2017, 01:40:22 PM
poor @Paeng :(

i cannot help you there, my friend  :'(



btw, do you live near this place ?
(http://traveleering.com/wp-content/uploads/2014/07/Pink-Lake.jpg)
Title: Re: Pink Water
Post by: Bartender on May 16, 2017, 02:26:38 PM
Thanks Paeng! I tried your settings, but unfortunately I can't reproduce the bug on my system. I suspect that it's something hardware related indeed. I will try to delve into the code to see which changes might have led to this problem, though without being able to reproduce it myself it's going to be a bit of a shot in the dark.
Title: Re: Pink Water
Post by: brads3 on May 16, 2017, 04:47:24 PM
tune in next week where the trees will be blue and the grass white.LOL RED's new comp goofed ya's up already.
Title: Re: Pink Water
Post by: QueryEverything on May 16, 2017, 05:54:36 PM
Haha @RedKetchup you beat me to it, I was going to suggest that it reminded me of the great lakes here in Australia which are well known to be pink :)  It's a bacteria that cause the colour to be so vibrant :D
http://www.australiangeographic.com.au/topics/science-environment/2016/12/australias-pink-lakes

Sorry about the glitch @Paeng if it wasn't a sign of something wonky with the system setup, I'd happily have pink water.
1)  Pink's my colour (it never was until I turned 30!!)
2)  And it's an Aussie icon, the pink water :D
Title: Re: Pink Water
Post by: RedKetchup on May 16, 2017, 06:54:47 PM
It's a bacteria that cause the colour to be so vibrant :D


bacteria ? wait, do you have viruses ? Paeng ?
Title: Re: Pink Water
Post by: embx61 on May 16, 2017, 07:17:32 PM
Are there any color issues with the irrigation channels as well?
Title: Re: Pink Water
Post by: Paeng on May 17, 2017, 04:01:57 AM
Are there any color issues with the irrigation channels as well?

Nope, none at all...


bacteria ? wait, do you have viruses ? Paeng ?

 :D


I suspect that it's something hardware related indeed.

Yeah, I tend to say don't sweat over it... seems to be a fluke on old HW, Calli with an outdated ATI (which are known to be... ummm... sensitive, anyway...) and me, I currently don't even have a dedicated card...  :(

At worst, I'll just take b/w pics of the canals  LOL  :D
Title: Re: Pink Water
Post by: RedKetchup on May 17, 2017, 04:59:39 AM

At worst, I'll just take b/w pics of the canals  LOL  :D

so sad !

man. i spent 1025 last week to upgrade myself... and i wasnt so bad. in fact i kept my video card and garbaged everything else (out of 12 HDs of 2tb each loL)

you need to upgrade your portable / or buy a real pc :P
since year you should have done that lol
Title: Re: Pink Water
Post by: Paeng on May 17, 2017, 12:47:39 PM
buy a real pc

It'll come some day... since I retired, money isn't as loose as it used to be   ;)
Title: Re: Pink Water
Post by: calli74 on May 17, 2017, 02:43:50 PM
I gotta be a good girl til Sinterklaas then maybe I can get a very special present. Knowing my luck I'll be carted off to Spain in a big sack.
Title: Re: Pink Water
Post by: Glenn on May 17, 2017, 06:45:46 PM
I think there may be a minor error in the coding used to create the water of the game.

When I place a canal piece on a river the water matches perfectly, however when i place a piece on the land the water in the canal  is a silvery colour.

Similarly if you place a piece partly on a river and the land you get both colours appearing.

Title: Re: Pink Water
Post by: calli74 on May 17, 2017, 07:15:01 PM
I switched to DX9 then I get a silvery colour, with DX 11 I get the pink. I've been trying to test tonight while it's too hot to sleep to see if I could find a graphic setting on my driver software that would make it work but apart from getting the silver with DX9 which looks better but still not quite right, nothing else helped.
Title: Re: Pink Water
Post by: brads3 on May 17, 2017, 07:16:15 PM
hmmmm sounds like our last president. everything was umm rainbow colored.
Title: Re: Pink Water
Post by: Bartender on May 18, 2017, 08:59:40 AM
I think there may be a minor error in the coding used to create the water of the game.

I'm afraid it's not that simple, as the bug only occurs on certain systems. It's essentially a certain combination of code, hardware and possibly DirectX that's at fault here, Which is a very tough nut to crack. What complicates matters even further is that I can't reproduce the bug on my own pc, which means that trying to fix it is going to be a complete shot in the dark.

I switched to DX9 then I get a silvery colour, with DX 11 I get the pink. I've been trying to test tonight while it's too hot to sleep to see if I could find a graphic setting on my driver software that would make it work but apart from getting the silver with DX9 which looks better but still not quite right, nothing else helped.

Thanks for sharing, this is valuable information. There are some parts of the code that work differently depending on which DirectX version is used, so that might be where I need to search. Could you perhaps share a screenshot of the silver water with me? Just so I can see what it looks like. I'm also interested in seeing how the ground looks when the canal is removed again; is it also pink/silvery or is it the regular blue?
Title: Re: Pink Water
Post by: calli74 on May 18, 2017, 12:05:59 PM
(https://gpkkow-sn3301.files.1drv.com/y4m6mm2Y5-bPTDpMDjrctqroQrIk4m95U-4twz7p5DtE26ZgtK8NAsbUUvgtUbAENBTHzw4Mm1JDDHTTm4V1UHgAeBdrC0n97R5HHHoWBqNsESDvwtcW42rkA_LF57lqcPAi9yuF-gSs0J3iZACuGeAuTWH3mz-dhUJ6R5YnsHjly36iZ18QMtI5XRxkqQagZah-ldyFyJusBPH8w-yMm3jJA?width=800&height=450&cropmode=none)

Here is a screen shot for you, with one part demolished and where the gate is and it touches the real water, there you can see how the water should look, the rest is silvery or pink with DX11, this shot is with DX9c
Title: Re: Pink Water
Post by: brads3 on May 18, 2017, 12:47:57 PM
looks like it has to do with areas that don't have water normally. is there a way to make a mod that will add the new water to the entire map so when the canals are used it would look normal? or just stretch the water texture in the game to full map size? might be the easiest solution.
Title: Re: Pink Water
Post by: elemental on May 18, 2017, 03:29:40 PM
looks like it has to do with areas that don't have water normally. is there a way to make a mod that will add the new water to the entire map so when the canals are used it would look normal? or just stretch the water texture in the game to full map size? might be the easiest solution.

Now that would be good. Sounds like it might be difficult to achieve, but who knows...
Title: Re: Pink Water
Post by: RedKetchup on May 18, 2017, 07:16:47 PM
not really. on the entire map the water will flow in ONE direction, entirely. thats nobody wants. streams should go as you want turn here turn there.
with 1 covering the map, the entire map will be one way from point 0,0 to 1024,1024 ^^
Title: Re: Pink Water
Post by: ancientmuse on May 19, 2017, 12:09:01 AM
I've got the pink water problem too, and I notice that it only goes pink on the land areas but not the spots where it's linked to the regular water areas.

System:

AMD Phenom II x6 Core Processor
16 GB ram
Win 7 o/s


Graphics Card:

AMD Radeon HD 6900
Title: Re: Pink Water
Post by: calli74 on May 19, 2017, 12:14:30 AM
I guess we better send all these naughty AMD cards to stand in the corner. Maybe I will get an nvidia next time. My husband just got a shiny new computer, so now it's my turn for upgrades, but will have to wait a while. My specs are
AMD FX 6300
8gb ram
AMD 7700
Windows 10 home.
Title: Re: Pink Water
Post by: Bartender on May 19, 2017, 04:08:43 AM
Thanks for the information everyone! I'm starting to get some ideas as to what the problem is. The next step would be finding a solution.

There's a few hypotheses I have so far. I've added some questions that I have for each, answers to any of those would be a great help in figuring out this problem!

1. It appears that the problem only occurs on systems with AMD graphic cards.
- Is there anyone with an AMD card that does not have this problem?
- Is there anyone with a card that is not an AMD that has this problem?

2. using DX9 consistently gives the water a white (silvery) colour, dx11 consistently gives magenta (pink).
- Is there anyone who has the problem, but the behaviour is different than I described here?

3. The problem appears to be related to the semi-transparent nature of the water texture.
- I've read somewhere that the problem did not occur for the irrigation system made by embx, can anyone confirm this?
- Are reflections and underwater textures (parts of the walls in the canals) still visible?

Title: Re: Pink Water
Post by: Paeng on May 19, 2017, 04:55:44 AM
1) can't say, integrated graphics (Intel HD 3000); i5 2430M (2.4GHz), ACPI 64-based PC

2) yes, confirmed - silver on dx9c, pink on dx11

3) yes, Embx Irrigation looks the same on dx9 or 11, same with Necora terraforming items

* Though not quite sure what you mean by this - here a screenshot (attached) -

- Are reflections and underwater textures (parts of the walls in the canals) still visible?


Hth  :)


Title: Re: Pink Water
Post by: Discrepancy on May 19, 2017, 06:10:52 AM
I can confirm it must be AMD...

(http://i.imgur.com/3WPfhj2.jpg)
(http://i.imgur.com/ZPYn9XW.jpg)

AMD FX-6300 6-core 3.5GHz processor
16gb ram
Win10
Title: Re: Pink Water
Post by: RedKetchup on May 19, 2017, 06:17:08 AM
tommorow i ll give you a test.pkm to try :)
i want to test something. when i mean tomm.... it is i am not gone to bed yet, so after the bed and 4-5 coffee after ^^
Title: Re: Pink Water
Post by: Necora on May 19, 2017, 08:45:16 AM
AMD A10-8700P Radeon R6, 10 Compute Cores, 12GB RAM, 64 bit windows 10.

I get the silver on DX 9c and the Pink on DX 11.

Although, on DX 9C if I zoom out as far as possible it looks better. Also, having shadows turned on or off makes no difference, but having reflect everything turned on seems to make the reflections of the walls and trees look OK but not the rest.

Title: Re: Pink Water
Post by: embx61 on May 19, 2017, 10:48:23 AM
I have my own texture for the color of the water as I am above ground. Maybe Red can put a plane with a watercolor between the ingame water texture and the plane with the water moving part as a test?

What Bartender means is that on the side of the channels the channels brick texture is still visible between the top layer (Moving water) and the bottom layer (The color of the water)

Title: Re: Pink Water
Post by: Bartender on May 19, 2017, 11:08:21 AM
Thanks for the screenshots and answers to the questions!

This mostly confirms my hypotheses, so that's good. Essentially what is happening is that the new water somehow refuses to reflect the sky, though it still reflects everything else. I will try to make a small test with several possible solutions this weekend, hopefully one of those will solve it.

@embx61 it's good to know that putting a plane underneath definitely works, although this wouldn't look completely natural for large bodies of water. I'm curious to see how it would work if the plane uses the OpaqueInWaterMaterial though, so that's one of the things I'm going to test.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 03:57:04 AM
@Paeng  , @calli74  , @Discrepancy  , @Necora , @Whoyou13   : Can you test this ?

start a new game with ONLY this ...Test.pkm.
build 3x 4x straight Classic stones and build 3x 4x straight Old Brick style
rotate and tell me if still some pink / silvery reflections. put picture too please
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 04:06:56 AM
Yes there is still pink with dx11, and silver with dx9:

Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 04:13:21 AM
Yes there is still pink with dx11, and silver with dx9:



boooo hoouhoouu  :'(  :'(  :'(

i thought that was maybe the way the old pieces of the NMT2.0 canal system was built : it was not a "plane" for the water but a "thin box of 0,01 thick". (a box has a side on top, but also a side beneath)
and i thought that maybe it was the culprit. the reflection of the side "beneath" the box was messing with the reflections of the "top".


oh well  :'(
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 04:19:51 AM
What does influence it though is nearby shadows, so @Bartender is correct, it isn't reflecting the sky, but a nearby tree/barn casting a shadow on the water make it appear normal, with the reflection.

@RedKetchup , I wonder what would happen if you put an inverted plane above the water plane, with a blue texture.
If the face is pointing down, we should look through it, but the water will reflect it?
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 04:20:28 AM
and it doesnt do that with : 3.0 Pond ??? embx61 moving water ? irrigations ?
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 04:21:46 AM
I haven't tried myself. I will download them now.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 04:27:03 AM
I haven't tried myself. I will download them now.

ok @Discrepancy  waiting for you on these extended tests :)
Title: Re: Pink Water
Post by: Bartender on May 20, 2017, 04:32:28 AM
What does influence it though is nearby shadows, so @Bartender is correct, it isn't reflecting the sky, but a nearby tree/barn casting a shadow on the water make it appear normal, with the reflection.

@RedKetchup , I wonder what would happen if you put an inverted plane above the water plane, with a blue texture.
If the face is pointing down, we should look through it, but the water will reflect it?

This could be a very elegant solution! We could even give that plane a sky texture so that it looks almost like the natural water.

and it doesnt do that with : 3.0 Pond ??? embx61 moving water ? irrigations ?

The reflections of the sky work in a very weird way.. essentially the water needs the blue lowered ground underneath it in order to reflect the sky. Any water that doesn't have lowered ground under it will just appear transparent, and will need to get its colour from what's underneath it.
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 04:41:04 AM
ok @Discrepancy  waiting for you on these extended tests :)

They all look great:
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 04:45:50 AM
but at what distance beneath i need to put this extra blue sky plane ? closer i put it near the moving water and less we will see bricks walls continuing down under water :P

i am gonna do a first test at -0,3' beneath the moving water
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 04:55:04 AM
the problem it does that :  ??? can you test ?
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 04:56:43 AM
I'm also quickly making a mod that will add an invisible sky. just about to test.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:02:27 AM
I'm also quickly making a mod that will add an invisible sky. just about to test.

i cannot test anything myself :S so i need testers
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:16:04 AM
i cannot test anything myself :S so i need testers

i wont go to the store and buy a BAD amd radeon just for testing what amd users are experimenting....
i have another test rdy with something else...

gonna go play civ VI in wait :P
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 05:20:47 AM
okay well this is the test before:
it is still there, though not as bad.

so you put a plane under the water?

my modkit has decided to break, getting weird faults when I try to compile anything :(

I will now try this next test @RedKetchup
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:24:21 AM
okay well this is the test before:
it is still there, though not as bad.

so you put a plane under the water?

my modkit has decided to break, getting weird faults when I try to compile anything :(

I will now try this next test @RedKetchup

yes i did a blue plane at -0,3 beneath the water. looks not enough "near" of the water itself. more near and less bricks we would see.
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 05:26:27 AM
Okay next test looks better, but still visible:

(reply #45)
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:31:24 AM
Okay next test looks better, but still visible:


oh !!!

and this  ? :
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:35:31 AM
Okay next test looks better, but still visible:


oh !!!

and this  ? :

and this last one ?
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 05:44:29 AM
oh !!!

and this  ? :

(reply #49)
Title: Re: Pink Water
Post by: Bartender on May 20, 2017, 05:45:48 AM
That's looking promising!

Do you guys mind sharing what it is exactly you're doing in each of these tests ;)? perhaps it might help me to understand the problem with the code
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 05:48:26 AM
and this last one ?

not so good...

(reply #50)
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:54:21 AM
That's looking promising!

Do you guys mind sharing what it is exactly you're doing in each of these tests ;)? perhaps it might help me to understand the problem with the code

bah the very first test is i noticed my old canal parts had a box of 0,01' think instead of a simple plane. a box is like a 6-side dice and has 6 sides.
but it changed nothing :( a plane or a box change nothing for amd users.

2nd test i ve put a blue plane under water spaced at -0,3' beneath. the problem is i cannot put a blue plane it looks terribad with the brickswalls. it is not a pond or an wood made irrigation system : it is a canal !

so the next tests i made is the same blue texture plane but upside-down 180%. the blue textured side is beneath, and ontop is the invisible side ^^
so we dont see it properly since we see the invisible side.... but i hope the amd video card is seeing it and still take the reflection of the beneath side into compute ^^

first i started at +0,1" ontop of water. the next was at 0.05' ontop and last at 0,05 minus beneath water :P
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 05:55:28 AM
@Bartender  @RedKetchup , my ghost sky works:

it is a 12x12 plane, with the face inverted, so from above we are looking from behind it.
It is a seamless sky texture. the plane sits -.01 below ground
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 05:58:37 AM
and this last one ?

not so good...

so if that inversed upside own plane is not good if it is below the water.

last one : at +0,01 ontop this is the closest to the water i can do
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 06:01:27 AM
....
so the next tests i made is the same blue texture plane but upside-down 180%. the blue textured side is beneath, and ontop is the invisible side ^^
so we dont see it properly since we see the invisible side.... but i hope the amd video card is seeing it and still take the reflection of the beneath side into compute ^^

first i started at +0,1" ontop of water. the next was at 0.05' ontop and last at 0,05 minus beneath water :P

so this was above your water level?, which test was it?
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 06:06:51 AM
and this last one ?

not so good...

so if that inversed upside own plane is not good if it is below the water.

last one : at +0,01 ontop this is the closest to the water i can do

this latest test (reply #56),

looks okay close up, but heavy 'moire' (you can see the circle patterns')
from a far it gets pinker.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 06:08:14 AM
reply #45 is inversed at +0,1' of the water ( water at -0,76 z , the inversed at -0,66 z)
reply # 49 is inversed at +0,05' of the water ( water at -0,76z , the inversed at -0,71 z)
reply # 50 is inversed at -0,05 of the water ( water at -0,76z , and the inversed at -0,81z) which seems cannot be under the water.
last reply at #56 is still inversed at +0,01 of the water ( water at -0,76 and the inversed at -0,75z) too close = moiré
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 06:16:21 AM
this latest test,

looks okay close up, but heavy 'moire' (you can see the circle patterns')
from a far it gets pinker.

so we cant get close. the difference with my inversed and yours : i have same size as the canal : 4x4 . your inversed seamless sky is 12x12  so lot bigger to maybe catch the view angles.

i think the last test will be at +0,05 ontop of the water (water at -0,76 and sky at -0,71) .... but alot much larger like (6x6 ? 8x8 ?) they will get ontop each other for sure :(
Title: Re: Pink Water
Post by: Bartender on May 20, 2017, 06:16:46 AM
@Bartender  @RedKetchup , my ghost sky works:

it is a 12x12 plane, with the face inverted, so from above we are looking from behind it.
It is a seamless sky texture. the plane sits -.01 below ground

This is great news! Perhaps adding a ghost sky is the easiest solution then, that way people with AMD cards can make it work, but we don't have to compromise on quality for people with other cards.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 06:24:01 AM
@Bartender  @RedKetchup , my ghost sky works:

it is a 12x12 plane, with the face inverted, so from above we are looking from behind it.
It is a seamless sky texture. the plane sits -.01 below ground

This is great news! Perhaps adding a ghost sky is the easiest solution then, that way people with AMD cards can make it work, but we don't have to compromise on quality for people with other cards.

yes there is : extra big shadows that is darkening alot the water and lower parts. specially the water is alot more darker to compare the rivers and lakes.
it is not really the optimum fix we would search. maybe Luke can answer that ? if you cant @Bartender  find something better with the code ?
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 06:36:05 AM
yes there is : extra big shadows that is darkening alot the water and lower parts. specially the water is alot more darker to compare the rivers and lakes.
it is not really the optimum fix we would search.

you are right.

the ghost sky shades the water too much.... back to the drawing board!

(reply #60)
Title: Re: Pink Water
Post by: Bartender on May 20, 2017, 06:41:33 AM
You can disable the shadow by making a simple change in the material rsc file . In the rsDepth, you go to the Depth _depth part and set bool _enable = false.

I'll still make some tests with code changes, I just need to find the time ;).
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 06:54:09 AM
You can disable the shadow by making a simple change in the material rsc file . In the rsDepth, you go to the Depth _depth part and set bool _enable = false.

I'll still make some tests with code changes, I just need to find the time ;).

I couldn't get that to work. it still showed the same. but maybe I did something wrong.  A break for now... 2.5 hours and nothing achieved.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 07:04:10 AM
You can disable the shadow by making a simple change in the material rsc file . In the rsDepth, you go to the Depth _depth part and set bool _enable = false.

I'll still make some tests with code changes, I just need to find the time ;).

I couldn't get that to work. it still showed the same. but maybe I did something wrong.  A break for now... 2.5 hours and nothing achieved.

i really THANKS YOU @Discrepancy  !!! without you i cannot test anything :( we are like a blind mind in a unknown maze.

for sure this is not a viable option.
Title: Re: Pink Water
Post by: calli74 on May 20, 2017, 07:36:14 AM
Thank you @RedKetchup and @Discrepancy for all this work and testing you are doing, hopefully it'll lead to a breakthrough, those canals are so beautiful that I'm sad my naughty card doesn't display them properly.
Title: Re: Pink Water
Post by: Discrepancy on May 20, 2017, 07:37:48 AM
... I'm sad my naughty card doesn't display them properly.

me too.

I wish I'd spent a bit more and bought different.
Title: Re: Pink Water
Post by: Bartender on May 20, 2017, 07:51:57 AM
You can disable the shadow by making a simple change in the material rsc file . In the rsDepth, you go to the Depth _depth part and set bool _enable = false.

I'll still make some tests with code changes, I just need to find the time ;).

I couldn't get that to work. it still showed the same. but maybe I did something wrong.  A break for now... 2.5 hours and nothing achieved.
Hmm, what material are you using? I just tried it with an adaptation of the OpaqueMaterial, and that works for me. here's what it looks like:

Code: [Select]
Material resource
{
MaterialType _type = Opaque;
VideoProgram _passes
[
"normal"
"depth"
"reflect"
]
}

VideoProgram normal
{
VertexLayout _vertexLayout = "MeshLayout\ModelLayout.rsc";
VertexProgram _vertexProgram = "OpaqueMaterial.srsl:Normal_vs";
PixelProgram _pixelProgram = "OpaqueMaterial.srsl:Normal_ps";
RenderState _renderState = "rs";
}

VideoProgram depth
{
VertexLayout _vertexLayout = "MeshLayout\ModelDepthLayout.rsc";
VertexProgram _vertexProgram = "OpaqueMaterial.srsl:Depth_vs";
PixelProgram _pixelProgram = "OpaqueMaterial.srsl:Depth_ps";
RenderState _renderState = "rsDepth";
}

VideoProgram reflect : "normal"
{
RenderState _renderState = "rsRef";
}

RenderState rs
{
AlphaBlend _alphaBlend
{
bool _enable = false;
Blend _source = One;
Blend _dest = Zero;
BlendOp _op = Add;
ColorWrite _writeMask = Red | Green | Blue | Alpha;
}
Depth _depth
{
bool _enable = false;
bool _write = true;
Compare _compare = LessEqual;
float _bias = 0.000000;
float _slopeBias = 0.000000;
}
Stencil _stencil
{
bool _enable = false;
bool _twosided = false;
Compare _compare = Greater;
uchar _ref = 0;
StencilOp _fail = Keep;
StencilOp _zFail = Keep;
StencilOp _pass = Keep;
StencilOp _tsFail = Keep;
StencilOp _tsZFail = Keep;
StencilOp _tsPass = Keep;
}
CullMode _cullMode = BackFaces;
CullMode _fillMode = Solid;
}

RenderState rsDepth
{
AlphaBlend _alphaBlend
{
bool _enable = false;
Blend _source = One;
Blend _dest = Zero;
BlendOp _op = Add;
ColorWrite _writeMask = 0;
}
Depth _depth
{
bool _enable = true;
bool _write = true;
Compare _compare = LessEqual;
float _bias = 0.0;//0.0010;
float _slopeBias = 0.0;//0.000100;
}
Stencil _stencil
{
bool _enable = false;
bool _twosided = false;
Compare _compare = Greater;
uchar _ref = 0;
StencilOp _fail = Keep;
StencilOp _zFail = Keep;
StencilOp _pass = Keep;
StencilOp _tsFail = Keep;
StencilOp _tsZFail = Keep;
StencilOp _tsPass = Keep;
}
CullMode _cullMode = BackFaces;
CullMode _fillMode = Solid;
}

RenderState rsRef : "rs"
{
CullMode _cullMode = FrontFaces;
}

The only problem I'm getting is that at some camera angles the shadow briefly flickers on again, I'll see if I can fix that.

EDIT: just made a little change, now it even still reflects other objects. Still didn't fix the flickering though.
Title: Re: Pink Water
Post by: RedKetchup on May 20, 2017, 08:20:45 AM

The only problem I'm getting is that at some camera angles the shadow briefly flickers on again, I'll see if I can fix that.

EDIT: just made a little change, now it even still reflects other objects. Still didn't fix the flickering though.

bah me i am using what you gave me :) i didnt changed anything ( i made a copy, tried to modified some numbers... and restaured your original)
Title: Re: Pink Water
Post by: Karlieb on May 20, 2017, 09:01:41 AM
It almost looks like blue when the black level is too high. Of course that affects a lot more things than just water.

(http://i.imgur.com/cbCimIP.jpg)
Title: Re: Pink Water
Post by: RedKetchup on June 05, 2017, 11:53:49 AM
can someone (AMD/Intel pink user) test that ?
(trying something new untested)
Title: Re: Pink Water
Post by: calli74 on June 05, 2017, 12:36:34 PM
still with red/pink water :( can't get a screen shot cos my computer is being stupid, something has taken over the print screen key, not sure what

Title: Re: Pink Water
Post by: RedKetchup on June 05, 2017, 02:22:47 PM
still with red/pink water :( can't get a screen shot cos my computer is being stupid, something has taken over the print screen key, not sure what

ok thanks , a new test incoming soon
Title: Re: Pink Water
Post by: RedKetchup on June 05, 2017, 02:29:22 PM
can you test this please @calli74 ?
Title: Re: Pink Water
Post by: calli74 on June 05, 2017, 02:38:59 PM
still red for me :(
Title: Re: Pink Water
Post by: Bartender on June 05, 2017, 02:39:05 PM
I really admire your dedication to solving this @RedKetchup !

I hope you're finding a workable solution. I haven't forgotten about my attempts either, I just need to find a few spare days to dedicate to digging into the code for it.. unfortunately, those are scarce at the moment :-\.
Title: Re: Pink Water
Post by: RedKetchup on June 05, 2017, 03:17:58 PM
I really admire your dedication to solving this @RedKetchup !

I hope you're finding a workable solution. I haven't forgotten about my attempts either, I just need to find a few spare days to dedicate to digging into the code for it.. unfortunately, those are scarce at the moment :-\.

trying to play with some true/false or keep/nonkeep

i cannot test anything myself, thats the worst part

another test @calli74  :)
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 12:20:51 AM
trying to play with some true/false or keep/nonkeep

i cannot test anything myself, thats the worst part

another test @calli74  :)

I decided to test this one,

unfortunately still pink:

Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 12:30:47 AM
booooo. i think i ll send a email to Luke even if i doubt to have an answer.... didnt got news of the last one.
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 12:34:59 AM
@RedKetchup & @Bartender

I can not work out why this would be happening.

I have utilized your code Bartender in my Water Pump, yet it does not show up pink.

RedKetchup, what material code are you using for the water plane?
my water pump code looks like this:
Code: [Select]
MaterialInstance resource
{
Material _material = "Material\Bartender\RiverMaterial.rsc";
Texture _textures
[
{
String _name = "water";
ImageBuffer _texture = "Terrain\RiverWaterTexture.rsc";
}
{
String _name = "frame";
ImageBuffer _texture = "Terrain\RiverFrameCopyTexture.rsc";
}
{
String _name = "reflection";
ImageBuffer _texture = "Terrain\RiverReflect2Texture.rsc";
}
{
String _name = "highlight";
ImageBuffer _texture = "Terrain\RiverReflectTexture.rsc";
}

]
}

Also, do you have a plane at the base of the canal? (deep under the water so it is an open-box shape)
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 01:09:47 AM
here is the picture of my water pump next to the canals:

Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 01:56:28 AM
Also, do you have a plane at the base of the canal? (deep under the water so it is an open-box shape)

mine it is that :

Code: [Select]
MaterialInstance resource
{
Material _material = "Material\Redketchup\RiverMaterial.rsc";
Texture _textures
[
{
String _name = "water";
ImageBuffer _texture = "Terrain\RiverWaterTexture.rsc";
}
{
String _name = "frame";
ImageBuffer _texture = "Terrain\RiverFrameCopyTexture.rsc";
}
{
String _name = "reflection";
ImageBuffer _texture = "Terrain\RiverReflect2Texture.rsc";
}
{
String _name = "highlight";
ImageBuffer _texture = "Terrain\RiverReflectTexture.rsc";
}

]
}

and my riverMaterial is :
Code: [Select]
Material resource
{
MaterialType _type = Blended;
VideoProgram _passes
[
"normal"
]
}

VideoProgram normal
{
VertexLayout _vertexLayout = "MeshLayout\TerrainLayout.rsc";
VertexProgram _vertexProgram = "WaterMaterial.srsl:Normal_vs";
PixelProgram _pixelProgram = "WaterMaterial.srsl:Normal_ps";
RenderState _renderState = "rs";
}

RenderState rs
{
AlphaBlend _alphaBlend
{
bool _enable = true;
Blend _source = SourceAlpha;
Blend _dest = InverseSourceAlpha;
BlendOp _op = Add;
ColorWrite _writeMask = Red | Green | Blue | Alpha;
}
Depth _depth
{
bool _enable = true;
bool _write = true;
Compare _compare = LessEqual;
float _bias = 0.000000;
float _slopeBias = 0.000000;
}
Stencil _stencil
{
bool _enable = false;
bool _twosided = false;
Compare _compare = Greater;
uchar _ref = 0;
StencilOp _fail = Keep;
StencilOp _zFail = Keep;
StencilOp _pass = Keep;
StencilOp _tsFail = Keep;
StencilOp _tsZFail = Keep;
StencilOp _tsPass = Keep;
}
CullMode _cullMode = None;
CullMode _fillMode = Solid;
}

no in the 2 test of today there wasnt a plane under. we tried many attampts with planes under, ontop (inversed) and you were still getting pinks in extremities :
Reply #48 : http://worldofbanished.com/index.php?topic=1725.msg34063#msg34063 (http://worldofbanished.com/index.php?topic=1725.msg34063#msg34063) was our best attempts


in attachments, i am joining a test with a copy of what i intended lately as final Radeon version with a blue texture at -0,10z below under the water
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 03:19:28 AM
It is still pink though :(



My code is the same...
If it is not the material, then perhaps it might be the model. I cannot see why it is effecting yours and not mine... unless because it is under natural ground level... I'm not sure.

@RedKetchup , I made a quick picture attached. Is this how your canal is designed?

if Black is the canal, does it have a floor/base attached to the same mesh? and orange being a quarry floor, and blue the water plane?
If not, I'm wondering if it is because light is coming in from below...

Another thought/question... is your water plane a single plane or is it a box?
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 03:53:56 AM
no canal walls doesnt have a "bottom" , the ground itself is the bottom, like a creek (brown color)
the canal wall are in black representing stone bricks,
the blue line is the water. just below it there is another opaque blue color at 0,1 of the liquid water.
the green lines represent the ground level made from grass
the brown one is the bottom of the hole representing the dark brown underground that has been digged(dig?).
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 04:02:08 AM
no canal walls doesnt have a "bottom" , the ground itself is the bottom, like a creek (brown color)
the canal wall are in black representing stone bricks,
the blue line is the water. just below it there is another opaque blue color at 0,1 of the liquid water.
the green lines represent the ground level made from grass
the brown one is the bottom of the hole representing the dark brown underground that has been digged(dig?).
dug
... the English language is strange.

Have you tried making a flat bottom to the canal?

Also, your water? is the mesh a plane or a box? I would try a single sided plane.
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 04:08:57 AM
water = plane. no i didnt made a full box because we see the bricks at bottom. sending you a zip of the test .
Title: Re: Pink Water
Post by: Abandoned on June 06, 2017, 04:57:06 AM
@RedKetchup my laptop has intel, I don't know how I would be at testing canal and I don't use that debug but I would be happy to put a few canal pieces on a map.  My game is still 106, is that last zip the one to download?
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 05:20:33 AM
yes
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 05:42:14 AM
haha... this test didn't go to plan:
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 05:56:22 AM
we heard a trumpet and the rivers were filled with blood LOL
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 05:59:35 AM
I may have got it to work @RedKetchup ,

RedKetchup & @Bartender I changed the following in Material/Redketchup/WaterMaterial.srsl

program Normal
{
...
   pixelshader ps
   {
...
      float3 bloom = sample(highlight, dir).xyz * 0.0; // Ichanged this from 1.5 - the lower I got, the less red/pink was visible, I increase it gets brighter.
Title: Re: Pink Water
Post by: Paeng on June 06, 2017, 06:05:23 AM
haha... this test didn't go to plan

Oops...  :D 
But that red is nicer than the pink... LOL


Fast forward in time and we can have spirulina farms...  ;)

Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 06:21:55 AM
I may have got it to work @RedKetchup ,

RedKetchup & @Bartender I changed the following in Material/Redketchup/WaterMaterial.srsl

program Normal
{
...
   pixelshader ps
   {
...
      float3 bloom = sample(highlight, dir).xyz * 0.0; // Ichanged this from 1.5 - the lower I got, the less red/pink was visible, I increase it gets brighter.

sweet. can you delete the lower plane with the blue texture ? the one under (and below minus 0,10') to see if it still do no pink ?
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 06:25:18 AM
@RedKetchup ,

I have tested more, and as far as I can tell this should work fine. I have tried many other things but nothing works. Making this change doesn't seem to make any difference apart from removing the pink.

Make the change as above to the WaterMaterial.srsl

In the .fbx I also removed the blue textured plane below the water and removed the material attached to the floor (though I don't think this matters, I just needed to when using blender, I also had to remove the other meshes in the .fbx).


... the only thing, none of this explains why my Water Pump isn't pink... I even tried swapping code and the canals still showed up pink. I think this still requires some more investigating.

but I attached my test compile, if other amd/intel users can test?
Title: Re: Pink Water
Post by: Bartender on June 06, 2017, 06:54:27 AM
This is great @Discrepancy ;D! Are there any other visual changes besides the disappearance of the pink?

I suspect that your water pump doesn't show the pink, because it is not reflecting the sky. Sky reflection seems tied to the lowered terrain, which causes the pink somehow.
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 06:57:01 AM
Are there any other visual changes besides the disappearance of the pink?

I cannot spot anything.
Title: Re: Pink Water
Post by: Paeng on June 06, 2017, 07:00:09 AM
other amd/intel users can test?

Very good... no hardcore testing yet, but first impression is great!  :)

* Intel(R) HD Graphics 3000

Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 07:24:51 AM
ok so you think i can release like that ?
you will satisfied with that ?


as a Nvidia user... i dont see any difference :)
Title: Re: Pink Water
Post by: Paeng on June 06, 2017, 07:38:17 AM
you will satisfied with that ?

Me? Heck, yeah! It's like brandnew...  :D

I just won't speak for other users/systems... hopefully ATI will be as sensational...  :P
Title: Re: Pink Water
Post by: Abandoned on June 06, 2017, 08:46:56 AM
@RedKetchup my intel canal water looks okay too. Looks great.  :)  I hope other's problem with red or pink water is resolved for them. 
Title: Re: Pink Water
Post by: Bartender on June 06, 2017, 09:29:05 AM
I just tested it on my system, and the only difference I can see is that the bloom value has a slight influence on the brightness of the reflection. It's not something very obvious though, and still a million times better than the pink :). Once there's some more testimonies that it's working I'll update the files in the tutorial.
Title: Re: Pink Water
Post by: paralias on June 06, 2017, 02:05:04 PM
i did a little test with @Discrepancy "changed" canals on a laptop with AMD radeon R5 M430 and intelHD 620... cpu intel i5 7200U. i don't know if intel graphics made a difference but the canal works fine. no pink

Title: Re: Pink Water
Post by: embx61 on June 06, 2017, 02:52:56 PM
This is great @Discrepancy ;D! Are there any other visual changes besides the disappearance of the pink?

I suspect that your water pump doesn't show the pink, because it is not reflecting the sky. Sky reflection seems tied to the lowered terrain, which causes the pink somehow.

That is what I think too. I have NVidea Graphics so could not test for the pink.
But my Irrigation channels are not having the pink issue either as reported by some and that is because they are above ground and so not utilizing Luke's blue water texture plane beneath the ground.

My Irrigation channels below ground are almost finished and I think they will be fine too as they are not going so deep to reach Luke's blue texture.

Great find @Discrepancy for the fix with the bloom. :)
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 05:04:20 PM
wll then if everyone are satisfied :)

I wish to let a big THANKS YOU @Discrepancy  for your incredible find and your dedication to find a fix for that :)
BRAVO and THANKS YOU !!!!
 ;D  ;D  ;D  ;D  ;D
Title: Re: Pink Water
Post by: Discrepancy on June 06, 2017, 05:05:59 PM
 :) My pleasure.

I've always loved those canals, so I was as much doing it for myself ;)

Well done all!
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 05:43:57 PM
The Radeon versions are posted now :) THANKS YOU ALL for your patience and all your testings about to find a fix for AMD/intel users :)
THANKS to @Bartender  for his awesome Bartender's Liquid Water technology ™ :) and THANKS to @Discrepancy  for his* fix for AMD users :)

NMT3.1Series: Canal Set - Radeon for 1.0.6 : http://worldofbanished.com/index.php?topic=1768.0 (http://worldofbanished.com/index.php?topic=1768.0)
NMT3.1Series: Canal Set - Radeon for 1.0.7 : http://worldofbanished.com/index.php?topic=1769.0 (http://worldofbanished.com/index.php?topic=1769.0)
Title: Re: Pink Water
Post by: brads3 on June 06, 2017, 06:34:40 PM
that was too much work.RK take a vacation for a couple days at least.
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 08:18:40 PM
yeah i will still play Civ6 for a day or 2....
i also have this new SSD 256gb i need to change in my computer (i had a 128GB) i need to save everything, install a program that will save an "image" of my C:\ SSD and then make the change and restore the save ontop of the new one.
and then uninstall my 3dsmax and photoshop and reinstall on the new SSD256 because they arent there, i didnt had enough space so they are installed on an old slow hard drive
Title: Re: Pink Water
Post by: brads3 on June 06, 2017, 08:49:12 PM
that sounds more like work than a vacation.lol
Title: Re: Pink Water
Post by: Whoyou13 on June 06, 2017, 10:40:21 PM
wow, it works really great. Thanks @RedKetchup for this wonderful work.
Title: Re: Pink Water
Post by: RedKetchup on June 06, 2017, 11:45:04 PM
wow, it works really great. Thanks @RedKetchup for this wonderful work.

welcome :)
i hope you all have pleasure with it :)
Title: Re: Pink Water
Post by: Abandoned on June 07, 2017, 03:45:53 AM
Thank you @RedKetchup for all the hard work and extra effort, and @Bartender for the wonderful new water, and @Discrepancy for fixing it so we all can enjoy this great new and improve canal system.   :)
Title: Re: Pink Water
Post by: calli74 on June 07, 2017, 05:53:05 AM
Yayyyyyyy. You modders are all amazing, that you put so much work into fixing this for the minority. I'm looking forward to trying these out very soon.
Title: Re: Pink Water
Post by: Leadbetter on June 19, 2017, 11:25:06 PM
Quote
Yayyyyyyy. You modders are all amazing results (https://www.pedigest.com/penomet-review-results) with penomet that you put so much work into fixing this for the minority. I'm looking forward to trying these out very soon.

Maybe it's just full of Salmon.