#3969241 - 06/17/14 05:56 PM
Re: DirectX 8 to 9 converter (June 17th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Sep 2012
Posts: 418
AnKor
Member
|
Member
Joined: Sep 2012
Posts: 418
Russia
|
You're right, I need to make a full changelist. Was too busy earlier today. Though there are not so many specific things to test, the most important ones are "black holes" as explained on previous page and general stability. Common: - Improved cockpit performance by reordering the sequence of drawing calls. - Terrain and scenery lighting. Let me know if something looks out of place. It is tuned for WOFF, may look worse in CFS3. - Forests now use dithering instead of alpha blending. Solves some weird artifacts when sky or ground was visible through apparently dense line of trees. - (Should have) fixed a bug in shadow code which caused it to be too sharp on glass surfaces with specular highlight. Need to check though, I looked into it long ago and not so sure. - Smooth ground shadows (standard ones are had jagged edges) with improved performance. - Updated water shader to get better colors and waves with foam under some weather conditions. - Working cockpit light. I didn't even know WOFF has a cockpit light WOFF: - Fixed waypoints and lines appearing outside of the map sheet. - Fixed annoying z-fighting (flickering texture) on Fokker E.V wing and hopefully other aircrafts. Though I think I've seen some new cases of z-fighting which weren't there before. Let me know if you see anything like that. CFS3: - Water foam is turned off for CFS3 by default, I will explain later. - Support for specular and gloss map. - Support for stock cubemap format. I think that's it. It doesn't see to much, but the most work went into updating the core of this converter for best performance and extensibility. Now that it works it should be much easier to add new features.
|
|
|
#3969312 - 06/17/14 08:00 PM
Re: DirectX 8 to 9 converter (June 17th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Aug 2011
Posts: 6,739
Olham
Barmy Baron from Berlin
|
Barmy Baron from Berlin
Hotshot
Joined: Aug 2011
Posts: 6,739
|
Gee, I wish you good luck for a completition soon, AnKor - that sounds amazing!
Vice-President of the BOC (Barmy OFFers Club) Member of the 'Albatros Aviators Club' - "We know how to die with Style!"
|
|
|
#3969404 - 06/17/14 11:38 PM
Re: DirectX 8 to 9 converter (June 17th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Jun 2012
Posts: 220
gecko
Member
|
Member
Joined: Jun 2012
Posts: 220
|
I've got it and am beginning testing! I've done all my testing in CFS3 so far as I figure there are many others doing the same in WOFF. Here's some initial observations in order of your features list:
Black holes seem to be alpha channels of textures being ignored. I looked at several different places where I know these are present and got different results. Some displayed normally, some gave the black hole effect, and others made the visible part black while the transparent part remained transparent. I'll try to track down those textures and see if there are any format differences that are causing the differences.
No problems with stability so far. Everything is just as smooth as ever!
FPS in all situations remains the same. Around 60 everywhere but the cockpit, where it drops to around 30 still. I tested in highly detailed cockpits as well as more basic ones and got the same results with each.
Terrain lighting seemed a bit bright most of the time in CFS3 as you noted already, it's set for WOFF. No worries there, though I wonder is there a file that can be edited to adjust this? Beyond that I noticed that when the sun drops below the horizon, scenery, buildings, aircraft and other objects are still lit up, while the terrain is dark.
I like the forest blending! It's been an annoying bug as long as I've had the game, nice to see it fixed!
I'm not entirely sure what you're talking about with the sharp shadows on glass, they seem to still be sharp, but they don't look bad by any means.
Improved ground shadows look great!
Not entirely sure what was involved in the water changes, though I noticed the panoramic .dds is no longer showing up. I'll be interested to hear the details about that and the foam.
Cockpit light works. I notice it doesn't appear to have any specular aspect to it, which disables a self-lit work around I did a while back, but if the self-lit/reflector sight feature is still planned for a future release this won't be needed anyway.
Specular and reflective textures appear to be working fine. I also noticed that the *_r.dds seems to also modify the specular effects the same way *_s.dds would, which is a nice touch! The result is an awesome effect for metal surfaces! I saw that the panoramic .dds is still applied to other aircraft that don't use an *_r.dds. What controls the strength of this and where it is applied? The only place where reflections have not been restored is on glass surfaces, which still only have the specular highlight.
Stock cubemap works.
I have not seen any evidence of bump mapping, so it seems to be as you suspected. But as it didn't have a dedicated means of determining where on a texture to show the bumps, it actually looks better IMO.
Thanks again for your work, the update is greatly appreciated and all in all a big improvement!
|
|
|
#3969679 - 06/18/14 04:06 PM
Re: DirectX 8 to 9 converter (June 17th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Sep 2012
Posts: 418
AnKor
Member
|
Member
Joined: Sep 2012
Posts: 418
Russia
|
Olham, those features are already available in the new version I published yesterday. Check the first page Gecko, thanks for detailed comments. Black holes appear when DXT1 texture is used AND alpha blending is not enabled for that object. You see, for best performance I needed to know which objects are fully opaque and which have holes in textures (alpha tested) or semi-transparency (alpha blended). Opaque objects are drawn in the fastest possible way in a single pass, alpha tested need two passes, and alpha blended - three! The problem is to decide which mode to use for which object. I've made some assumption based on texture type and whether alpha blending is enabled by original renderer: DXT3 and DXT5 are always at least alpha tested, and become alpha blended if enabled. DXT1 however is considered opaque unless alpha blending is enabled and then it becomes alpha tested and blended - and that's why black holes appear. I noticed that most stock CFS3 models, and I'm speaking about external view, use alpha blending even for obviously opaque surfaces like wings and fueselage (by the way it means that the optimization isn't working at full strength there), however WOFF models and some 3rd party planes (like Hawk III here http://simviation.com//cfs3_aircraft10.htm) have alpha blending more consistently disabled where it is not needed. What affects this flag is a mystery though, I haven't find any mentions of this in SDK docs or material hex-editing tutorial. I'm going to take a closer look but if you have any ideas - let me know, it may help fixing this issue. What is your config, by the way? Performance in cockpit is still noticeable lower that the "non shadowing" version, but should be better than the one from March 25th. Yes, the terrain might be brighter that the original. Not sure if it is bad though, original one in WOFF sometimes feels to be too dark. It can be adjusted in Terrain.fx - I can't tell exact line of code, but it goes like: ... * (In.Diffuse - 0.2) * 1.3 * ... You can try reducing the multiplier here to make it darker. Sun shining from below the horizon is an odd "feature" of CFS3. I hope to adress it someday. I think the breaking change for cockpit light is a specular color - I've changed it the specular for cockpit light to be red instead of default white (there is no way that a faint red bulb could produce white highlights!). And although self lit textures are planned, but I'll probably add an option into config file to restore the white highlights if you need it. When reflections are enabled, _r is used for speculars as well. In fact my shaders don't support specifying _s and _r at the same time, only one of them will be used for both effects. There is no good "user adjustable" control about the way reflections are used on other models, perhaps you can try to adjust #define MaxReflection at the beginning of Models.fx to make them stronger or weaker. I want to add more control, but since WOFF doesn't use this feature its priority is somewhat low. Yes, I noticed that reflections on glass are missing. Will take a look at it. I figured out why bump mapping is missing - I was testing it's performance impact by disabling or enabling it and forgot to restore it back correctly. There is a line in Models.fx: static bool bUseBump; remove the word "static" and they will work again. I will upload new version later, today was excessively busy day for me.
|
|
|
#3969772 - 06/18/14 06:59 PM
Re: DirectX 8 to 9 converter (June 18th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Sep 2012
Posts: 418
AnKor
Member
|
Member
Joined: Sep 2012
Posts: 418
Russia
|
I uploaded a fixed version (June 18th now) that brings bump-mapping back.Ok, I think I already figured it out, and it is simpler that I though. My assumption was that alpha blend is something easily controllable for modeller, but alas it is not true. The difference between stock models and WOFF (or that Hawk III) models is the presence or absence of _s textures. When there are no such textures, a simple built-in shader is used: <ModelSimple Desc="Vertex lighting, no texture effects" ... AlphaBlendEnable="[AlphaFlag]" AlphaTestEnable="True" AlphaRef="8" MultiSample="True" Where [AlphaFlag] is determined automatically by CFS3 based on texture format (true for DXT3/5, false for DXT1). However, when gloss map is used, another shader kicks in: <ModelSpecularGloss Desc="Vertex lighting w/ Specular modulated by Gloss map" ... AlphaBlendEnable="true" AlphaTestEnable="true" AlphaRef="8" MultiSample="True" Which enables alpha blend unconditionally. Not sure why, by the way, maybe it was an overlook by Microsoft devs. Apparently the most straightforward way to enable alpha blend is to resave the texture as DXT3/5 but that doubles its size and not a good option. So the question is answered, but I don't like the answer. I will make some more experiments when time allows and maybe I can invent something better gecko, Wrong textures are likely to be a bug in my code. In this version the actual drawing is very different from what CFS3 engine intends to draw and it will be no wonder if I missed something. I need to know which airplane (and where to get it) and under what conditions (damage, markings), and perhaps a screenshot will help I'll check my config when I get back. Is there a particular setting you recommend? Well no, I can't recommend anything specific. I'm just want to understand how the converter performs on various PC. For me current version rarely goes below 100 FPS in cockpit of CFS3 crafts (of course that's on my gaming, even if old, PC), on a notebook with built-in Intel GPU in may go as low as 4-5 FPS
Last edited by AnKor; 06/18/14 07:18 PM.
|
|
|
#3969841 - 06/18/14 08:38 PM
Re: DirectX 8 to 9 converter (June 18th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Jul 2013
Posts: 246
Glubber
Member
|
Member
Joined: Jul 2013
Posts: 246
|
Could the high walled horizon have anything to do with the sun still shining when it's below the horizon? It seems to me like the horizon should be a lot lower, but I'm not sure where the horizon graphic is or if it's moddable. It's always kinda bugged me a bit. I tried flying in dark closer to sunrise/set when I though it would be below what I felt the real horizon should be, but the moon was up and casting it's own light. Not sure where the cutoff is for daylight shadows.
Last edited by Glubber; 06/18/14 08:39 PM.
|
|
|
#3970046 - 06/19/14 08:12 AM
Re: DirectX 8 to 9 converter (June 18th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Sep 2012
Posts: 418
AnKor
Member
|
Member
Joined: Sep 2012
Posts: 418
Russia
|
manitouguy, those long ground shadow aren't in this version. There is still a lot of work to make them work properly and before that I need to fix some new bugs (like the Death Star shadow which is a gecko pointed out is bug in terrain details blending) and then I'll continue working on them. Glubber, it seems that the ground is drawn with a very thick fog in the distance, but the sky is still clear and thus much brighter than the ground. I agree it looks very weird. I noticed it happens only for certain weather settings so maybe something is set up incorrectly, or it is just an odd limitation of CFS3 engine - it has to use fog to limit the view distance. And by the way, I'm looking (although with lower priority) into improving sun glare effect, so there's a chance I'll fix this weirdness someday.
|
|
|
#3970051 - 06/19/14 08:58 AM
Re: DirectX 8 to 9 converter (June 18th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Sep 2012
Posts: 418
AnKor
Member
|
Member
Joined: Sep 2012
Posts: 418
Russia
|
The "Fog" is haze effect by WM. CFS3 does not need to limit the draw distance, it goes for miles but is very very clear. Ah, I see. The haze itself looks good and blends with the sky correctly unless you are looking at the sun. The problem is the sun glare. CFS3 draws it behind everything else - this allows clouds to obscure the glare more or less properly, but the downside is that it is also cut off by horizon leading to such odd effects. Have you ever noticed how those small circles (lens flare effect) tend to hide behind the horizon as if they were actually hanging far away in the sky instead of being inside the "camera"? What I want to try is moving the glare effect in front of terrain, while still keeping it behind the clouds. This should let horizon to blend more naturally.
|
|
|
#3970069 - 06/19/14 10:16 AM
Re: DirectX 8 to 9 converter (June 18th) - USE AT YOUR OWN RISK
[Re: AnKor]
|
Joined: Jan 2009
Posts: 4,433
Hellshade
Hellshade
|
Hellshade
Senior Member
Joined: Jan 2009
Posts: 4,433
Florida
|
What I want to try is moving the glare effect in front of terrain, while still keeping it behind the clouds. This should let horizon to blend more naturally. That would truly be fantastic, sir. Your continued work on this is greatly appreciated by many.
|
|
|
|
|