This Could Be Very Interesting - AnKor's Shaders - Page 15
Page 15 of 32 FirstFirst ... 5789101112131415161718192021222325 ... LastLast
Results 351 to 375 of 800

Thread: This Could Be Very Interesting - AnKor's Shaders

  1. #351
    re-member,remem-ma-member popsaka's Avatar
    Join Date
    Dec 2006
    Location
    downtown L.A.,Ca., usa,'ey?
    Age
    74
    Posts
    1,345
    Thanks, Ankor. Your help and work has opened up a whole new world for us all.

    p.s. Can anyone post suggestions for an extremely low end rig?

    (Ankor, your laptop must be smokin' hot )

  2. #352
    SOH-CM-2021
    Join Date
    Sep 2005
    Location
    Dayton,ohio
    Age
    68
    Posts
    5,749
    Blog Entries
    1
    BRAVO!! Many Thanks!!

  3. #353
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896
    Hi Ankor,

    thanks for the list of changes. The Dynamic lights issue seems very interesting. Even planes like the p-47 would seem to benefit, with all muzzleflashes able to be shown? Should look amazing on the B25j, too!

  4. #354
    Well done Major! Absolutely love what this does to bare metal! That dark spot on the nose is not just some shadow . . . it's Oahu! I also get a sort of bump map/embossing effect in high sun light (this was also before the latest shaders). If I as forced to say anything negative, it would be that this is playing hell with ALL of my alpha textures.

    Ankor has truly turned CFS3 into an almost entirely newer and better sim. It is almost like it as been remastered. Here's to you, sir!

  5. #355
    Having a small problem here. Dont know if it's related to these new shaders I just uploaded.
    In MAW,QC; when using the following A/Cs with wingmans behind on the landing strip they have their gun blazing and the rear gunner of the players aircraft destroys them before take off.
    the A/Cs are :SJ_SB2C-1C_VB08_43, SJ_SB2C-1C_VB17_43 and SJ_SB2U-1_VB3_38

  6. #356
    re-member,remem-ma-member popsaka's Avatar
    Join Date
    Dec 2006
    Location
    downtown L.A.,Ca., usa,'ey?
    Age
    74
    Posts
    1,345

    Icon28

    I can't find those a/c in maw... Could they have been brought over from PTO RS?
    ...possibly the country in their *.xdp file is haywire?
    I've also had this happen when the enemy was nearby (passing overhead?) and the AI got
    overly enthusiastic while waiting to take off.
    Last edited by popsaka; May 4th, 2016 at 20:33.

  7. #357
    There really is nothing in the files I uploaded that would have anything to do with aircraft or mission behavior. Perhaps just a coincidence that you noticed it now.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  8. #358
    @Gosd - That usually happens to me in QC when the enemy aircraft are nearby. The wingmen are trying to shoot them down but will take each other out in the process. Most likely a proximity bug.

  9. #359

  10. #360
    Quote Originally Posted by FOO FIGHTER View Post
    Well done Major! Absolutely love what this does to bare metal! That dark spot on the nose is not just some shadow . . . it's Oahu! I also get a sort of bump map/embossing effect in high sun light (this was also before the latest shaders). If I as forced to say anything negative, it would be that this is playing hell with ALL of my alpha textures.

    Ankor has truly turned CFS3 into an almost entirely newer and better sim. It is almost like it as been remastered. Here's to you, sir!
    One feature that hasn't been used yet (other than on a couple yet to be released projects of mine) is normal mapping. That embossing feature you notice can be controlled explicitly to add detail to your skins by making a normal map for the aircraft and giving it the same name as your main texture with ".+nm.dds" added to the end. (for a p_51d_t.dds main texture, the normal map would be named p_51d_t.+nm.dds).

  11. #361
    OK, that sounds too cool. Is that mapping texture somehow enabled by the shader mod just through association with the parent t.dds, or is there some hacking into an M3D involved? Does the mapping texture function like an s.dds/r.dds in that the brighter it is the greater the effect? Also, is the alpha texture issue being addressed on some level?

  12. #362
    Quote Originally Posted by FOO FIGHTER View Post
    OK, that sounds too cool. Is that mapping texture somehow enabled by the shader mod just through association with the parent t.dds, or is there some hacking into an M3D involved? Does the mapping texture function like an s.dds/r.dds in that the brighter it is the greater the effect? Also, is the alpha texture issue being addressed on some level?
    Normal map textures (as well as self illumination ones) are loaded by my shaders automatically if their name matches the main texture (with a suffix like +nm) - no changes in M3D are needed.
    These textures use special format - first you create a grayscale map with bumps in brighter color and dents in darker and then convert it to normal map and save in one of suitable dds formats.
    Perhaps gecko can explain it better

    By the way, what is the alpha texture issue I keep reading about?Maybe it is something I can fix, but I don't know what the problem is.

    Ankor, your laptop must be smokin' hot
    Well, I don't really play on laptop, I just use it for programming
    It has built-in Intel HD GPU (don't remember which one) which is too slow to enjoy all visual effects, but just enough to test all features.

  13. #363
    AnKor,

    There has been an occasional issue for a long time now that if the shadow layer dds was saved with an alpha layer it would turn the aircraft black or grey depending on the shade of the alpha. Once I figured out the cause it was easy enough to fix for the few files that had it so I didn't bring it up.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  14. #364
    I figured out the bump map process. However, it is overriding the r.dds texture and presenting the aircraft with an s.dds effect and no reflection. Is this something that should be for non-r.dds models only? I also have what appears to be a scale issue as the wing parts are displayed on the fuselage. Using the Nvidia plug-in for Photoshop. Any suggestions?

    In regards to the alpha texture issue: I have alpha'd out a certain part of a t.dds texture so that it does not appear in sim. With the shader mod active the part shows up black or casts a shadow on the aircraft. Without the shader mod it is invisible as intended. Also, I have custom loadouts that display a ground texture (with the use of an alpha) upon impact and those flash/flicker like crazy. It is entirely possible that I may have done something wrong but this problem has been consistent.

    Side Note: These new shaders are outta sight! I saw my first squall w/rain effect! I mean it looked real, complete with water reflection! Even the tracers cast light on aircraft!

  15. #365

  16. #366
    Just for a quick test and for a point of reference I used the panel line layer for the nm.dds. Looks promising once I have more practice but obviously I have a scale issue. The accompanying r.dds also doesn't seem to be used when the nm.dds is used.

    On the B-25J, the nose guns and turret have been alpha'd out in the textures but their model shadows remain.

  17. #367
    re-member,remem-ma-member popsaka's Avatar
    Join Date
    Dec 2006
    Location
    downtown L.A.,Ca., usa,'ey?
    Age
    74
    Posts
    1,345
    Thanx for that Foo Fighter... You give me confidence to have a go meself!

  18. #368
    Quote Originally Posted by FOO FIGHTER View Post
    Just for a quick test and for a point of reference I used the panel line layer for the nm.dds. Looks promising once I have more practice but obviously I have a scale issue. The accompanying r.dds also doesn't seem to be used when the nm.dds is used.
    I believe if you make it the same size as the _t.dds file it will map correctly. (I just tried it at 2048 x 2048)
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  19. #369
    A useful explanation from AnKor.

    I've been trying to get a surface with high specular and low reflective values, and I can't seem to figure out how. I can't seem to manipulate them separately anymore. What do I need to do to make it work?
    Specular – strength of environment reflections (I suspect in GMAX it is set as Specular Color * Specular Level).
    Glossiness – sharpness of sun and environment reflections.
    To make existing models look better if Specular > Glossiness then glossiness is increased to match specular to avoid having very strong but blurred reflections (real material don’t usually work this way).

    However, it still works vice versa - to get materials with sharp sun highlights, but not reflecting the environment you should set high glossiness, but low specular.

    If you are doing HEX editing of existing m3d files, I have a correction for the info “Projected Knowledge Base” thread on SOH.
    Here what it says now:
    - ff ff ff ff specular factor (RGB components plus intensity)
    - 00 00 00 43 glossiness, usually goes from 00 00 00 40 to 00 00 00 44

    I doubt the last FF in specular has any use, but more importantly my shaders actually ignore the tint of specular and just average its RGB components to get single specular value.
    So FF FF FF FF is the highest specular value (= 255) and thus the strongest environment reflection.
    While 00 00 00 FF is the lowest specular value and minimum env reflection (my code will add a bit of reflectivity anyway).
    Does it work for you?
    If not I will need to check my code – I never actually tried high gloss/low specular combination so maybe it doesn’t work as expected. Just note that our eyes will always see sharp detailed reflection as stronger than a blurred one.

    Glossiness is more complex.
    That 00 00 00 43 is actually floating point number 128.0 which is high glossiness (my code also multiplies it x1.5 by default).
    Note that in this example a special rule I mentioned above will kick in and the glossiness will become = 255 to match specular.
    Now, to convert between floating point number and hex bytes you can use this simple site: http://gregstoll.dyndns.org/~gregstoll/floattohex/
    The only inconvenience is that you need to reverse the order of bytes, while keeping the order inside pairs.
    Simply speaking 00 00 00 43 becomes 43000000, and 12 34 56 78 becomes 78563412 – you also have to remove whitespace.

    Some simple values that mentioned in the thread are:
    00 00 00 40 = 2.0 – very low, basically absolutely dull surface – my shaders will almost certainly override it to make shinier.
    00 00 00 41 = 8.0 – rough surface
    00 00 00 42 = 32.0 – normal shine
    00 00 00 43 = 128.0 – highly shiny
    00 00 00 44 = 512.0 – very shiny, this will be reduced by my shaders which don’t allow glossiness above 250 (it doesn’t make much sense for normal materials)
    For convenience 64.0 will look like 00 00 80 42 in hex, and 16 will be 00 00 80 41.

    Finally, my shaders use _s textures (standard or DX9 specific +sr) to adjust glossiness instead of specular. This is more correct approach used in most modern rendering engines.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  20. #370
    What role do stock CFS3 _r.dds textures play now? Are they treated the same as _s.dds textures?

    If object uses “_r” texture my code uses special rendering settings to simulate metallic surface:

    • Base glossiness is increased by +200. In stock renderer the reflection was always sharp, but in this new one it will look blurred for low glossiness material.
    • First of all, the texture works exactly as “_s” in a sense that it adjusts glossiness - 200% for white, 0% for black pixels.
    • Additionally the texture affects initial reflectivity – white pixels mean that reflectivity is at maximum at any viewing angle (like a mirror), for black pixels the reflectivity relies on Fresnel effect with 0 reflectivity when looking at 90 degrees.
    • There is also some tint applied to specular reflections (both env and sun) – that’s generally how metals behave: gold has yellow tinted reflections, etc. It is implemented in a simplistic way by tinting reflections with main texture color. The amount of tint also depends on “_r” texture (none for black pixels, and the most for white).


    WOFF doesn’t use “_r” textures – so if you need any changes (for example that +200 glossiness hack is undesirable) I can change the way metallic reflectivity works. After all it will give more control – like having unpolished metal which still has metallic properties (high reflectivity at 90* and tinting) but blurry reflections.
    This +200 boost is hardcoded in dll for performance, but you can adjust Models.fx to see the original look.
    Find this part (line 538 and below) and add the line marked in yellow:
    /////// Specular map ///////
    float specMap;
    if(bSpecularMap)
    {
    if(bExtTexture)
    {
    specMap = dot(extMap * vSpecMask, 1);
    }
    else
    {
    specMap = tex2D(Tex1, In.TexCoord.xy).r;
    if(bReflective) Material.fPower -= 200;
    }
    specMap *= 2;
    }
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  21. #371
    Thanx Major. I've added those to my notes and they will come in handy.

    The r.dds alone is OK. It is when the +nm.dds is used in conjunction with the t.dds/r.dds (all .dds textures involved are in 2048) that the problem occurs. I'm using the Nvidia plug-in for Photoshop and I'm assuming that is where the scaling problem is. If anyone is successfully using this plug-in, I would be interested in their filter settings.

  22. #372
    I will check if _r and +nm work together properly. I believe they are supposed to work, but maybe there's a bug as I don't remember if I ever tested it.

  23. #373
    Appreciate you looking into this. Can't thank you enough for all that you have done for the CFS3 community.

  24. #374
    re-member,remem-ma-member popsaka's Avatar
    Join Date
    Dec 2006
    Location
    downtown L.A.,Ca., usa,'ey?
    Age
    74
    Posts
    1,345

    Icon28 Hmmm...

    I recall abandoning the nvidia plugin whilst doing textures in photoshop as it seemed to foul things when saving.
    ...also saving required extra care as too many saves degraded the final product(?) Of course that wuz awhile back
    w/ version 6 and/or 6.1... Just me two cents worth

  25. #375
    Quote Originally Posted by MajorMagee View Post
    I recently noticed an airplane that was overly shiny and seemed immune to the hex editing that I normally use to tone this down. After a good deal of trial and error I rediscovered that AnKor has built in a fix for aircraft that do no have a *_s.dds or *_r.dds file included in the m3d texture references. Adding a 33% gray *_t.+sr.dds file to the texture folder worked to correct the problem.
    I just ran into a model (F6 Mustang from Korea) that the *_t.+sr.dds didn't seem to work with. In trying different things with editing the m3d to get it to work I found that the drawing type needed to be 00 00 FF 00 versus the more typical 00 00 00 00. Normally the m3d only has this factor set to 00 00 FF 00 if it already references a _r or _s file. This limits the utility of using *_t.+sr.dds to add reflective textures because you may still need to edit the m3d file.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

Similar Threads

  1. This looks interesting
    By gigabyte in forum Ickie's NewsHawks
    Replies: 2
    Last Post: April 25th, 2011, 12:55

Members who have read this thread: 100

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •