- Home /
How to make plane as tree leaf (2 side plane) like in GTA Vice City?
I'm really interesting in GTA Vice City tree style (just 2 plane for all the tree leaf). Thus I want to remake this palm tree: PalmVc.zip. When I put this fbx into Unity, I can see that Unity renders 2 side of the plane, (but it doesn't perfect, you can see the glass-like on the leaf -> the plane isn't completely transparent) But when I try to remake this tree, my tree can't archive 2-side-plane.
So I have 2 issues:
How to make a 2-side-plane for leaf? I tried to find that secret in the file PalmVc.fbx (check the link PalmVc.zip above), but I haven't found out.
How to remove the glass-like on the leaf plane: Make the plane completely transparent?
Thanks for reading :)
Answer by dan_wipf · Jun 27, 2018 at 08:33 AM
If you intend no wind Animation on your tree this shader should work fine..
Shader "CustomShaders/DiffuseCutout" {
Properties {
_Cutoff("Alpha Cutout",Range(0,1)) = 0.15
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 400
Cull off
CGPROGRAM
#pragma surface surf Lambert addshadow
sampler2D _MainTex;
sampler2D _BumpMap;
fixed4 _Color;
fixed _Cutoff;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
clip(tex2D(_MainTex, IN.uv_MainTex).a * c.a - _Cutoff);
}
ENDCG
}
FallBack "Legacy Shaders/Transparent/Cutout/BumpedDiffuse"
}
Answer by arunvutnoori · Jun 27, 2018 at 07:35 AM
This is due to shader problem . So i say ,go to asset store and download double sided shader by ciconio studios . And after u place ur png image on the plane , a material is generated automtically , go to the material and change the shader to ciconio double sided transparent cutout.
There you go your problem is solved.
Answer by Raxoez · Jun 15, 2019 at 07:28 AM
I know i'm late, but you can actually just go to the materials folder, inspect the material of the palm tree, then click the shader, click Particles > Standard Surface, then click Double Sided