Jump to content
Sign in to follow this  
bravo 6

Roads and their proper sounds

Recommended Posts

Roads and their proper sounds!

Iv'e become critical about this field since i became passioned in map creation.

ok, the issue is this: Even in some BIS roads (sil*) are not using the right sounds.

In certain sara roads you can hear sand while walking a "sil" p3d road instead a road sound.

I tried to surround the issue by adding some info in config.cpp but atm is not working. I know this works but for other kinda roads.

I don't want to use another layer for this purpose in my mask_lco, i want to make it more natural and realistic.

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

{

class sil : Default

{

access = ReadOnly;

files = "sil*";

rough = 0.000;

dust = 0.005;

soundEnviron = "gravel";

character = "Empty";

};

}

I think with this code it should add a sound in all "sil" files but it does not work as i think it would.

Does anyone know why, or does anyone know how to make it work with original roads, ie, using the ones from P:\ca\roads?

Share this post


Link to post
Share on other sites

AFAIK, the CfgSurfaces class refers to textures, not p3d models. That is to say, textures that you place in the roadway LOD of your models. But, I may be wrong, it might also be different when referring to roads...

Share this post


Link to post
Share on other sites
AFAIK, the CfgSurfaces class refers to textures, not p3d models. That is to say, textures that you place in the roadway LOD of your models. But, I may be wrong, it might also be different when referring to roads...

What about the wood platform i <s>made</s> edited especially for a map?

Amiriya18_s.jpg

1600x1200

I added a texture and when walk on it, i can hear the wood sound. Same thing should happen with roads, no?

edit: the road im referring particularly is "sil"

Opening per example, the file "sil25.p3d"

you can see that it has:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ca\roads\sil_new_ara.rvmat

ca\roads\data\sil_new_ara_ca.tga

So doesn't it mean if i use this code

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

access = ReadOnly;

files = "sil*";

rough = 0.000;

dust = 0.005;

soundEnviron = "gravel"

...

in config.cpp that all existing "sil" texture files will have that particular sound?

edit2: typo

Share this post


Link to post
Share on other sites
Quote[/b] ]ok, the issue is this: Even in some BIS roads (sil*) are not using the right sounds.

In certain sara roads you can hear sand while walking a "sil" p3d road instead a road sound.

I've just completed laying approx 1000Km of Sil and it sounds the way it does in Sara. I've also layed Ash and the other cobbled road, and they all work fine.

I had this problem occur many many months ago on another project where all the sounds were screwed up on certain textures, the cause was using too many mask colors in the same Square

Share this post


Link to post
Share on other sites
Quote[/b] ]I added a texture and when walk on it, i can hear the wood sound. Same thing should happen with roads, no?

You added the texture in the roadway LOD? Meaning, a texture that you don't actually see. This is how it works with objects, I'm not sure if roads work the same way, as they are a bit "special"...

Quote[/b] ]edit: the road im referring particularly is "sil"

Opening per example, the file "sil25.p3d"

you can see that it has:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ca\roads\sil_new_ara.rvmat

ca\roads\data\sil_new_ara_ca.tga

So doesn't it mean if i use this code

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

access = ReadOnly;

files = "sil*";

rough = 0.000;

dust = 0.005;

soundEnviron = "gravel"

...

in config.cpp that all existing "sil" texture files will have that particular sound?

The "files" parameter needs a direct path, AFAIK. So, the parameter should look more like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">files = "\ca\roads\data\sil*";

But, this texture needs to be in the roadway LOD, placing it in any of the visual LODs will have no effect regarding sound.

Again, this is how it works for objects, I'm not sure if roadways are the same.

Quote[/b] ]I had this problem occur many many months ago on another project where all the sounds were screwed up on certain textures, the cause was using too many mask colors in the same Square

There is a limit of only 4 different ground texture types in a given terrain cell.

However, this is different from the sounds which are used in objects.

They are both configured in the same way though (in CfgSurfaces), so it is a bit confusing. The difference is *where* the texture is applied: an object's roadway LOD or on the map?

Share this post


Link to post
Share on other sites

your syntax from your first post is all correct... except in your example you do not have a definition for 'Default'.

that is 'class sil' inherits from 'Default' but you do not define it.

If you fix this... and you are still having problems then the only other explanation is that during the build process (especially if you are binarizing) the build tools cannot make reference to the BIS default config's and therefore cannot resolve your inheritance structure.

