Monday, May 19, 2014

Creating vegetation textures for Cryengine using Gimp

My game development Walk through series - Part 1


                        In this tutorial I'm going to talk about creating and importing vegetation textures to Cryengine using Gimp. Actually there is no 'crytiff' plugin for gimp, So I'm going to use layer masking. Let's start with a 'leaves' texture with alpha.
                        If your texture doesn't have alpha try to use 'free select tool' or 'select by color tool' to select the 'leaves' area and right click the layer and click 'Add Layer Mask'. Choose the 'Selection' and apply the layer mask. Now you are ready to go.

                         Now duplicate the Main layer and rename it to 'layer1'. Then add a Gaussian blur to the duplicated layer. Choose value something between 50-100. Then duplicate the layer1 several times.

                         Then merge down the all layers except the main layer.

                         Do this process several times until you get fully covered image or after doing 4 or 5 times you can paint the top layer with leaf's color.

                       Move the main layer to top and place all other layers in ascending order.

                    Right click the main layer and click 'Alpha To Selection'. Then flatten the image (Image->Flatten Image). Again right click on the layer and click 'Add Layer Mask'. Choose 'Selection'.

                         Now your image will look like this.

                          Then export the image(File->Export As...). Use 'tif' file format and in the tiff export dialog box, put a tick in 'Save color values from transparent pixels'. Now you have successfully created the 'tif' texture.

                      Use Diffuse_highQ preset in the crytif UI(I will explain how to get crytif ui manually in my next post).
                     Create the normal map. You can use the normal map plugin. Disaturate the main texture. Tweak the levels and create the gloss layer.



                        Add a layer mask to gloss layer. Use 'Grayscale copy of layer' option. Apply the layer mask. Right click the gloss layer and click Alpha to selection. Delete the gloss layer. We don't need that anymore. Now right click the normal layer and add a layer mask. Use 'Selection' option. Now we have successfully created the normal map with gloss in alpha. Your final image will look like this.


                          Don't forget to add a _ddna suffix to the normal map. Use 'NormalmapWithGlossInAlpha_highQ ' preset in crytif UI.            
                             Using this procedure you can create and import any kind of textures to cryengine. If you have any questions, feel free to comment. Thanks for reading.                      


1 comment:

  1. Thank you very much! Incredibly appreciated, you have no idea how much I wanted this. You deserve cookie

    ReplyDelete