Search Unity

Handmade texture tutorial

Discussion in 'Made With Unity' started by janpec, Sep 11, 2011.

  1. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    "Handmade" tileable texture tutorial

    This tutorial is using Photoshop and Mudbox in pipeline, but you can also use Zbrush or 3ds max to fill some steps.

    First start with 3d modeling application of your choice and model simple plane. It should be same dimensions (eg 10x10), or it can either be 1:2 but the actual resolution of image is up to you.



    Export plane to Mudbox.

    Sculpt high polygon version of wooden floors. I have used arround 2 milion polygons for sculpting, but keep in mind that 1 milion polygons is more than enough for texture in resolution 1024x1024 pixels.
    This high poly model will be used for normal map and ambient occlusion map, alongside it will be also used for diffuse and specular map.


    Preapare your high poly model for texture extraction. What we have to do is to place model right in centre and activate only top view. To activate top view go under object lists, right click on "top_view" and click "see trough".
    Now minimize your working screen a bit with click and draging right side of working screen and try to make it in 1:1 square size. It doesnt matter if you have several pixels higher in one side (eg. 1100x1024) since you can correct image size later in photoshop.
    Make sure that there arent any empty space left on screen, and that model is covering whole view area.



    Now apply screen-to-normal filter. This will filter whole screen into normal map depending on surface of model.
    Click on render and save screen. Save texture as normal map. Make sure that you add .jpg on end of name, otherwise Mudbox will save textures in .png format which is not what you want. So for example save texture in name: wooden_floor_nrml.jpg

    Now deselect screen-to-normal filter and apply ambient occlusion and cavity ambient occlusion filter. This will add dark areas on your floors where there are self shadowed areas on model.
    Save this again as you did for normal map, and save it as ambient occlusion texture.




    Now put both saved textures in Photoshop and apply Filter-other-offset and set something like 200 in upper and 200 in bottom area. Now you will have to correct seam lines with healing brush. Correct this on both textures.
    Save both textures again.



    You are ready to import textures on model in Mudbox. Simply import your modeled plane mesh in Mudbox(it has to be unwraped and make sure that unwraped face is in whole 1:1 UV area).
    Import your saved normal map texture as normal map channel. Your normal map will now be previed on model.



    Now paint one simple diffuse texture in Photoshop or either in Mudbox on model. This texture will be used as main base for diffuse texture.
    When done import texture on model in Mudbox as diffuse channel.



    Import your saved ambient occlusion texture on model under diffuse channel. Play with layering a bit to see which layering method makes the best results. I have used multiply and overly layering and duplicated ambient occlusion texture twice.



    Next step is to make your diffuse map scratches match your normal map. To do this open your normal map texture in Photoshop and go under Filter-Stylise-Find edges.
    This will find edges on your normal map and mark them. Then click Image-adjustments-Invert. This will now invert values and will make those edges that are the sharpest white. Now click Image-Mode-Grayscale. This will make texture black and white.





    Import this texture into Mudbox under diffuse channel. Use overlay layering method or Color dodge layering to enlighten edges of normal map on diffuse channel. This will match diffuse and normal map texture on your model.



    If needed darken diffuse texture a bit.

    For specular texture simply export your created diffuse texture and import it under specular channel. If your specular is to bright, darken it if needed.





    Voila, thats it. This texture is now tileable and can be used on floors or wall.
     
    Last edited: Sep 11, 2011
  2. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    Very nice Janpec. If its not too much, could you post a time lapse video of the process?
     
  3. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Sorry cant do. I have been trying to make video, but sadly i cannot record while doing anything in Mudbox becouse frame rate drops dangerously low and it automatically stops recording with any software. And if i cant record in Mudbox its really pointless since it covers arround half of pipeline.
     
  4. David3D1

    David3D1

    Joined:
    Aug 14, 2011
    Posts:
    172
    Very nice tutorial.
     
  5. AaronG

    AaronG

    Joined:
    Jun 30, 2011
    Posts:
    39
    This is great, thanks for sharing! I'd definitely be curious to learn more about your UV unwrapping and normal mapping pipeline for models as well.
     
  6. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    Damn, but its still a good looking tutorial. Does the model in the second image have a texture on it or is it just very high detail?