Jump to content
Sign in to follow this  
Mace

What FS11 could look like...

Recommended Posts

Guest JeanLuc_

Thanks Phil for the update on this. Actually this leads to a question: should OpenGL be superior than DirectX, would ACE be able/authorized to use it? or are coportate policies implying you to use in-house technologies like Direct X?This leads to another question: OpenGL and Direct3D just appear to have similar performance in Vista in the article you pointed to. However, are the OpenGL and Direct 3D rendering pipeline sufficiently different to the point in your particular use of the API and the software considered (FS), given the number of objects you use and how you use it, OpenGL could be superior in FPS and stutter-less experience than Direct 3d?Not advocating OpenGL, but just curious about how you choose OpenGL or Direct 3D as the API of choice to develop FS (assuming you questioned the choice in the first place of course, and not picked one instead of the other in not considering the advantage performance wise of one instead of the other, if only there is some sort of advantage there).I've also wondered a long time ago (well, since FSX RTM), how do you code shaders? it seems FSX is entirely pipelined through shaders this time, and probably it is a pre-requisite now with SP2 I don't know from public information yet, however, I think shader coding optimizations should be key in software performance if all goes through a shader. I've noticed some interesting comments in your shaders for FSX which are (in the bloom shader)://-----------------------------------------------------------------------------// File: HDRLighting.fx//// Desc: Effect file for High Dynamic Range Lighting sample. This file contains// version 2.0 pixel and vertex shaders in High-Level Shader Language.// These shaders are used to quickly calculate the average luminance// of the rendered scene, simulate the viewer's light adaptation level,// map the high dynamic range of colors to a range displayable on a PC// monitor, and perform post-process lighting effects. //// The algorithms described in this sample are based very closely on the // lighting effects implemented in Masaki Kawase's Rthdribl sample and the tone // mapping process described in the whitepaper "Tone Reproduction for Digital // Images"//// Real-Time High Dynamic Range Image-Based Lighting (Rthdribl)// Masaki Kawase// http://www.daionet.gr.jp/~masa/rthdribl/ //// "Photographic Tone Reproduction for Digital Images"// Erik Reinhard, Mike Stark, Peter Shirley and Jim Ferwerda// http://www.cs.utah.edu/~reinhard/cdrom/ // // Copyright © Microsoft Corporation. All rights reserved.//-----------------------------------------------------------------------------Does this mean that implementing shaders in FSX was not so optimized (or not at all, in the sense just take the basic algorithm and use it) and that FSX is somewhat limited in its performance maybe because it is hard to find top shader developpers in the market place (if ever this is a factor as well)? I remember following a while back the needs in recruitment for UBI Soft (they have opened a huge studio in Montreal planning to recruit 1500 developpers) and some of the requirements were in the line "5 years of shader coding experience". Shaders seems new for the FS franchise (some light shaders in FS9, and now all shaders in FSX), and this makes me wonder.

Share this post


Link to post
Share on other sites

OGL and D3D are APIs that push triangles. The hw both use to render the triangles is triangle-rendering hw. The general rendering pipeline is still transform, light, rasterize. There is not a fundamental difference in either the hw or the APIs.As to why we chose D3D, since DX8.0 and the introduction of shaders, one could argue D3D has been the cleaner API. Certainly since DX9.0 OGL has been trying to "catch up". OGL 2.0 is basically a response to DX9 and SM2.0. Read the 3DLabs original proposal around OGL 2.0 and its clear that the design choices in DX8 and DX9 were in the forefront of the proposal writers minds.As to whether or not we could choose a different API in the future, I dont know. The circumstances would have to be much different, that is all I do know.How does paying home to the original creator of the technique, Masaki-san, in the comments equate to a performance implication? Given DX10 HDR Bloom exacts such a small performance hit as compared to DX9 Bloom, exactly the opposite is true.Its still true that our main problem is calling DrawPrimitive and SetTexture too often per frame, and not shader performance. So its still true that we need to be smarter about how we render the planet.

