[Tutorial] Add camuflage

Results 1 to 7 of 7
  1. #1
    Valued Member erickstyle is offline
    MemberRank
    Sep 2008 Join Date
    Santo André, BLocation
    104Posts

    cool [Tutorial] Add camuflage





    Search in WarZ.sln

    Code:
    /*
    // update camo only if player has special items
    gCamouflageDataManager.UpdateCamouflageData(*this);
    */
    remove comment

    like this

    Code:
    // update camo only if player has special items
    gCamouflageDataManager.UpdateCamouflageData(*this);
    as an example I will use the ghillie_armor

    open Ghillie_Armor.mat

    change Camouflage= 0 to Camouflage= 1

    and add

    CamoMask= adaptivecamo01.dds

    like this

    Code:
    [MaterialBegin]
    Name= Ghillie_Armor
    Flags= _unused_
    SpecularPower= 0.00
    Specular1Power= 0.06
    ReflectionPower= 0.00
    Glows= 0
    DoubleSided= 1
    Color24= 141 131 121
    DetailScale= 10.00
    Detaildistance= 5.00
    displace= 0
    displ_val= 0.100
    TransparentShadows= 0
    Type= Wall
    Camouflage= 1
    Texture= ghillie_armor_diffuse.dds
    NormalMap= ghillie_armor_normal.dds
    SpecularMap= ghillie_armor_specular.dds
    CamoMask= adaptivecamo01.dds
    [MaterialEnd]
    adaptivecamo01.zip
    Last edited by erickstyle; 28-09-16 at 08:21 PM.


  2. #2
    Valued Member facedev is offline
    MemberRank
    Sep 2013 Join Date
    code worldLocation
    100Posts

    Re: [Tutorial] Add camuflage

    From WarInc :) n1

  3. #3
    Valued Member erickstyle is offline
    MemberRank
    Sep 2008 Join Date
    Santo André, BLocation
    104Posts

    Re: [Tutorial] Add camuflage

    Quote Originally Posted by facedev View Post
    From WarInc :) n1
    but is commented on warz
    after i work with war inc source i search in warz and found

  4. #4
    Valued Member facedev is offline
    MemberRank
    Sep 2013 Join Date
    code worldLocation
    100Posts

    Re: [Tutorial] Add camuflage

    Quote Originally Posted by erickstyle View Post
    but is commented on warz
    after i work with war inc source i search in warz and found
    I saw it commented in WarZ source once before but I leave it commented. A nice feature from WarInc, I don't know why they remove it from WarZ.

  5. #5
    Enthusiast Italo Salazar is offline
    MemberRank
    Jun 2013 Join Date
    43Posts

    Re: [Tutorial] Add camuflage

    Code:
    000075.314| !!! ERROR: r3dTerrain3::GetDominantTexture: implement me!

  6. #6
    Enthusiast Anarchy4Real is offline
    MemberRank
    Jul 2016 Join Date
    Houston, TXLocation
    33Posts

    Re: [Tutorial] Add camuflage

    in Terrain3.cpp look for this and comment out the error and it works fine.


    r3dTerrain3::GetDominantTexture( const r3dPoint3D &pos ) /*OVERRIDE*/
    {
    #if R3D_TERRAIN_V3_GRAPHICS
    #if 0
    const r3dTerrainDesc& desc = GetDesc();


    int x = int( pos.x / desc.CellSize ) * m_DominantLayerData.Width() / desc.CellCountX;
    int z = int( pos.z / desc.CellSize ) * m_DominantLayerData.Height() / desc.CellCountZ;


    x = R3D_MAX( R3D_MIN( x, (int)m_DominantLayerData.Width() - 1 ), 0 );
    z = R3D_MAX( R3D_MIN( z, (int)m_DominantLayerData.Height() - 1 ), 0 );


    int domiLayer = m_DominantLayerData[ z ][ x ];


    if( !domiLayer )
    return m_BaseLayer.DiffuseTex;
    else
    {
    if( domiLayer > 0 && domiLayer <= (int)m_Layers.Count() )
    {
    return m_Layers[ domiLayer - 1 ].DiffuseTex;
    }
    }
    /*#else
    r3dError( "r3dTerrain3::GetDominantTexture: implement me!" );*/
    #endif
    #endif


    return NULL;
    }

    Credits @GetRekBambi for the help with this fix.
    Last edited by Anarchy4Real; 29-09-16 at 11:24 PM.

  7. #7
    Enthusiast Cinx is offline
    MemberRank
    Aug 2015 Join Date
    36Posts

    Re: [Tutorial] Add camuflage

    Need to develop GetDominantTexture function for terrain 3



Advertisement