so, again files="sil*"; is the correct syntax for that field/property and soundEnviron="gravel"; is a valid sound array name from 'class SoundEnvironExt' which is where characters footstep sounds are defined and this class is defined in the characters.pbo config.cpp.

also as you have quite rightly noted... some of the BIS road models do not correctly have the texture defined in the Roadway LOD and a couple even don't have the 'class=road' property in the Geometry LOD... which are definitely required.

good luck.

edit: sorry... so if you wanted a this exact road model to work correctly then you'd either have to fix up BIS's version of the model and include this in your own addons and override the BIS definition for this particular 'road fix' to point to your model OR make a duplicate of the road models in question and rename them and create configs for them and include them with your own addons build... s'all up too you really.

edit2: ok.. i just double-checked and it appears as though you don't necessarilly need the Geometry LOD but you should define the texture in your Roadway LOD and also definitely have 'class=road' & 'map=road' in your Resolution LOD(s).

Share this post


Link to post
Share on other sites

Guys i really appreciate your posts and concern smile_o.gif

@Aussie, so are you saying you can hear the sound as in Sara.. but Sara have sand or drygrass sound while walking "sil" roads, you can check it in grids Aa58 and Zj74 per example.

Meaning they are not working as they should.

And about the textures issue you refered, im 100% sure that in the Square i check my roads have only sand texture (1 texture).

@General Barron, about the limits mentioned in @Aussie text and to make sure im not making this wrong, my settings are these:

AlAmiriya_settings01_s.jpg

1024x768

The terrain cell here is 10.0m, right? So i can not use more then 4 textures in 10m.

The problem here is how can i notice if i passed 10m or not?

@Synide, your posts are the one that makes more sense to my ideas and thought on this issue.

]except in your example you do not have a definition for 'Default'.

that is 'class sil' inherits from 'Default' but you do not define it.

What do i need to write to define it? (im not good with codes)

About your edits: It means i truly have to edit some Original roads to add the proper sounds, like i did with the wood_platform correct?

edit: typo

Share this post


Link to post
Share on other sites

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

{

class Default;

class sil : Default

{

access = ReadOnly;

files = "sil*";

rough = 0.000;

dust = 0.005;

soundEnviron = "gravel";

character = "Empty";

};

}

This might work. You would inherit the class from the given

ArmA configs.

You might need to add the cfgPatches class to your addons

requiredAddons array to ensure that the ArmA class is loaded

before yours.

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

{

class YOUR_CFG_PATCHES_CLASS // addon class - pbo identifier sort of

{

units[] = {};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"CAData"};

};

Seems not necessary though as CAData doesn't update the

Default class. The actual definition is in .\ArmA\dta\bin.pbo.

For the main core you do not need to (and cannot) dependencies.

Otherwise you could just copy the full class:

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

{

access = 2;

files = "default";

rough = 0.075;

dust = 0.1;

isWater = 0;

friction = 0.9;

restitution = 0;

soundEnviron = "normalExt";

character = "Empty";

impact = "default_Mat";

};

// Might be outdated. Copy from latest 1.14 config yourself!

Share this post


Link to post
Share on other sites

