- Home /
Question for U5Beta forum
Unity 5 standard material for cloth (double-sided)
We want to make a cape for a character in Unity 5. We are using the new Cloth component. The problem is that the cape has to be seen for both sides, but we don't find the way to use the new standard material of Unity 5 in both sides. Is it possible? Are you doing a double-sided version of this shader?
I guess that this is not a strange feature, for example, is not possible to use the new unity 5 material in a flag?
Thanks!
Hi, I'm a modeller working on a project using Unity 5 right now...I've been told by the TD and programmers that we can't use cloth because its apparently broken in Unity 5...I'd just like to know...is this true? No capes, and such for the new Unity? If so I have to throw out a bit of work. Sorry this is a newbie question, I need to mess around with the engine myself perhaps to find out...but if you have any verification one way or the other I'd be curious to know...
thanks,
-Josh
Please take this to the Unity 5 Preorder Beta forum.
We can't support it here as its currently in Beta. The chances of bugs are very high and many issues will be resolved with further updates.
Answer by El Maxo · Feb 05, 2015 at 04:38 PM
Here is double sided shader that i have used in unity 5:
Shader "DoubleSided" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
//_BumpMap ("Bump (RGB) Illumin (A)", 2D) = "bump" {}
}
SubShader {
//UsePass "Self-Illumin/VertexLit/BASE"
//UsePass "Bumped Diffuse/PPL"
// Ambient pass
Pass {
Name "BASE"
Tags {"LightMode" = "Always" /* Upgrade NOTE: changed from PixelOrNone to Always */}
Color [_PPLAmbient]
SetTexture [_BumpMap] {
constantColor (.5,.5,.5)
combine constant lerp (texture) previous
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * previous DOUBLE, texture*constant
}
}
// Vertex lights
Pass {
Name "BASE"
Tags {"LightMode" = "Vertex"}
Material {
Diffuse [_Color]
Emission [_PPLAmbient]
Shininess [_Shininess]
Specular [_SpecColor]
}
SeparateSpecular On
Lighting On
Cull Off
SetTexture [_BumpMap] {
constantColor (.5,.5,.5)
combine constant lerp (texture) previous
}
SetTexture [_MainTex] {
Combine texture * previous DOUBLE, texture*primary
}
}
}
FallBack "Diffuse", 1
}
Thanks El $$anonymous$$axo for your shader, but it's not exactly what we was looking for. I'd like to have the same parameters that a standard material has (Albedo, $$anonymous$$etallic with smoothness, Normal $$anonymous$$ap, Height $$anonymous$$ap, etc). Is it possible?
If not, I'll use your shader, but maybe it needs some changes because I can't see specular or diffuse lights on objects using this shader
Sorry about the mix up, I thought that you were just after a dubblesided shader, I have very little knowledge on program$$anonymous$$g shaders, sorry I cant be of anymore help
Not an expert on shaders either but I have read the the thing that makes it double sided is
Cull Off
So find a shader that works as you want open it and change the Cull On to Cull Off.
EDIT
$$anonymous$$yBad looks like turning off Culling will work but a more professional use is to Cull Front and Cull Back so they react to light differently.
Not sure if it'll help you but might help you search Google/Answers for an example shader that does what you want.