Wednesday, 19 September 2012

Walking the final stretch


As I said, I will put more info here for the final part of version 4 development. So you can know how many is each 0.1. I hope there are no complaints about putting too many info XD As you'll see I use to making it less boring opening several fronts and doing several simultaneous tests.

I have a near final version of the textures for the doors of the church. Lack decide whether I get the "mass timetable" into a separate decal to gain some definition in letters without taking up much more memory. As I can make a squared decal I can make it without alpha layer, which would be only 170 KB for a 512x512 resolution, which is far enough for crisp letters. Below you can see the texture of the big and small doors (version with "mass timetable" into the main diffuse). You can notice that the crytek original texture from a real picture preserves a person reflection in the glass. LOL.


For columns of Central Park I had previously done tests using decals. I had take that decision because the ornament is a piece of columns within a texture atlas. An atlas is a big texture that includes smaller textures inside. For example, a texture atlas for texturing a car would be a big picture with the door, front, lights, wheels and steering wheel all crowded together and then use each piece in the share. Using atlas reduce drawcalls. One atlas for diffuse and one for the bumpmapping that could be 10 different textures if you have them independently. You've surely heard of the Rage megatexture as a giant atlas where they put all the textures of the level.

When I want to improve the resolution of a texture that is a portion of an atlas, the first attempt to do using decals (if possible) to paste on the final object without changing the atlas (you can see a perfect example of this on the Warning sign in the Hargreves cryomachine in the last post). This not waste memory multiplying by four the whole atlas that I will not improve. So the first tests were with a decal ornament on the columns. I then added a bump detail layer using my stone bump texture. The problem with it is that it's necessary to paste as many decals as that item is displayed on the map and place them accurately on the surface (and here are 4 ornaments for each column, with dozens of columns). This also triggers the memory, since each decal has its alpha layer for transparency when decal is not a square.

In this case, as Central Park is not a level that has too much variety of textures, I have valued expand the 1024x1024 atlas to 2048x2048 and improve much of the column instead of just the center ornament. The original atlas includes a 1024x1024 alpha layer to use as specular texture. So the atlas has a size of 1.3 MB. If I keep specular texture in the alpha channel, my new 2Kx2K atlas will be 5.4 MB. The first thing then is to get the alpha channel as a separate texture, then I have a 2.7 MB diffuse plus a 680 KB specular. Then I walked around the map looking for lighting conditions, the location of the columns and the low values ​​of specular in the material they use, and concluded that using a 512x512 specular represents no loss in visual quality. So that in the end will be a diffuse atlas of 2.7 MB and a specular atlas of 170 KB.

To make the column first thing I did was look for real pictures of central park columns. Below you can see the two best real pictures I found in google images. From the first I could conclude that there aren't two equal columns in the park, so it was an impossible task to find the original image used for column crytek. So I decided to use the second photo removing the bird's nest, which seemed too quirky element to include it on all columns.

The following is the color change, increase symmetry, eliminate hard shadows, add three layers of dirt and start creating the height map that I will use to make bump map and displacement map (parallax effect). You can see below part of the unfinished process. It's the first test, no bump and no displacement yet.


I also searched photos of leaves to redo the texture of the bushes. In this case, the leaves of the bushes are also part of an atlas that includes textures for various types of vegetation. It is an even worse scenario than columns because these bushes are at all levels. If I decide to improve texture atlas using a new texture to represent only that part, I have to create a new material by changing the tiling values and later assign this material to all the bushes of all levels one by one. A really hard work. In this case, alpha layer can't be extracted, it's required to handle alpha transparency. The only way to reduce size would be using an alpha layer with a single bit of precision. This halves the size of the texture, but generates more obvious aliasing at the edges of the leaves. The final size of the texture can be something like this

Atlas 1024x1024 with full alpha    -> 1.3 MB
Atlas HD 2048x2048 with 1bit alpha  -> 2.6 MB
Atlas HD 2048x2048 with full alpha  -> 5.4 MB
Atlas HD 4096x4096 with 1 bit alpha -> 10.8 MB
Atlas HD 4096x4096 with full alpha  -> 21.7 MB


Currently there is no 4096x4096 textures in the whole mod. The only two candidates to use this resolution are the bushes and maple tree leaves. That's why I have left them for last, to test performance in both cases. Screenshots below of individual leaves and some tests using a 2048x2048 with 1 bit alpha (the "worse" option).










 



















