Thanks for the post Q, but i think i have that default in the beginning.. (didn't know if was enough or right)

I didn't post it before because my code is alittle extensive.. lots of class.

I give this file to show you what i had:

class_surfaces.txt

Do i still need to change something? Because it looks really similar to what you informed me.

huh.gif

edit: im going to try out the CfgPatches, after editing my post and after eating smile_o.gif

Share this post


Link to post
Share on other sites

Q i did all steps you mentioned above and got no luck what so even on sil road.

Though i don't understand why ces road have sound even when not configured in config.cpp.

Is there some setting in O2 that im missing?

Share this post


Link to post
Share on other sites
Q i did all steps you mentioned above and got no luck what so even on sil road.

Though i don't understand why ces road have sound even when not configured in config.cpp.

Is there some setting in O2 that im missing?

hmmm... what makes you think it's not defined?

it appears to be well defined in the ca.pbo\config.cpp that I'm looking at...?

anyway... I just tested all this out and it indeed does work so it's just a setup/build issue or combination of details that will be preventing it from working for you...

there is a significant point that you should note about all this though... with road placement you need to make sure that the underlying terrain texture has a similar or complimentary sound associated with it...

eg. take the BIS Sample Island for instance... the underlying terrain texture principally where the roads are located is 'mesto2' which is defined in CfgSurfaces of ca.pbo/config.cpp as having a 'gravel' sound... some of the road models for 'ces' and consequently the textures applied to the models are defined as 'ces_blahblah' and also have a 'gravel' sound associated with them in the CfgSurfaces in ca.pbo/config.cpp.

The reason for this is that although the road model might be entirely hiding the underlying terrain texture it might sneek through in places... you probably won't 'see' it... but you'll 'hear' it if the terrain texture's defined sound is substantially different from the road model's defined sound...

here's an example... I just placed a duplicated 'sil25' piece of road model on my test island... the underlying terrain texture was a grassy texture and so had a 'grassy' sound associated with it... the road model's textures are also defined as having that 'ashphalt roadway' sort of sound... so upon loading the island in game my character is running across grass and I get the grass sound and then he hits the roadway and I get ashphalt sound... but also interspersed with 'grass sound' sneaking through from the underlying terrain texture... the terrain texture is not visible as it's well hidden from view by the road model but obviously the sound 'layer' is rearing it's ugly head a little bit...

now I don't profess to know everything and as this 'issue' is not on my need-to-do list I won't be researching how to alleviate this... but at a guess one might be able to add one of the 'slope' related LOD properties to the road models to help better align/adhere them to the contours of the terrain and perhaps make it so the 'sound layer' doesn't sneak through... Or, perhaps there is no magic bullet for this particular issue and one really does need to have 'like' sounds (perhaps slightly different) for both the terrain textures underlying a roadway and the textures associated with a road model(s)... dunno...

dunno how i can be of anymore assistance though as I've confirmed that the sounds do work for the ashphalt roadway 'sil' if one 'reapirs' them properly AND can build and define the models & configs sufficiently.

I dunno if you aquainted yourself with that 'ArmA Build Environment – Setup & Usage' pdf document I posted in these forums... if you can work out a mental picture for yourself of how the ArmA build environment works and how the inheritance structure works you'll go along way to alleviating most all of your build issues... and that is what this thread is about... a build related issue...

I realize that to follow the info. in that document might mean some substantial changes for your models/islands/configs etc. but believe me it's worth it...

Share this post


Link to post
Share on other sites
Quote[/b] ]it appears to be well defined in the ca.pbo\config.cpp that I'm looking at...?

Yeah i see what you mean, i rechecked, yes it looks to be well defined in original config.cpp. But why doesn't it work for the original sil roads in sara? Nor mine?

Quote[/b] ]with road placement you need to make sure that the underlying terrain texture has a similar or complimentary sound associated with it...

Obviously, i set the sounds differently for texture and road biggrin_o.gif

My ground texture has the sand sound and sometimes gravel, but on road i put road sound. As you can see from my file example i posted above.

Quote[/b] ]here's an example... I just placed a duplicated 'sil25' piece of road model on my test island... the underlying terrain texture was a grassy texture and so had a 'grassy' sound associated with it... the road model's textures are also defined as having that 'ashphalt roadway' sort of sound... so upon loading the island in game my character is running across grass and I get the grass sound and then he hits the roadway and I get ashphalt sound... but also interspersed with 'grass sound' sneaking through from the underlying terrain texture... the terrain texture is not visible as it's well hidden from view by the road model but obviously the sound 'layer' is rearing it's ugly head a little bit...

About this example i understand what you mean.. i notice it with the original ces roads.. we can hear the gravel sound and then some sand sound while walking in the road this happens in Original Sara and my maps, ie, i consider this "natural", but it doesn't happen with the sil roads.

I really would like to have a look to the 'ArmA Build Environment – Setup & Usage' pdf document to see what im not doing and to see what im doing wrong. Can i get a link for the document?

If i may ask, what did you do exactly to be able to hear the road sound in that 'sil25' piece? You just duplicated it or did you changed/add/edited something in O2? Did you add tga texture?

Im sorry for all these questions but i feel you can really help me solve this situation.

Share this post


Link to post
Share on other sites

Sanity Check;

Each of you ..... what environment are you developing in?

P:\CA\MyAddonDirectory

or

P:\MyAddonDirectory

Share this post


Link to post
Share on other sites

P:\Amiriya\roads\data

my .p3d roads are in roads, the textures and .rvmats are in data.

edit: its important to say that i intend to use more roads, but im actually trying to use the original ones from BIS (to save mb) and those are not in roads directory, obviously. They are just called in config.cpp.

edit2: ah and ladders work after binarised. tounge2.gif

Share this post


Link to post
Share on other sites

Llook what iv'e noticed in original config.cpp:

Quote[/b] ]

class Roadway : Default

{

access = ReadOnly;

files = "silnice*";

rough = 0.005;

dust = 0.01;

soundEnviron = "road";

character = "Empty";

};

class Sil_new : <span style='color:red'>Default</span>

{

access = ReadOnly;

files = "sil_new*";

rough = 0.005;

dust = 0.01;

soundEnviron = "road";

character = "Empty";

};

class Asfalt : Roadway

{

access = ReadOnly;

files = "asfalt*";

rough = 0.01;

dust = 0.05;

soundEnviron = "road";

character = "Empty";

};

shouldn't it be

Quote[/b] ]class Sil_new : <span style='color:black'>Roadway</span>

{

access = ReadOnly;

files = "sil_new*";

rough = 0.005;

dust = 0.01;

soundEnviron = "road";

character = "Empty";

};

edit: Still doesn't work sad_o.gifhelp.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]But why doesn't it work for the original sil roads in sara?

not all the 'sil' type roads are in disrepair... the example you refer to above 'sil25.p3d' is one of the ones that is lacking a bit of 'quality assurance'... that is, it's 'broken' it doesn't work because the BIS version of the model is not correctly defined.

So it doesn't matter what you do regarding your config side of things... you won't get the 'ashphalt sound' if you point your road network in your island at the 'ca\roads\sil25.p3d'.

as mentioned before... your options to 'fix' this are...

1. copy the 'sil25.p3d' model over to your addons and fix the model and then utilize this 'duplicate' in your island.

  - to do this all you need to do is make the Roadway LOD look like the 0.5 LOD. ie. it points to a 'texture'.

  - Also, if you leave the textures etc. named as they are then when you 'step' on the model it will utilize the definitions from the standard BIS addons, so you should not need to do any config related stuff with this option... simply include the 'fixed' road models in your addon and point your island roads at these and not the BIS one's.

OR...

2. copy the 'sil25.p3d' model over to your addons and rename it and completely rename the textures and everything. Also, at the same time 'fixing' the Roadway LOD.

  - this option is more complicated as additionally you would need to define new CfgSurface entries relating to the newly renamed textures in your 'braov6_Sil25.p3d' model.

probably best if you do want to use 'sil25.p3d' (and any of the other similarly broken 'sil' models) is to do option 1... i've done option 2 because I prefer all my textures to have english names which are easier for me to understand.

Quote[/b] ]Obviously, i set the sounds differently for texture and road.

that's not unusual... i do too... but the reason on the BIS Example island you don't notice it is because the 'mesto2' terrain textures use 'gravel' sound and the roadway's use gravel too... if 'mesto2s' sound was vastly different from 'ces' road models/textures sounds I'd wager you notice them.

Anyway, it's probably a good rule of thumb to set the terrain sitting under the road to have a 'similar' sound to the road itself.

Quote[/b] ]Can i get a link for the document?

Development Setup

Quote[/b] ]what did you do exactly to be able to hear the road sound in that 'sil25' piece?

I copied the sil25.p3d over to 'P:\Synide\synRoads\Ashphalt\synAshphalt_Lined_25m.p3d'.

I copied the textures and rvmat's to 'P:\Synide\synRoads\Ashphalt\tx' and renamed them to appropriate english filenames.

I then 'fixed' the model by deleting the Roadway LOD and duplicating the 1.0 LOD and then renaming it to a Roadway LOD.

I altered the mappings to textures & materials in the model to the new names for the textures.

In the 'P:\Synide\synRoads\config.cpp' I placed this...

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

#define false 0

#define private 0

#define protected 1

#define public 2

#define ReadAndWrite 0

#define ReadAndCreate 1

#define ReadOnly 2

#define ReadOnlyVerified 3

class CfgPatches {

class synRoads {units[]={};weapons[]={};requiredVersion=1.08;requiredAddons[]={};};

};

class CfgSurfaces {

class Default;

class synAshphalt_Lined: Default {

 access=public;

 scope=ReadOnly;

 files="ashphalt_*";

rough=0.01;

dust=0.05;

soundEnviron="road";

character="Empty";

};

};

I built the synRoads folder into <ArmaGameInstallation>\Synide\AddOns\synRoads.pbo.

