Board index FlightGear Development Effects and shaders

Dynamic water

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: Dynamic water

Postby ninoju » Tue Aug 18, 2009 9:13 am

I just updated the data folder with cvs, can someone help me "activating" this effect ? I have no Idea wat to do next
ninoju
 
Posts: 5
Joined: Sun Jul 05, 2009 6:45 am

Re: Dynamic water

Postby Gijs » Tue Aug 18, 2009 9:22 am

ninoju wrote:I just updated the data folder with cvs, can someone help me "activating" this effect ? I have no Idea wat to do next

Have you also downloaded the latest binary (or recompiled)? It is very important that your binary/source and data match!
Once you've done all that, launch the flightsim, open the VIew > Rendering options dialog and enable the options under Shaders.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Dynamic water

Postby planetacancun » Wed Aug 19, 2009 5:46 am

I just made this video of the dynamic water effect:

http://www.youtube.com/watch?v=EKELqBGVsqw
Callsign:Fallen-
Videos: http://youtube.com/planetacancun2
planetacancun
 
Posts: 322
Joined: Thu Jul 30, 2009 5:52 pm
Callsign: Fallen-
IRC name: Fallen-
Version: GIT
OS: Ubuntu

Re: Dynamic water

Postby flameout » Wed Aug 19, 2009 4:00 pm

I will add my experience with the recent changes -- one or more of them has halved my framerate, for some reason. Turning off shaders and experimental effects doesn't help, although the shaders do add 3 fps. I used to be capable of averaging 80 fps (or higher,) but now I'm stuck at around 40 fps.

I have an Nvidia GeForce 8500GT, and an AMD processor (2.2 ghz, but I don't remember the number off the top of my head.) The computer is an HP Pavilion a1610n with the GeForce 8500GT added in and a new power supply (430 watt) to give it power (I didn't know how to calculate the total power usage, but I knew graphics cards could consume 50 watts.)

It still runs FG okay, though. However, despite what others think, I think we should make it run on old computers, and keep that a priority. However, that probably comes because my computer is aging -- I am too cheap to buy new parts (well, I got 2 extra gigabytes of RAM for Christmas, but that maxed it out.)

