Sahara for Torque 3D MIT 3.5.1
by Quinton Delpeche · 07/11/2014 (11:50 am) · 16 comments
Sahara is a tech extension to the Torque 3D game engine by GarageGames which lets you create more realistic game environments by generating naturally accumulated dirt, snow, dust or any other material over your game shapes. It is a successor to BitGap Games Cliff Construction Kit and Konrad Kiss from BitGap Games has allowed me to release this under the MIT license, so here is some more information about Sahara.
The motto of Sahara is: use one model in many environments. Sahara can be set up on a per material basis. Once installed, use the Torque 3D Material Editor to edit the properties of your shape.
You can follow the original forum post regarding this here.
In order to have Sahara work on your shapes, you will have to meet the following requirements:




Enough of the yacking ... here is how you can get it. I have given you three different options to get the code working.
1). Github:
Use my GitHub repository at github.com/qdelpeche/Torque3D/tree/sahara.
2). Patch Files:
Download the Engine and Template patch files and apply them to your system. Make sure you also download the Engine Accumulator files and unzip them in your Engine directory.
3). Changed Files:
Download the changed Engine files and Template files and unzip them in your directory.
Please remember to thank Konrad Kiss from BitGap games for his generous offer of releasing this to the community.

The motto of Sahara is: use one model in many environments. Sahara can be set up on a per material basis. Once installed, use the Torque 3D Material Editor to edit the properties of your shape.
You can follow the original forum post regarding this here.
In order to have Sahara work on your shapes, you will have to meet the following requirements:
- Your material has a Diffuse map
- Your material has a Normal map (with or without an embedded specular map)
- Your graphics card supports Shader Model 3.0
- If you do not meet these requirements and you still try to use the accumulation feature of Sahara, you will receive a warning in the console about it.




Enough of the yacking ... here is how you can get it. I have given you three different options to get the code working.
1). Github:
Use my GitHub repository at github.com/qdelpeche/Torque3D/tree/sahara.
2). Patch Files:
Download the Engine and Template patch files and apply them to your system. Make sure you also download the Engine Accumulator files and unzip them in your Engine directory.
3). Changed Files:
Download the changed Engine files and Template files and unzip them in your directory.
Please remember to thank Konrad Kiss from BitGap games for his generous offer of releasing this to the community.

About the author
Gobbo Games is an Independent Games Development company operating from Durban in South Africa. We believe in creating high-quality cost-effective games that remain true to the belief of Independent Game Developers around the world.
#2
07/11/2014 (2:55 pm)
Thank you Konrad and Quinton.
#3
07/11/2014 (4:36 pm)
No problem, guys, hope it will be useful.
#4
07/11/2014 (6:12 pm)
@Konrad, thanks for being awesome and open sourcing this awesome piece of code.
#5
07/11/2014 (6:37 pm)
This is awesome, thanks a bunch for bringing this to the table Konrad!
#6
With a little bit of tweaking, you can get some pretty decent results.







This is going to really help with Re-Spawn as I have similar objects being used in maps in different biomes and all I need to do is apply the accumulator. I have set up my objects to use skins, so my materials look something like this.
So now I just place the objects ... set the skin and I am good to go. The same will apply to the natural objects like rocks and stuff ... I am very happy that I was given the opportunity to share this with everyone.
Kudos to Konrad for letting me. 8-}
07/12/2014 (1:10 am)
So here are some test images that I have been working. THis were quickly created in Medusa Pro, placed in the World Editor and then had the accumulation placed on them.With a little bit of tweaking, you can get some pretty decent results.







This is going to really help with Re-Spawn as I have similar objects being used in maps in different biomes and all I need to do is apply the accumulator. I have set up my objects to use skins, so my materials look something like this.
singleton Material( MAT_Base_PDiamondPlate )
{
mapTo = "Base_PDiamondPlate";
diffuseMap[0] = "./textures/Base_PDiamondPlate_D.dds";
normalMap[0] = "./textures/Base_PDiamondPlate_N.dds";
specularMap[0] = "./textures/Base_PDiamondPlate_S.dds";
specular[0] = "1 1 1 1";
specularPower[0] = "10";
translucentBlendOp = "None";
useAnisotropic[0] = "1";
materialTag0 = "Platforms";
};singleton Material( MAT_Sand_PDiamondPlate )
{
mapTo = "Sand_PDiamondPlate";
diffuseMap[0] = "./textures/Base_PDiamondPlate_D.dds";
normalMap[0] = "./textures/Base_PDiamondPlate_N.dds";
specularMap[0] = "./textures/Base_PDiamondPlate_S.dds";
specular[0] = "1 1 1 1";
specularPower[0] = "10";
translucentBlendOp = "None";
useAnisotropic[0] = "1";
accuMap[0] = "art/terrains/DesertA/sand05.dds";
accuStrength[0] = "0.5";
accuCoverage[0] = "1.8";
accuSpecular[0] = "0.5";
materialTag0 = "Platforms";
};singleton Material( MAT_Snow_PDiamondPlate )
{
mapTo = "Snow_PDiamondPlate";
diffuseMap[0] = "./textures/Base_PDiamondPlate_D.dds";
normalMap[0] = "./textures/Base_PDiamondPlate_N.dds";
specularMap[0] = "./textures/Base_PDiamondPlate_S.dds";
specular[0] = "1 1 1 1";
specularPower[0] = "10";
translucentBlendOp = "None";
useAnisotropic[0] = "1";
accuMap[0] = "art/terrains/ArcticA/snow02.dds";
accuStrength[0] = "0.5";
accuCoverage[0] = "1.8";
accuSpecular[0] = "0.5";
materialTag0 = "Platforms";
};So now I just place the objects ... set the skin and I am good to go. The same will apply to the natural objects like rocks and stuff ... I am very happy that I was given the opportunity to share this with everyone.
Kudos to Konrad for letting me. 8-}
#7
07/12/2014 (5:00 am)
Awesome!
#8
07/12/2014 (10:02 am)
I can't believe that for the past two days, my dreams have been of T3D for no other reason than this Sahara tech. So elegant.
#9
07/12/2014 (7:28 pm)
Thank you Konrad!
#10
07/12/2014 (9:49 pm)
wow it's amazing!!! thank you Konrad!!
#11
This could definitely be added into core T3D, as it has so many possible uses.
My favorite was on snowy missions, it accumulates very well ... on the tops o objects, etc.
07/13/2014 (3:34 pm)
Thanks Quinton and Konrad!!This could definitely be added into core T3D, as it has so many possible uses.
My favorite was on snowy missions, it accumulates very well ... on the tops o objects, etc.
#12
@Quinton; the dl links to your host don't seem to work :(
07/14/2014 (7:36 am)
That's awesome. Thanks Konrad & Quinton!@Quinton; the dl links to your host don't seem to work :(
#13
07/14/2014 (7:47 am)
@Nils: Whoops ... thanks, these should be fixed now. Sorry about that. 8-{
#14
07/14/2014 (10:58 am)
Konrad and Quinton, you are Sainted for doing this...
#15
07/14/2015 (3:54 pm)
@Quinton did you update those links? I appears some are still dead.
#16
08/28/2016 (6:40 pm)
Sahara was included in the engine since t3d v3.7 
Torque Owner Donnie Hutson Jr