I then went to my synR2.pew (test island) and created a new road network and inserted a straight part pointing at 'synAshphalt_Lined_25m.p3d'. I placed the road.

I then Built the island into my Addons folder...

I ran the game and the 'ashphalt sound' was played when I ran over the road... but, as I mentioned because I placed the raod over a 'grass terrain texture' which has a 'grass sound' this too intermittently was heard through from underneath. Although I wasn't expecting this hiccup it is logical if one thinks about it... however I went no further in trying to 'get rid of this annoyance' at this time... maybe you can further examine this issue yourself.

As Gnat reiterates what I said earlier... you really, really need to come to grips with how, where, why, when etc. your build environment works... this is critical to producing repeatable workflow added to this a heathy understanding of how ArmA inherits stuff on the config side and you'll be all good...

The other stuff I've talked about above is a slight side issue to you getting your 'sil25.p3d' sound happening but has bearing on what you are doing...

btw... the above setting up and testing and getting that new road piece ingame took me about 7 minutes... so this illustrates to you that it's really not hard to do if you can come to grips with the way it all works...

semi-finally... regarding that document... as mentioned it is one way to look at the issues surrounding building stuff in ArmA... there are reasons I give in the document for setting things up that way... there are also other reasons I haven't really gone into indepth... and there are other ways of doing it all that will end in acceptable results ingame... however, I do have valid reasons for shying away from the way other people build their stuff for ArmA... s'all up too you really.

and finally, I don't mind talking to people who actually try too at least work things out themselves... what I frown upon is people that don't even bother to apply themselves to a problem or profess some 'expert' status when really there is no such thing... also, unfortunately you've had to suffer my insufferably long responses which is a semi-bad trait of mine... however, I've always thought that it's better to write more and be entirely understood than to write less and be misunderstood and as the 'audience' in these forums are multi-lingual it's often better to write as much as you can at the time without having a brain infarction... I prefer to try and explain things in detail as opposed to just handing you the answer or giving you a working.pbo.

Cheers, Sy.

Share this post


Link to post
Share on other sites

As i suspected after reading your 'fix', the following quote was the only thing that brought my attention and made sense in my head:

Quote[/b] ]I then 'fixed' the model by deleting the Roadway LOD and duplicating the 1.0 LOD and then renaming it to a Roadway LOD.

And there was light! lightBulb.png

I already tested:

renamed to BCsil25.p3d, deleted the Runway lod, duplicated the 1st lod and renamed to Runway. The problem was exactly that, as simple as that.

It works now. I can hear the freaking sound in the BCsil road now biggrin_o.gif

Im so happy! Thank for your truly help and comprehension smile_o.gif

Cheers m8! notworthy.gif

edit: typo

Share this post


Link to post
Share on other sites

lol, no worries... so was the rest of the crap of any interest to you at all?

Share this post


Link to post
Share on other sites
lol, no worries... so was the rest of the crap of any interest to you at all?

well to be honest not really.. (but i needed to know all procedure to know where was the problem) because the rest you wrote i had them, as we can say, "under control".

edit: but i appreciate all you effort on the reply and time you took to explain me and help. Without all of it i might not had that light switched on. MERCI! smile_o.gif

edit2: I hope now BIS can fix their Sil roads aswell in future patches. smile_o.gif

Share this post


Link to post
Share on other sites

Synide, i have to ask this, because looks like its not completely over yet.. LOL

Have you tried the roads with a car?

If you change the following values

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

rough=0.01;

dust=0.05;...

to

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

rough=0.81;

dust=0.85;...

can you notice any difference?

I know i should but i dont, ie, the sound work but the rough and dust don't seem to change, you believe this? huh.gif

Share this post


Link to post
Share on other sites

oh dear... hmmm... i see to remember some discussion about road dust and stuff previously in these forums... sorry mate, i gotta get back onto other stuff... you'll have to forge ahead by yourself now...

roads aren't a priority for me atm... when they become a priority I'll investigate all the little nuances they entail but i guess that doesn't help you much...

Share this post


Link to post
Share on other sites

ok, no problem, you have helped alot already smile_o.gif

Ive been looking into this for some hours now.. trying this, changing that and try again and again..

Already read the Texture and roughness thread but it didn't help much.

Ill continue.. ill try to find the answer. And when i do ill post it here.

I bet its a damn stupid answer in the end biggrin_o.gif

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  

×