I see it has dropped the framerate for some, (was it bisutti?) but has anyone else experienced a large drop in framerate? I would consider halving the framerate to be a problem (whatever caused it, it may or may not be the shaders.) I would like to continue running FG at 60+ fps (throttled to 60, but it actually runs at 64-65) and I don't see what is slowing this down. Maybe it's the new terrain textures (I thought there were new ones, I don't pay that much attention,) and maybe it's something else.

It would be nice to know if I'm not alone or am alone with this problem.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: Dynamic water

Postby HHS » Wed Aug 19, 2009 4:28 pm

Hmmm....

Some thoughts by me- I'm not a developer, more a interested user. Ignore it if you don't like it....

Shaders gives a lot of nice effects and graphic improvements. But they are by their nature using a lot perfomance. Not so much on newer GPU's but on older ones.
I have a GeForce 8800GT, DualCore 2.8GHZ and the average fps I got are usually 60fps without shaders, I throttled them down to 30 fps- there is really no need for 60fps! With shaders they are around 40-50fps. Fewer impact as I thought. I have the latest update of drivers for my GPU. There are no updates from the forum, jut a clean CVS-checkout.
But I'm aware of that shaders need naturally a lot of perfomance, and much more on older GPU's....

But compared to X-Plane (wich has few shaders) and MSFS (much, much shaders!) we have still a very good perfomance! Should make it run on older computers is something which has a high priority on FGFS, but that doesn't mean for me that we should kept out such new things and eye candies just only due to the fact that there are some few people don't have a actual computer. But we should keep those eye-candies switchable, so everyone can shut them off, if they don't can use them oder like them. That's already what we did and hopefully will still do in future!
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Dynamic water

Postby Tuxklok » Wed Aug 19, 2009 5:45 pm

But we should keep those eye-candies switchable, so everyone can shut them off, if they don't can use them oder like them. That's already what we did and hopefully will still do in future!


That's the beauty of the new material system being developed, we actually can have varying levels of eye candy. Now materials have multiple techniques, and the renderer will try each technique top to bottom until it finds one that the hardware supports, and passes any conditions defined for it. We can define materials with techniques of varying levels of quality and hw requirements, and the right one will get chosen depending on the users hw and preferences. This allows for a lot of flexibility, and the possibility for a range of quality and feature settings the user can choose from in the future.

cheers!
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1320
Joined: Tue Apr 21, 2009 7:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: Dynamic water

Postby BrianVanSpeybroeck » Wed Aug 19, 2009 6:21 pm

I gotta say...it sure looks nice. :D This really enhances the realism of flying in a sim and my hat is off to the folks who have worked so hard to make this happen.

I can't wait to see it in the next release so I can have it. :wink:
Done!
BrianVanSpeybroeck
 
Posts: 496
Joined: Tue Dec 02, 2008 1:36 pm

Re: Dynamic water

Postby flameout » Wed Aug 19, 2009 6:49 pm

Nice system, HHS (at least compared to mine.)

I do find that 30 fps is perfectly fine, if the game runs at that rate perfectly. However, it varies -- at 60 fps the stuttering that occurs is far less noticeable. Thus, I keep it at 60 fps. This change has increased the stuttering, which is bothering me more than the average frame rate.

I also think it's unusual that you and me are getting similar frame rates, when your graphics and computer is a couple times as fast as mine. However, that could be entirely from running on Windows or using nicer graphics settings.

I am wondering what's causing such a fps drop. I don't think it's the shaders, because there's such a small improvement when I disable them, but one of the recent changes has slowed mine down.

Sometime soon, I may start working on FlightGear's source code. I'm coming up with a list of priorities, and I guess my list currently is:
1. remove the compiler warnings.
2. optimize!

For now, however, I still get awesome performance out of FG. However, it is sad to see it drop so far so quickly.

Hope this helps someone, and thank you for explaining your performance change (which was a significant amount, just not as much as mine, if I remember correctly.)
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: Dynamic water

Postby HHS » Thu Aug 20, 2009 12:14 am

flameout wrote:Nice system, HHS (at least compared to mine.)

But already old- the current ones are twice as fast for the same money....

I do find that 30 fps is perfectly fine, if the game runs at that rate perfectly. However, it varies -- at 60 fps the stuttering that occurs is far less noticeable. Thus, I keep it at 60 fps. This change has increased the stuttering, which is bothering me more than the average frame rate.

Which stuttering? That sounds strange....

I also think it's unusual that you and me are getting similar frame rates, when your graphics and computer is a couple times as fast as mine. However, that could be entirely from running on Windows or using nicer graphics settings.

The strange thing is, that it is limited to 60fps- even I disable fps-throttle. Before we had the fps-throttle in FGRun (or better: was unknown to me) I had fps about 200... So there must be something else....

I am wondering what's causing such a fps drop. I don't think it's the shaders, because there's such a small improvement when I disable them, but one of the recent changes has slowed mine down.

After reading your experience I had some nice practice flights with the heli on some small helipads I put on a airport. At the beginning I had usual fps- but then they began to decrease more and more until it wasn't usuable any more... No idea why- maybe this the same you have?
I still investigate befor I put this to devel-list....

Hope this helps someone, and thank you for explaining your performance change (which was a significant amount, just not as much as mine, if I remember correctly.)

On the devel-list there were some more, and well- this is the first shaders we use- so maybe they can be still optimized! No compiling needed- just "plug and play" :D
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Dynamic water

Postby flameout » Thu Aug 20, 2009 12:40 am

HHS wrote:Which stuttering? That sounds strange...

I find that I notice the frame rate, so there must be some sort of irregularity in the frame rate. I perceive a video or movie (or a simpler game) at 20 fps as being smoother than FlightGear at 30. However, when I was capable of running it at 80+ and had it rate-throttled to 60, I perceived it as being very smooth.

HHS wrote:The strange thing is, that it is limited to 60fps- even I disable fps-throttle. Before we had the fps-throttle in FGRun (or better: was unknown to me) I had fps about 200... So there must be something else....

I don't know if this is your problem, and I don't think FGRun would end up setting this (although FlightGear itself could save this on File -> Exit,) but I have /sim/frame-rate-throttle-hz (IIRC) set in my preferences.xml. You may want to try looking for that, just in case it is limited in there.

That sounds like a more realistic number for a system with the specs you listed.

HHS wrote:but then they began to decrease more and more until it wasn't usuable any more...

Mine is lower from the beginning, but I haven't tested it for a long flight. I'll test it sometime soon (I do find that it slows down after a screensaver -- maybe this is related?) This actually sounds more like some sort of memory leak bug than what I have. However, I know that my framerate is lower right when it starts, and (at least for the first few minutes,) it doesn't raise/lower significantly.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: Dynamic water

Postby MAKG » Thu Aug 20, 2009 2:30 pm

The "stuttering" is a subtle and not-quite-correctly-implemented issue.

All animations are a class of so-called "soft" real time systems. The "soft" means that no one dies if you miss a frame as could happen, say, if an autopilot burped like that. Note that no timesharing operating system can be a true real-time system, though it can get close (not if it's written by Microsoft, though). It might be interesting to try FG under RTLinux or somesuch to see if it improves things.

The fundamental mistake made here is that the frame rate is treated as a clock, but it can be interrupted. The frame rate itself determines the simulation timestep, which generates trajectory and state errors when the loop is interrupted by something like, say, an incoming network packet and window redraw for that copy of Firefox you keep running (you use the MP map, right?), or perhaps a page fault.

A more correct implementation would have a simulation loop separate from the animation loop, with a thread and preferably a CPU for each.

Every novice RT designer makes a mistake like this early on.

Another error is unlimited complexity. If there is so much detail in the frame that you can't render it in time, it's time for simplification. I'm not sure if it's done here (I suspect not), but decimation is one common and very effective strategy.
MAKG
 
Posts: 1152
Joined: Sun Oct 19, 2008 7:11 pm
Location: California Central Coast

Re: Dynamic water

Postby flameout » Fri Aug 21, 2009 6:47 am

I tried to do a long flight in the B-2 to test HHS's problem with decreasing fps, and, while I hadn't descended yet and so hadn't noticed a change (because at altitude I am still getting over 60 fps,) it eventually crashed during the descent when I tried to change the views. Here's the error (the relevant portion of the console output, at least:)
Code: Select all
Unknown exception in the main loop. Aborting...
Possible cause: Cannot allocate memory

Maybe there is a memory leak? I'll do more testing.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: Dynamic water

Postby ninoju » Tue Aug 25, 2009 9:01 am

Gijs wrote:
ninoju wrote:I just updated the data folder with cvs, can someone help me "activating" this effect ? I have no Idea wat to do next

Have you also downloaded the latest binary (or recompiled)? It is very important that your binary/source and data match!
Once you've done all that, launch the flightsim, open the VIew > Rendering options dialog and enable the options under Shaders.


U mean the whole bin folder? where do I get that?
ninoju
 
Posts: 5
Joined: Sun Jul 05, 2009 6:45 am

Re: Dynamic water

Postby Fahim Dalvi » Tue Aug 25, 2009 9:20 am

Hi,

You need to Update your DATA with a CVS client(e.g. Tortoise CVS), and your Binaries from here : ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/. (Download the latest in the series fgrun+fgfs-osg-win32-cvs-.

Regards,
Fahim
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Dynamic water

Postby jiraya66 » Mon Aug 31, 2009 9:37 pm

Nobody to adapt it in the 1,9 version ?
User avatar
jiraya66
 
Posts: 72
Joined: Sat Jun 27, 2009 8:39 pm

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 4 guests