Share this post


Link to post
Share on other sites

Thanks for the tip, I would have never found that one.Amazing and on a 360 no less. First demo in a long time I couldn't stop playing!

Share this post


Link to post
Share on other sites

With all due respect to the talk about FS rendering shadows "on the fly" as a big hit to the "engine", etc. have a look at this video - specifically around 6:00 mark.. VERY impressive engine on this! 24 hour day/night cycle, pay attention the the amount of area covered, no loading except initial, etc.http://www.gametrailers.com/player/usermovies/103158.html

Share this post


Link to post
Share on other sites
Guest ianrivaldosmith

you do mean 'specific' and not 'pacific' right?Ian

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Hi Phil,I was just wondering if one API, instead of the other, is faster/smarter in its pipeline for the way you use the API. I understand the basic pipeline use, however, I was maybe wrongly assuming that one could be more optimal in a certain usage way, and the other, could be more optimal in another one. As a practical illustration of my thought, for example, you say you call too often draw primitive and set texture. Now, if OpenGL API and/or pipeline is faster at these than Direct 3D, but for example less efficient in shader code, could FS benefit from that?I also understand Direct 3D seems to be more stable (in its api implementation) than OpenGL and sure enough this is a leading choice as well in this regards I understand. Interesting to see, and thank you for your answer, that it is not only a matter of speed (a point sometimes forgotten).As for the bloom example, it is that the actual shader code seems to be closely related to the one cited. However, are there more efficient ways than this one to do bloom? and also, could the original code be refined and optmized further, taking a different approach for example in the shader code? I've been experimenting myself with the shader code at RTM release, and I've found out I can almost lower by half the computations in the code, and save 8 FPS, with no major visible differences. It took me 2 hours to digest shader coding, and another 2 to test different code ideas. So in short, since shader seems new to the FS franchise (at least, to the extent of using advanced shaders techniques), I think we can expect better performance in the next FS versions just because you actually also take care to further optimize the shader code as the ACE team experience on shader coding builds up. Of course, just having DX10 API+hardware permits having a boost in performance for some features, without the need nor expense to just optimize the code, I understand it runs better in FSX+DX10 now.Back to the original topics, I find that all these games by these other studios are carrefuly artistically crafted, with tons of what looks to be optimized shaders and coding (given stutter free experience at constant 60FPS), and somewhat, after flying this demo on the X360 (and the PC nowadays is capable of almost the same, if not more, even on DX9 hardware), I was left with a bad sense that the FS franchise may be more and more out paced by the other studios titles in terms of gamer experience, which I feel not good about.I just love FS, and I'm hearthily supporting it, but at the same time, I can't help but liking the look of Ace Combat sim compared to the look of FS though ;-)

Share this post


Link to post
Share on other sites

As a side note, I was catching up on reading yesterday and saw this posted at GameDev.net:http://www.gamedev.net/community/forums/to...topic_id=466912While technically the tool is used to generate skybox textures and cubemaps for ground based games, his earliest version generated fly-through clouds in realtime.He claims at that quality, it takes a few seconds to generate the static images used for the skyboxes, so I am very curious to how efficient real-time volumetric clouds that good (with HDRI) would be.Still, very cool stand alone technique.

Share this post


Link to post
Share on other sites

If there was an actual advantage one way or the other re OGL or D3D, then that API would rule and no one would use the other; game developers are a fickle lot in that respect. Since both APIs co-exist, that means no significant delta exists. Examining API call overhead, this is dictated by the runtime and driver architecture, both APIs have similar runtime and driver architecture and have similar overhead. Thus the "guidance" by the IHVs themselves on how many invocations per frame is identical regardless of API. The shader compilers for both APIs are in general written by the same dev team so the same language techniques are used for both APIs. There is no "there" there.Is that the DX9 bloom code you reference? In SP2 we focused on DX10 so no attempt was made to optimize DX9 shader code, but hey if you want to send me the updated shader code we will take a look and see if the optimization you found makes tradeoffs or is globally good.I think its way premature to pick apart individual flaws and from there generalize to the health of the studio or franchise. And we do try to learn from each release and get better.

