Sorry, 3run, do you know what an alpha channel is?
Your terrain.hmp doesn't contain a single alpha channel as far as I can see. And it needs an alpha channel for _each_ texture.
Do you care for reading the manual?
From the link to the manual, thast I posted above:
The mtlFX.c library in the code subfolder contains a library of predefined surface shaders. All shaders can be examined and edited in the Shader Viewer. For using a surface shader, include mtlFX.c in your main script, assign the shader action to the entity, and adjust the entity skills and material properties that serve as shader parameters.
And here is all you have to write into your script:
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
function main()
{
level_load(NULL);
ENTITY* terrain = ent_create("terrain.hmp",nullvector,NULL);
terrain.material = mtl_terraintex;
}
This does it as well:
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
function main()
{
level_load(NULL);
ent_create("terrain.hmp", nullvector, fx_terraintex);
}
Have a look into the mtlFX.c for the related actions, functions and materials.
Your textures still have no alpha channel.
Do yourself an additional favor and add the textures to your terrain as external texture with the skin manager:
Object --> Manage Skins --> Skin Settings --> Texture --> Texture File --> Extern
For applying an alpha channel look for Gimp and a tutorial on how to apply and paint an alpha channel.
That's not easy, but you have to dig into it.
The link to the shader library within the manual of 3DGS explains the basics.