terrain_Mat 3.9 vs 3.10 ?

Scripting questions, discussions, etc
10 posts Page 1 of 1
fLUnKnhaXYU
Posts: 84
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Fri Jan 04, 2019 4:56 am
lately Ive been creating the terrain tile materials for my 3.9 and 3.10 and there seems to be some difficulty with the linking of a material to a terrainMaterial in v3.9 that I dont have with 3.10 . problems that become evident with the footStepsounds and showDust features . Is anyone aware of some problem with 3.9 ? Im creating the terrainMaterials in the terrain painter editor , then a material in which I add the footstep and dust options in the material editor , then edit the material file with a mapto field .to the diffuse image . Not working for the 3.9 .I didnt see any error message concerning any sound int the log file .
Last edited by fLUnKnhaXYU on Sun Jan 06, 2019 1:36 am, edited 1 time in total.
Duion
Posts: 1387
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 04, 2019 11:10 am
Well this is complicated in Torque, you need to create a dummy Terrain FX material and link it to the terrain material for the FX to apply, just watch my code and you may understand, for example this:

https://github.com/Duion/Uebergame/blob ... .cs#L1-L28
fLUnKnhaXYU
Posts: 84
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sat Jan 05, 2019 5:21 am
I am using an unadulterated copy of version 3.9 , the effects are working correctly except for there is no sound for the footsteps .
//=======================================================
//  This is in the file saved by the editor at
//  art/materials.cs

singleton Material(sand_01_FX)
{
   mapTo = "sand";//I edited this field to point to the image name. Its the only "sand" Image being used , I think .     
terrainMaterials = "1";// I DO NOT KNOW WHAT THIS IS
                       // BUT IVE SEEN IT SO I ADDED
                       // IT TO SEE IF ITD HELP
   castShadows = "0";
   showDust = "1";
   effectColor[0] = "0.415686 0.6 0.431373 1";
   effectColor[1] = "0.576471 0.156863 0.156863 1";
   footstepSoundId = "0";
   materialTag0 = "Miscellaneous";
};

//=======================================================

//  This is in the file saved by the editor at
//  art/terrains/materials.cs

new TerrainMaterial()
{
   diffuseMap = "art/terrains/Example/sand";
   detailMap = "art/terrains/Example/sand_d";
   internalName = "sand_01";
};

//=======================================================
This works , with footstep sound , in version 3.10 . Thus , it becomes some sort of sound issue with 3.9 at this point , I guess . Ive tried a couple things already but , it seems there isnt anything to fix , its just not working , as if something is just undone . The dust FX is right , with the right colors , the footStepSoundID is set to 3 , the GFX profiles in the player.CS are the one being used , :?:
Duion
Posts: 1387
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Jan 05, 2019 10:53 am
The sound could not be setup correctly, so it does not load, try using a default sound with footSteapSoundID 0 or 1.
XIXWYRMEXIX
Posts: 61
Joined: Sat Mar 07, 2015 3:13 pm
by XIXWYRMEXIX » Sat Jan 05, 2019 1:38 pm
Just wondering if you checked to see if the sound loaded as Duion suggested. Does the sound show as loading in the console window? That will show what loads and doesn't. From there you can see if something is actually not working, or is just not loading.
fLUnKnhaXYU
Posts: 84
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Jan 06, 2019 1:15 am
in game shows me that the SFXprofile has a datablock and when i use a playonce or play it shows an ID but , there is no sound , It does the same in 3.10 , So , no clue .
The datablocks look the same in the datablock editor , re-pointing to the soft sound profile only adds .ogg extension and has no effect , as I can tell . any suggestion ?
fLUnKnhaXYU
Posts: 84
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Jan 06, 2019 5:26 am
All Ive managed to do is use other sounds in the foot step sounds list in the material editor , other than the footstepsoundID numbers . Can someone confirm that these footstepSoundIDs work in version 3.9 . If Im remebering correctly Ive seen it work for materials to structures But , Im not having any luck with the terrain tiles .
Duion
Posts: 1387
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun Jan 06, 2019 2:01 pm
I have them working, obviously, using latest stable release, I showed the code I used to make it work.
fLUnKnhaXYU
Posts: 84
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Mon Jan 07, 2019 1:38 am
Duion , 3.10 works great . My issue here is with 3.9 . This script code below , is copied from your examples linked to above , I only changed some paths and names . There are no footstep sounds by using the footstepsoundID number which in this case both materials use number 1 . I tested it with an absolutely clean 3.9 binary .
/--------------------------------------------------------
singleton Material(TerrainFX_moss_gravel_dense)    
{    
   mapTo = "moss_gravel_dense_base";    
   footstepSoundId = "1";    
   terrainMaterials = "1";    
   ShowDust = "1";    
   showFootprints = "1";   
   materialTag0 = "Terrain_Sand";    
   specularPower[0] = "1";  
   effectColor[0] = "0.803922 0.780392 0.635294 1";  
   effectColor[1] = "0.843137 0.780392 0.454902 0.349";  
   impactSoundId = "0";
};

new TerrainMaterial()
{
   diffuseMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_mossGrvlDense/moss_gravel_dense_base.dds";
   diffuseSize = "250";
   detailMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_mossGrvlDense/moss_gravel_dense_detail.dds";
   detailSize = "4";
   detailDistance = "100";
   internalName = "moss_gravel_dense";
   macroSize = "20";
   macroStrength = "1.2";
   normalMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_mossGrvlDense/moss_gravel_dense_normal.dds";
   parallaxScale = "0.05";
};

singleton Material(TerrainFX_soil_gravel)    
{    
   mapTo = "soil_gravel_base";    
   footstepSoundId = "1";    
   terrainMaterials = "1";    
   ShowDust = "1";    
   showFootprints = "1";   
   materialTag0 = "Terrain_Sand";    
   specularPower[0] = "1";  
   effectColor[0] = "0.803922 0.780392 0.635294 1";  
   effectColor[1] = "0.843137 0.780392 0.454902 0.349";  
   impactSoundId = "0";
};

new TerrainMaterial()
{
   diffuseMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_soilgravelbase/soil_gravel_base.dds";
   diffuseSize = "250";
   detailMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_soilgravelbase/soil_gravel_detail.dds";
   detailDistance = "100";
   macroSize = "30";
   internalName = "soil_gravel";
   macroStrength = "0.8";
   detailSize = "4";
   normalMap = "art/terrains/terrain_tiles/terrainsTiles_Konserian/TT_konserian_highlands/TT_Kons_soilgravelbase/soil_gravel_normal.dds";
   parallaxScale = "0";
};
/--------------------------------------------------------
So , If you do not add anything more to the script to get the sounds by setting the footStepSoundID then I have to think that it doesnt work in 3.9 . Thank you for your attention to my issue Duion ,
Duion
Posts: 1387
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Jan 07, 2019 9:57 am
I don't know about 3.9, but I had the footstep sounds working all the time, meaning in all possible versions since 3+ years. Maybe I fixed something to make it work again, but I have no idea anymore, you can look my commit history if you really want, but I would not bother and just update the engine, I mean, why you want to downgrade?
10 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest