- Home /
Totally insane rendering problem- Uvs Collapsing
Hi there, I have 2 objects that I'm exporting, from maya, in FBX format. I am using a custom vertex-lit shader that I'll post below. It's very simple.
Both of those objects have 2 materials on them -- the same two materials.. Just picture one object with two materials, now duplicate that object in your mind. that's what i have.
If i export these objects by themselves, everything is fine. if i export them together, i get the following behaviour:
the objects look fine from a certain camera angle, but when i rotate the camera, it looks as though the uvs "collapse" or something - that is, the color for the materials stays correct, but there is no detail anymore, as if the uvs have been collapsed down to a point. honestly I'm not sure what's actually happening.
both objects have 1 uv channel and are mapped within their bounds. I have many other objects in the scene that have uv mapping way outside the 1,1 bound, so I'm pretty sure that isn't the problem.
oh, and by the way, this problem isn't happening with the default unity shaders.
the shader I'm using is thus:
Shader "Harmony Arcade/VertexColor Unlit" {
Properties { _MainTex ("Base (RGB)", 2D) = "white" {} }
SubShader { BindChannels { Bind "vertex", vertex Bind "color", color Bind "normal", normal }
Pass{ SetTexture[_MainTex] { Combine texture * primary } }
}
}
Answer by Jessy · Feb 23, 2011 at 09:32 PM
Bind "texcoord", texcoord
GAWD. thank you Jessy.
Is there something I can read to help me understand this binding process? after reading and re-reading the docs, I have to say that I dont get it .... at all.
Not that I know of. I don't specifically have a video about BindChannels (http://www.youtube.com/user/JessyUV?feature=mhum#g/c/31F6A116DCCC9F61). But there aren't many options for binding. The key is to just put in what you need, and no more. For example, your 'Bind "normal", normal' isn't doing anything useful above normals are for lighting. You do need vertex positions, UV mapping, and vertex colors, though, so the rest is necessary. I'll try to help you if you have questions which would help me understand what you don't know yet.
If you have a big list of questions, maybe you could put them in a new question?
Your answer
Follow this Question
Related Questions
Texture uv's offest in distance? 0 Answers
Assigning UV Map to model at runtime 0 Answers
UV Textures are not rendering properly 0 Answers