1. #1
    cr1m3's Avatar Senior Member
    Join Date
    Oct 2009

    Creating Rockwalls and terrain texture


    You'll need to add a terrain.mat and terrain.mtt file in the map folder. You can open the custer's map pak to see how the terrain.mat and terrain.mtt are made with notepad or notepad++... To apply the new terrain material, open chromed and change the terrain material in map settings under terrain field. I'd used a custom texture to apply a mud texture on the ground, you can see there's a custom mud.dds in the mtt script under the green channel and a rockwall texture in the c channel. http://img210.imageshack.us/img210/5811/terrainmat.jpg http://img201.imageshack.us/img201/7818/terrainmtt.jpg

    Terrain texture:

    you'll need two scripts in your map folder and your custom dds textures.


    I joined them in the code below and i let you edit them then place them in your map folder with the textures too.

    ((There's explanations on textures:
    http://forums.ubi.com/showthread.php...terials-how-to ))

    I use paint net to create my textures and save them to dds format but it is important to know which compression you need to set when you save your dds texture.
    So i use wtv wiever to know the original game textures dds format.



    To apply the terrain material, open your map then map settings and under terrain field, load your custom terrain mat.
    Then restart chromed.


    import "terrain_My_Map_Name.mtt"  // just change My_Map_Name to yours and leave the rest as it is
    sub material()
        use mtt(
            f_border_min = f_border_min,
            f_border_max = f_border_max,
            s_clr_0 = s_clr_0,
            s_clr_a = s_clr_a,
            s_clr_g = s_clr_g,
            s_clr_c = s_clr_c,
            s_clr_c_srf = s_clr_c_srf,
            s_clr_lod = s_clr_lod,
            s_msk = s_msk,
            s_nrm = s_nrm,
            s_nrm_0 = s_nrm_0,
            s_nrm_a = s_nrm_a,
            s_nrm_g = s_nrm_g,
            s_nrm_c = s_nrm_c,
    //        s_nrm_c_srf = s_nrm_c_srf,
            f_nrm_0_scale = f_nrm_0_scale,
            f_nrm_a_scale = f_nrm_a_scale,
            f_nrm_g_scale = f_nrm_g_scale,
            f_nrm_c_scale = f_nrm_c_scale,
    //        f_nrm_c_srf_scale = f_nrm_c_srf_scale,
            s_shn_0 = s_shn_0,
            s_shn_a = s_shn_a,
            s_shn_g = s_shn_g,
            s_shn_c = s_shn_c,
            s_shn_c_srf = s_shn_c_srf,
            f_shn_0_factor = f_shn_0_factor,
            f_shn_a_factor = f_shn_a_factor,
            f_shn_g_factor = f_shn_g_factor,
            f_shn_c_factor = f_shn_c_factor,
            f_shn_c_shn_factor = f_shn_c_shn_factor,
            e_type = e_type_terrain,
            f_uv_clf_scale = f_uv_clf_scale,
            f_uv_det_scale = f_uv_det_scale,
            f_uv_srf_scale = f_uv_srf_scale                                      // erase all my comments they may affect the scripts

    import "terrain_0agc.mtt"
    extern string s_ter_clr;
    extern string s_ter_nrm;
    extern string s_ter_mask;
    export float f_border_min = 0.70;
    export float f_border_max = 0.78;
    export string s_clr_0 = "town_ground_a.dds";
    export string s_clr_a = "town_ground_e.dds";
    export string s_clr_g = "Your_Custom_Ground_Texture.dds";
    export string s_clr_c = "rock_wall_j.dds";  //Rockwall texture
    //export string s_clr_c_srf = "srf_stone_b.dds";
    export string s_clr_c_srf = s_tex_def;
    export string s_clr_lod = s_ter_clr;
    export string s_msk = s_ter_mask;
    export string s_nrm = s_ter_nrm;
    export string s_nrm_0 = "grass_ground_nrm.dds";
    export string s_nrm_a = "town_ground_a_nrm.dds";
    export string s_nrm_g = "Your_Custom_Ground_Texture_nrm.dds";  //you ll need a normal map texture which is hard to make and need a 3d program to do so choose one nrm from the game textures or try with gimp normal map plugin.
    export string s_nrm_c = "rock_wall_j_nrm.dds";
    //export string s_nrm_c_srf = "srf_stone_b_nrm.dds"; //rock wall only
    export string s_nrm_c_srf = s_tex_def; //rock wall only
    export float f_nrm_0_scale = 1.0;
    export float f_nrm_a_scale = 1.0;
    export float f_nrm_g_scale = 1.0;
    export float f_nrm_c_scale = 1.0;
    export float f_nrm_c_srf_scale = 1.0;
    export string s_shn_0 = "grass_ground_d_shn.dds";
    export string s_shn_a = "town_ground_a_shn.dds";
    export string s_shn_g = "Your_Custom_Ground_Texture_shn.dds";  //you ll need a specular map texture which is hard to make and need a 3d program to do so choose one shn from the game textures
    export string s_shn_c = "rock_wall_i_shn.dds";
    export string s_shn_c_srf = s_tex_def;
    export float f_shn_0_factor = 0.4;
    export float f_shn_a_factor = 0.3;
    export float f_shn_g_factor = 0.33;
    export float f_shn_c_factor = 1.0;
    export float f_shn_c_shn_factor = 1.0;
    export float f_uv_clf_scale = 0.0003;
    export float f_uv_det_scale = 0.00215000030584633350;
    export float f_uv_srf_scale = 0.005; //terrain_0agc scale
    export float f_srf_uv_scale = 20.0; //rock walls                       // erase all my comments they may affect the scripts
    And there's a tutorial on how to put colors on the terrain but backup your map before to edit
    the terrain with the terrain painting tool cause most of the time, it break all your terrain textures and you can't
    fix this mess.

    http://d01.megashares.com/dl/6OdoPPK/coj2 texture.rar

    http://d01.megashares.com/dl/94r4una/coj2 texture.avi

    Share this post

  2. #2
    The file link that you requested is not valid. Please contact link publisher or try to make a search.
    Share this post

  3. #3
    cr1m3's Avatar Senior Member
    Join Date
    Oct 2009
    Yes, sendspace does'nt keep file long time but i'd updated the link through megashares.
    They say that the file stay 90 days even if there's no download and resatart to zero days each time someone download the file.
    Share this post