- Home /
very flat fbx objects disappear in game view?
Hello again!
This time, my problem has to do with rendering as I believe.. I added some very thing .fbx waterfalls pouring down from some floating island (think Nagrand whoever played WoW) and they look really nice, however most of the time you can't see them. The island has a circular shape, and from it 3 waterfalls streak down, each in a different direction. In game view, I can only see one waterfall at a time, and the other two are invisible... However when I rotate my camera around so one of the other two is in focus, the first one disappears (and the third stays invisible) When zoomed out in scene view I can see all the waterfalls.. How do I set everything up so those flat objects dont disappear? (they really are quite thing..)
Thanks!
Answer by Mortoc · Jul 30, 2012 at 10:03 PM
Sounds like z-fighting. Try using a shader that includes an offset. Simple example:
Shader "No More Z Fighting/Foreground Element"
{
Properties
{
_MainTex ("Main Texure (RGBA)", 2D) = "" {}
}
SubShader
{
ZWrite Off
Offset -1, 0 // This is the important part to avoid the Z Fighting
Blend SrcAlpha OneMinusSrcAlpha
Tags { "Queue" = "Transparent" }
Pass
{
SetTexture [_MainTex] { combine texture }
}
}
}
http://docs.unity3d.com/Documentation/Components/SL-Pass.html
Answer by ScroodgeM · Jul 30, 2012 at 10:03 PM
rather your issue is in geometry facing. you flat object should use double-sided shader or have two faces to be visible from both sides.
so solution 1 - improve shader that you use for it
solution 2 - make some more geometry
Oh, this might actually be the issue as well. I was thinking a flat geometry on something else.
@TheTurkeydipking when asking about graphics issues, screenshots are key