26 comments:

  1. Thank you for explaining a little bit of your hard work.It is interesting to find out how you doing all this to make it happen. Maybe that way some people will understand what is means to create something and how much time it takes.
    Greetings from Romania !

    ReplyDelete
  2. What awesome updates! Thank you for all your hard work! I'm looking forward to playing Crysis 2 the way it's meant to be played.

    ReplyDelete
  3. Fantastic work, Maldo. SILENT made the best vegetation texture MOD for Crysis 1. Maybe it could help you: http://www.crydev.net/downloads.php?view=detail&df_id=4817

    ReplyDelete
  4. excellent work Maldo! I'm going to upgrade to a HD 7870 in anticipation of your 4.0 release :) (I think Nvidia and AMD should gives you some cash because you are driving video card purchases :D
    Hopefully 2 GB of GDDR5 will be enough for 1080p

    Greetings from California, USA

    ReplyDelete
  5. Simply stunning, truly awesome.

    ReplyDelete
  6. I say the 2k leaves look great - 1-bit precision is fine, too; you can't play Crysis 2 without seeing aliasing somewhere, so I'm sure we're all used to it. Great job fixing the MANY missing shadows as well. For a game with some of the best lighting and shadowing effects, they sure made a lot of ghost buildings and objects... Any luck with the particle shadows, by the way?

    ReplyDelete
  7. AMAZING!!! I hope I can play with all the textures on maximum with 1GB VRAM at 1600x900! Also I agree with the post a few weeks ago about the wireframe highlighting of objects and cars. Maybe in visor mode this would make sense. Can you remove it please? Or make it a checkbox like you did in 3.0 with the film grain?

    Greetings from USA!

    ReplyDelete
  8. Fantastic work, Maldo thank you.

    ReplyDelete
  9. What do you mean with "soon" exactly?

    http://www.thefreedictionary.com/soon

    Even the dictionary is not specific.

    Anyway amazing work of art these new textures and thanx for sharing your progress and pictures.



    ReplyDelete
  10. Hey Maldo, have you thought per chance to intergrate SMAA instead of FXAA? It runs a tiny bit worse, but on average looks way better.

    ReplyDelete
    Replies
    1. Agreed.. FXAA is ugly and decreases picture quality

      Delete
  11. Apparently, it has already been done with SMAAinjector. Also, after viewing the video on the page below:

    http://www.iryoku.com/smaa/

    It is working with the CryEngine3. I'll look more into it in the following week.

    ReplyDelete
    Replies
    1. Here are some tools.

      http://www.overclock.net/t/1296721/how-to-anti-aliasing-injection-methods

      It would seem all you have to do is turn off your in-game AA and in the driver. Depending on some configs however, you can leave your driver AA on for enhanced quality. Still researching. It would seem it is a very specific implementation and the config output will very. Depends on what works for your specific setup/game.

      Delete
    2. Okay, I can confirm that it does work with BF3, Crysis2, and with Maldo's MOD. However, there seems to be some trade off's, but I'm still messing with different configs in the .txt file. A lot of tweaking that can be done. But all-in-all, there is a difference. Good lucks guys.

      Delete
    3. If you find a good configuration of it maybe send it Maldo's way and he could distribute it with the mod without having to worry about it too much. Thanks for your info :)

      Delete
    4. SMAA injector is into 4.0. I've talked with SMAA programmer (Jorge Jiménez) a few months ago. He is spanish too. I will put some more info in a new post tonight.

      Delete
  12. @ MaLDo: Nice MaLDo! His blogspot is the first place I started.

    @ JayJapanB: As I understand it, it is very game/rig specific with using the method I described. So what worked for me may not work for you. I spent a good 10 hours yesterday tinkering. Just dive into it, it is fairly easy. Then if you have any specific issues I can try to walk you through. Now, with MaLDo's integration it will be much better, config 100% correctly and streamlined.

    ReplyDelete
  13. Hello MaLDo, awesome work as usual! :D

    I was wondering: when you said you would integrate your mod with the EQM, did you mean this mod?

    http://www.crydev.net/viewtopic.php?f=308&t=71723

    The Quality Mod by ShonE? It is at 1.91 version right now, and it looks amazing! Will you add this in your mod, as an option?
    It'd be fantastic :)

    Keep up the good work! ;)

    Greetings from Italy!

    ReplyDelete
  14. After a fresh view today, I can honestly say that the SMAA injector works beautifully. It looks absolutely beautiful. My only complaint is that the buildings in the distance have aliasing. With that said, I would still recommend it. Big improvement.

    Here is my SweetFX_settings.txt file:

    http://dl.dropbox.com/u/107271294/SweetFX_settings.txt

    I have been able to run SMAA, plus have my AMD driver AA running. (Even though it says to turn it off. Some have been able to gain even better image quality running your driver AA along with the SMAA. YOU WILL HAVE TO TINKER WITH IT TO GET IT RIGHT FOR YOU. It may not work.)It does help the picture on my setup. Again, this may not work on all rig/setups so adjust accordingly.

    ReplyDelete
  15. I just installed Crysis 2 again just for this!! I CANNOT WAIT!!

    ReplyDelete
  16. My favorite game is about to become even better!! YOU ARE THE MAN! Great work from one artist to another.

    ReplyDelete
  17. GREAT WORK Maldo game is so impressive with your mod

    ReplyDelete
  18. how do you uninstall it

    there no diff in iq i could see

    ReplyDelete
  19. If you didn't notice a difference then you are either blind or have it installed incorrectly.

    ReplyDelete
  20. had to post Great mod

    7850 2gb / Extreme preset, Auto config maldo 12.11 Beta drivers 60fps game looks lovely :)

    how have you managed Tessellation without killing our fps? (amd) lol standard crysis 2 only two settings that killed my FPS on Ultra was Object/shading.

    I haven't tried enabling all the features in your tool tho :)

    ReplyDelete
  21. Thanks for the preview. I get a better understanding now.

    ReplyDelete