FSX DX10 - Self Shadowing VCs
#41
Posted 17 October 2007 - 03:19 PM
#42
Posted 17 October 2007 - 04:22 PM
Ingvarr, on Oct 17 2007, 02:09 PM, said:
Well, I figured out issue with fresnel - apparenty you did it vertex-based. So when camera is close to water plane (when your amphibian is floating on the water) the separation between water polygon vertices near camera becomes too big, and fresnel essentially is eliminated. Its basically same as if you did vertex-based specular. Hovewer specular highlights on waves were done in pixel shader, so its not affected - only fresnel disappear so when it needed most (near the water surface). And when you orbit your floating plane, water looks like liquid mercury - almost perfectly reflective regardless of the eye-water angle of incidence.
I've twiddled with fx a little and put a pixel-based fresnel inside. Hovewer I hit another obstruction - apparently your water shader already on the verge of the limit of 128 instructions for PS 2.0, and my meager 5-instruction addition pushed it overboard Apparently you use PS 3.0 in some places, hovewer I didn't figure out how to properly control it (out of editing every water fx), so I've just left it as a proof of concept, with specular disabled to keep under ps20 limit. Just a proof of concept that *there are* possible additions that improve visual quality and do not require mostrous additions like separate DX10 pipeline. All you need is true desire to do it.
And no, no performance hit. As I said, your water shader was already almost 128 instruction long, so about 5 i've added - well, negligible.
Here is the (crudely) hacked water.fxh - http://rapidshare.co...ater20.fxh.html
If you want to try it, don't forget to clear compiled shaders cache in AppData\Local
Heh, I don't know why I bothered with this. I guess desire to prove something became irresistible (but I suspect I never will prove anything ). So I think it will be my last such post. At least until I'll write a book or two on the subject to give my words some weight
All Greek to me but if it makes the water reflectivity more realistic I'd certainly be interested to see its effects.
#43
Posted 17 October 2007 - 09:26 PM
However, this edited shader file seems quite interesting. If my computer's motherboard didn't decide to give out (one month after warranty expires, omg), I'd be testing this file right now. If someone does test it, post a screenie. I'm quite interested. Plus, this feud, is becoming quite interesting, and also quite informative. Whatever helps me with graphics programming .
#44
Posted 18 October 2007 - 02:14 AM
Str!ker, on Oct 18 2007, 05:26 AM, said:
And "you must see our codebase to understand, but you'll obviously never will see our codebase so you will never understand, but we are right here" is just another universal explanation. Every kind of statement may be backed by saying so, and they talk about "conspiracy theories"?
About water - just back up your original ShadersHLSL\Terrain\Water.fxh, replace it with a hacked one.
Then go to Documents and Settings\<your user>\AppData\Local\Microsoft\FSX\Shaders\Terrain - delete everythiing there (so shaders will be recompiled on next run).
Then put your Beaver on the water somewhere and pan camera around, and observe how stuff reflects. I've hacked a water color to more greeneer, because actual mostly blue color of the water happens majorly in tropical seas - in temperate waters algae that gives it color is never blue, its dark grayish-yellowish-greenish, blueness comes from the sky reflected.
As I said, pity that I had to disable water sun reflection, if Phil will kindly point to how easely to enable shaders 3.0 support, it can be reenabled.
Edited by Ingvarr, 18 October 2007 - 02:23 AM.
#45
Posted 18 October 2007 - 01:01 PM
Here's some comparison shots.
Original
Modified
Original
Modified
Not quite sure what Ingvarr's point is (As someone else said, 'it's all Greek' to me) but the light on the water looks more natural.
#46
Posted 18 October 2007 - 02:55 PM
Btw, another possible improvement that would(should!) not require a DX10, is runway/taxi lights.
Allow me demonstrate with these screenshots from X-Plane, several months old:
As I see it, it's being done even without use of pixel shaders. Only with mini-models and clever billboarding. But does it looks good?
Not a rocket science, not requiring a DX10 card, not a peformance hog, but cleverly done and for good visual impression.
Pity though that in all the other areas of graphics X-Plane is a lot worse
#47
Posted 18 October 2007 - 06:36 PM
Water.fxh
10+
Edited by Fonzyslo, 18 October 2007 - 06:38 PM.
#48
Posted 19 October 2007 - 04:29 AM
Fonzyslo, on Oct 19 2007, 02:36 AM, said:
Done. Now the water color again changes with that is set in the scenery (ie dark blue in Seattle area, cerulean in the Carribean islands, murky green in the Thames river).
Unfortunately MSFS lits water surface like all other terrain (like solid material), and this is pre-baked in the textures, so I was unable to make water color change more properly with day-night transitions, hovewer it still looks good enough.
Also, the sun reflection highlights are back.
Enjoy - http://rapidshare.co...ater20.fxh.html
I wish ACES wouldnt give up on DX9 too easely and don't put all the cool new eyecandy features in the DX10 pipeline only. At least until MSFS will truly exhaust all potential of DX9.
Edited by Ingvarr, 19 October 2007 - 04:36 AM.
#49
Posted 19 October 2007 - 04:41 AM
#50
Posted 19 October 2007 - 04:43 AM
Edited by Ingvarr, 19 October 2007 - 04:51 AM.
#51
Posted 19 October 2007 - 05:33 AM
Ingvarr, on Oct 19 2007, 12:29 PM, said:
Fonzyslo, on Oct 19 2007, 02:36 AM, said:
Done. Now the water color again changes with that is set in the scenery (ie dark blue in Seattle area, cerulean in the Carribean islands, murky green in the Thames river).
Unfortunately MSFS lits water surface like all other terrain (like solid material), and this is pre-baked in the textures, so I was unable to make water color change more properly with day-night transitions, hovewer it still looks good enough.
Also, the sun reflection highlights are back.
Enjoy - http://rapidshare.co...ater20.fxh.html
I wish ACES wouldnt give up on DX9 too easely and don't put all the cool new eyecandy features in the DX10 pipeline only. At least until MSFS will truly exhaust all potential of DX9.
#52
Posted 19 October 2007 - 05:38 AM
Then go to Documents and Settings\<your user name>\AppData\Local\Microsoft\FSX\Shaders\Terrain - delete everythiing there
and launch fsx
#53
Posted 19 October 2007 - 05:55 AM
just don't blame ACES for the lack of features, they putted out a wonderful SDK, where you can make wonders of it it
edit: for vista users, heres a revised version on how to install the hacked water.
Quote
Then go to {you windows partition}\Users\{user name}\AppData\Local\Microsoft\FSX- delete everythiing there
Edited by Ali., 19 October 2007 - 05:58 AM.
#54
Posted 19 October 2007 - 06:10 AM
Ali., on Oct 19 2007, 01:55 PM, said:
just don't blame ACES for the lack of features, they putted out a wonderful SDK, where you can make wonders of it it
Also this deal with water was after I tried to point Phil into example direction of possible and easy improvement and was replied approximately as "who you to teach us, our programmer wrote a book on HLSL".
Also "user can make it yourself, so we don't need to do it" is a fringe excuse too. Especially when it concerns features non-documented in SDK, like shader hacking, and requires a graphics programming expert to do it. Also most of the rendering stuff still can not be modified by user. It was luck that at least shaders code were left exposed and possible to modify. Imagine any other game developer making a game with average graphics code and saying - "well, you can re-program it yourself if you don't like it"
Edited by Ingvarr, 19 October 2007 - 06:18 AM.
#55
Posted 19 October 2007 - 06:18 AM
Ingvarr, on Oct 19 2007, 01:38 PM, said:
Then go to Documents and Settings\<your user name>\AppData\Local\Microsoft\FSX\Shaders\Terrain - delete everythiing there
and launch fsx
#56
Posted 19 October 2007 - 06:20 AM
However nice tweak regardless.
#57
Posted 19 October 2007 - 06:26 AM
StavosWS6, on Oct 19 2007, 02:20 PM, said:
#define fresnMax 0.8
Ie if you set it to, say, 0.5 it will make water less reflective on the horizon
I am aware its still not completely physically accurate, but making it so will require much more time and some tweaks in the parts of MSFS we cant tweak
The main point of the hack was to make reflections almost disappear if you look directly down into water, and also make it amount depend on waves. Before it didn't, now it does. That is so called Fresnel reflection - instead of say, quicksilver, water reflects stuff depending on the angle you look at it.
Edited by Ingvarr, 19 October 2007 - 06:35 AM.
#58
Posted 19 October 2007 - 09:27 AM
Ingvarr, on Oct 19 2007, 04:29 AM, said:
Fonzyslo, on Oct 19 2007, 02:36 AM, said:
Done. Now the water color again changes with that is set in the scenery (ie dark blue in Seattle area, cerulean in the Carribean islands, murky green in the Thames river).
Unfortunately MSFS lits water surface like all other terrain (like solid material), and this is pre-baked in the textures, so I was unable to make water color change more properly with day-night transitions, hovewer it still looks good enough.
Also, the sun reflection highlights are back.
Enjoy - http://rapidshare.co...ater20.fxh.html
I wish ACES wouldnt give up on DX9 too easely and don't put all the cool new eyecandy features in the DX10 pipeline only. At least until MSFS will truly exhaust all potential of DX9.
Tnx Ingvarr
#59
Posted 19 October 2007 - 12:27 PM
However, your editing of the water effects file is quite interesting. If many things in FSX can be changed this way, I may look into other fxh files to see if there are any other areas. Perhaps, you, or I, or you and I, could release a freeware update to the fxh files making effects better.
That would be awesome. For now though, great work. I've got to look deeper into this. BTW, it should be possible to force FS to use Shadow Volume for the aircraft shadow, right? Or is that in FS's code, and not an FSH file? Because I noticed it seems shadowing is done by shadow plane, which doesn't work well, or at all, on curved surfaces, and it keeps showing on a certain level and causes 'artifacts' when on helipads and stuff. I'd much prefer the Shadow volume, so that the shadows don't do that annoying thing.
I looked at the fxh files a while ago and noticed shadowvolume in there, and realised that it was for scenery only, but I want to make it work with the aircraft. Think we can do it?
Edited by Str!ker, 19 October 2007 - 12:27 PM.
#60
Posted 19 October 2007 - 12:31 PM
Ingvarr, on Oct 19 2007, 07:10 AM, said:
Ali., on Oct 19 2007, 01:55 PM, said:
just don't blame ACES for the lack of features, they putted out a wonderful SDK, where you can make wonders of it it
Also this deal with water was after I tried to point Phil into example direction of possible and easy improvement and was replied approximately as "who you to teach us, our programmer wrote a book on HLSL".
thats not exactly a fair rendition of the conversation.
first you told us to go figure out what Fresnel was, as if we didn't know. then when I point out Sebby has written a book on HLSL, you then take it in the worst possible light.
how about we talk with little more even tone, ok? that makes it much easier to want to interact.
nice tweaks to the water shader, btw.