Results 1 to 3 of 3

Thread: Creating Rockwalls | Forums

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

    Creating Rockwalls and terrain texture

    Rockwalls:

    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.

    terrain_My_Map_Name.mat
    and
    terrain_My_Map_Name.mtt

    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.

    http://developer.nvidia.com/sites/de...ewer_v089b.rar

    http://imageshack.us/photo/my-images/861/wtvva.jpg/

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


    terrain_My_Map_Name.mat

    Code:
    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
        );
    }
    terrain_My_Map_Name.mtt

    Code:
    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://www21.zippyshare.com/v/48678481/file.html

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


    http://forums.ubi.com/showthread.php...ture-Painting?
    http://www.worldofleveldesign.com/ca...sign-part7.php
    Last edited by cr1m3; 01-15-2013 at 10:11 PM.
    Reply With Quote Reply With Quote

  2. #2
    The file link that you requested is not valid. Please contact link publisher or try to make a search.
    Reply With Quote Reply With Quote

  3. #3
    Senior Member cr1m3's Avatar
    Join Date
    Oct 2009
    Posts
    707
    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.
    Reply With Quote Reply With Quote

Posting Permissions

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