Jump to content
Sign in to follow this  
[aps]gnat

CfgSurfaces and LODs

Recommended Posts

Hi,

Only new to using the CfgSurfaces and I didnt find a thread or and example that resolves where the texture must be found.

Is it the 0.0 Resolution, Geo, Pathway or Roadway LODs that CfgSurfaces it really looking for?

I assume the FILES="TextureFileName*" would refer to a surface texture file name used on a surface in a LOD, that you can walk on or above or across.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSurfaces

{

class CarrierDeck

{

files="floor*";

rough=0.0005;

dust=0.001;

soundEnviron = metal;

};

class CarrierDeck2

{

files="deck*";

rough=0.0005;

dust=0.001;

soundEnviron = metal;

};

};

Share this post


Link to post
Share on other sites

Umm......yes

I think cfgSurfaces are referring to the terrain surface types.

The sort of thing you do for .wrp files.

When the game engine encounters textures of the defined types it treats that surface accordingly.

For example, the class Runway

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Runway:Roadway

{

access=2;

files="rw*";

rough=0.001;

dust=0.006;

soundEnviron="road";

};

It inherits from the class Roadway, as you can see, whenever a texture that begins with the letters rw is encountered, the engine treats that as a runway surface.

So, no, it isn't specific to a model or surface on a LOD

Planck

Share this post


Link to post
Share on other sites
... whenever a texture that begins with the letters rw is encountered

ummmmm .... but encounters it WHERE ?

This cant be just Wrp files, I've seen it in models from time to time I'm sure ....... crazy_o.gif

Share this post


Link to post
Share on other sites

@Gnat

What you are looking for is CfgMaterials and CfgTextureToMaterial. CfgSurfaces is only to define the roughness and dust coming from diverse terrain textures (and the sound for foot soldiers). CfgMaterials defines the shininess of a specific material and CfgTextureToMaterial defines which Texture belongs to which material.

Share this post


Link to post
Share on other sites

oh, thanks vektorboson. Seems I've mistaken where its used.

So maybe I need to rename my textures to similar to BIS metal textures .... maybe

This maybe the only way to get it to work.

Share this post


Link to post
Share on other sites
Gnat @ Jan. 22 2006,23:17)]oh, thanks vektorboson. Seems I've mistaken where its used.

So maybe I need to rename my textures to similar to BIS metal textures .... maybe

This maybe the only way to get it to work.

That's an example material setting I am using for a URAL truck:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgTextureToMaterial

{

 class SCF_SR_Metal

 {

   textures[]=

   {

     "scfsr\ur\blat.pac","scfsr\ur\blatnew.pac",

     "scfsr\ur\front.pac","scfsr\ur\green.pac",

     "scfsr\ur\haube.pac","scfsr\ur\kab_b.pac",

     "scfsr\ur\kab_s.pac","scfsr\ur\kab_t.pac",

     "scfsr\ur\kab_ws.pac","scfsr\ur\opak.pac",

     "scfsr\ur\zadek.pac"

   };

   material=#SCF_SR_Metal;

 };

};//class CfgTextureToMaterial

class CfgMaterials

{

 class SCF_SR_Metal

 {

   ambient[] = {1,1,1,1};

   diffuse[] = {1,1,1,1};

   forcedDiffuse[] = {0,0,0,0};

   specular[] = {0.6,0.6,1,1};

   specularPower = 3;

   emmisive[] = {0,0,0,0};

 };

};//class CfgMaterials

You can see here, how textures are referenced. And of course don't forget to binarize your model, otherwise materials won't work. (it's a good idea to binarize anyway!wink_o.gif

Share this post


Link to post
Share on other sites

I see, interesting. But does this give the surface a "metal" sound when its walked on or just a metal sound or dynamic only when shot at ?

.... and binarize'ing ..... I suck, I cant get that $#^%#^%$ program to work 99 times out of a 100 sad_o.gif

Share this post


Link to post
Share on other sites
Gnat @ Jan. 23 2006,14:57)]I see, interesting. But does this give the surface a "metal" sound when its walked on or just a metal sound or dynamic only when shot at ?

.... and binarize'ing ..... I suck, I cant get that $#^%#^%$ program to work 99 times out of a 100 sad_o.gif

CfgMaterials gives the surface a metalic reflection ("specular lighting"), whereas CfgSurfaces gives a specific texture a sound. Look in the commented config, which texture makes what sound, and then just give your roadway that texture.

What's your problem with binarize? I think it's very easy to setup and to let it work.

Share this post


Link to post
Share on other sites

Thx for your help so far .....

The BIS config has this under CfgSurfaces;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Metal

{

access = ReadOnly;

files=plechprolis*;

rough=0.15;

dust=0.1;

soundEnviron = metal;

};

So I renamed all the Resolution LOD surface files used for decks to "plechprolisXXX" etc ...... but it didnt work sad_o.gif

Walking, initially you get a ground crunching sound then that disappears and u get silence. If you drive around you get lots of dust sad_o.gif

Would I need some sort of CfgSurface definition in my config file as well !?

Share this post


Link to post
Share on other sites
Gnat @ Jan. 24 2006,15:59)]Thx for your help so far .....

The BIS config has this under CfgSurfaces;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Metal

{

access = ReadOnly;

files=plechprolis*;

rough=0.15;

dust=0.1;

soundEnviron = metal;

};

So I renamed all the Resolution LOD surface files used for decks to "plechprolisXXX" etc ...... but it didnt work sad_o.gif

Walking, initially you get a ground crunching sound then that disappears and u get silence. If you drive around you get lots of dust sad_o.gif

Would I need some sort of CfgSurface definition in my config file as well !?

I quite don't understand what you mean?

In the data.pbo there is a texture called something like plechprolis  (I don't know how exact). You take that texture and you texturize with this texture your Faces in the Roadway LOD. There is no need for an extra config entry.

Share this post


Link to post
Share on other sites
You take that texture and you texturize with this texture your Faces in the Roadway LOD. There is no need for an extra config entry.

Aaaarrrhhhh ! Bingo .... now it works. Thanks! ... now I get the "walking on metal deck plates" type sound.

But the only annoying bit is that it has slowed vehicles and still creates a little dust.

So rewinding to my original attempt to define my own CfgSurface, can I now "copy" the METAL definition and adjust "rough" and "dust" ?

Maybe;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Carrierdeck: Metal

{

files=myfiles*;

rough=0.001;

dust=0.005;

};

Share this post


Link to post
Share on other sites

Nop ..... doesnt work sad_o.gif

Even if I add;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class default;

class Metal : default{};

at the front.

Renamed the textures to rw* (Runways) so they have better dust and rough characteristics, just a shame it sounds like Im walking on road ......

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×