Share this post


Link to post
Share on other sites
Guest

EDIT: Back off... Do that again and you won't be posting here.

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Hi Phil,please note "I was left with a bad sense that the FS franchise may be more and more out paced by the other studios titles in terms of gamer experience, which I feel not good about." it is all subjective and a "feeling", and I admit I really was blown away and immersed in the Ace Combat environement, which I have not been with the FSX environement. This certainly has biased my view and perception. Please take it just as an open minded reflection of what the appearance of the simulation leaves in my gamer mind, which if I'm not mistaken, is still the core market for the FS franchise. So it really boils down to my not feeling good about FS product "appearing" less stellar than Ace Combat visuals, and wondering if FS11 could look as good if not better.However, I'm nowhere near telling ACE studio developpers are less good than Ubisoft or Bandai developpers! Who am I to tell this? and if it was so, how come they have not released a competitive flight simulator? I guess it is just because of what you have said in numerous posts: it is a complex software and many traditional gaming development techniques (example BSP trees) do not apply in this game. I can't refrain to dream about having Ace Combat rendering for the FS11 engine though. It would be just beautifull.Actually I was trying to step back from the day to day noze in FS coding, and wondered about some very basic things in the coding of FS from a lower level perspective, and you clearly opened my eyes on many items. Thank you! I was really wondering if APIs are so different, and the rendering pipeline so different, that one would be better than the other for what FS does. A balanced case to showcase my thought (I hope it is one) is: all ID software engines have been based on OpenGL, and not Direct3D, if I'm not mistaken. Why is that? Carmack against Microsoft, or API superiority for the kind of ID games?[ edit ]Another example of such low level considerations: I can defrag the memory used by FS9 and FSX (not talking about external programs that dump unused memory). I tap into your own memory pool, and defrag it. It saves me 5 FPS when loading the Airbus in a complex airport for example. Are these kind of "tricks" used or have they been even ever considered when coding FS? Furthermore, could there be many little pieces like this that could benefit from code review and enhance the overall performance of the sim (lower level basic stuff), or is the main bottleneck in FS is much more higher level algorithms (like you hinted, about maybe the need to overhaul the rendering pipeline to lower draw calls and set textures, which I assume are a consequence of the particular way you decided to render terrain principaly in FS).Yes it is DX9 Bloom, and the updated code has been supplied in the other forum IIRC 1 1/2 years ago. I'd need to dig this one out now because I may have misplaced it. I'll try to find it out for you. I admit, at the time I've released it in private, performance and framerate was not yet a factor considered. I also concede there is always a tradeoff between performance and visuals, so this modified shader was not as "sparkling" as the original, but sufficient for my taste given the 8 FPS saved. In fact, it permited me using bloom otherwise, I couldn't with stock shader code.Hope this helps!

Share this post


Link to post
Share on other sites

I downloaded this demo a week or two ago on my 360 too... first thought that came to my mind as well was "Wow, I wish FS looked like this..."


Ryan Maziarz
devteam.jpg

For fastest support, please submit a ticket at http://support.precisionmanuals.com

Share this post


Link to post
Share on other sites

I thought it was a satire and joke against people who may start a flame war!?

Share this post


Link to post
Share on other sites

>A balanced case to showcase my thought (I hope it is>one) is: all ID software engines have been based on OpenGL,>and not Direct3D, if I'm not mistaken. Why is that? Carmack>against Microsoft, or API superiority for the kind of ID>games?It's neither of those things.Carmack is a big fan of open source. That's why he releases the code to his engines (once he's sucked as much profit as possible from licensing)

Share this post


Link to post
Share on other sites

>you do mean 'specific' and not 'pacific' right?Nope! "Given the pacific nature...""pacific" as in peaceful; the root word for pacifist... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...