- Home /
Terrain texture with alpha?
Is there any way of adding a terrain texture with an alpha channel? I have a grass texture on my terrain and would like to add some flowers on top of it, but when painting with my flower texture, the alpha is gone and I just get my flowers on a white background. I've tried with png, tga, psd but so far non is working. Any ideas?
Answer by duck · Apr 16, 2010 at 01:44 PM
No, this isn't possible as you describe. However...
You could get a very similar effect by making a separate texture which is opaque, but contains an image of the grass plus flowers. This means the flowers and the grass underneath would have to share the same tiling value though.
Alternatively - and this would be my favourite solution - you could make the flowers as simple detail meshes - they could be as simple as a single 2-triangle plane which lays flat and faces upwards, or you could make it more detailed to give it some 3d structure. Just make sure if it's flat, that the triangles are raised slightly above the mesh's origin so that they don't end up z-fighting with the terrain surface, or cut into it too much. This plane could then have an flower texture which uses an alpha channel (or multiple flowers as a cluster in one texture), and you could then paint flowers on to your terrain using the grass/detail painting tools.
Thanks for the tip. Too bad that you can't use alpha textures. I've tried to make them as simple detail meshes but Unity aren't too good at placing these. They're placed horizontal on the terrain and therefore sticking out when placed in slopes.
If you just add them as detail textures (i.e. like grass) they will display standing upright. You can actually create and import a 3d mesh (in an external app) of a plane lying face-up, and use that as a Detail $$anonymous$$esh as opposed to a detail texture (a bit like the rocks shown in the example). This should allow you to get flower planes with alpha textures which lie flat on the surface.