|
How would you go about generating random textures that can be seamlessly mapped across multiple planes in a grid? Currently I have a single prefab plane that is instantiated by a for loop to form a grid of identical planes. Certain events cause planes to fade out (thanks to iTween) and then Destroy. I want the seamless grid to look dirty, without looking repetitive. I was looking at these questions: http://answers.unity3d.com/questions/135940/how-to-map-texture-across-multiple-objects.html http://answers.unity3d.com/questions/146062/spread-material-over-multiple-objects-or-cubes.html But neither of them suit my purposes. Any ideas?
(comments are locked)
|
|
So that was great advice, and I've gotten this working really well for my purposes now. I added a couple lines of code to an answer posted by user "Owen Reynolds" on this question so that I could manually tweak the scale of the world-aligned repeating texture from the GUI side. Here's the full code of the working shader, hope it helps somebody else: Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} _Scale ("Texture Scale Multiplier", Float) = 0.1 } SubShader { Tags {"Queue"="Transparent-101" "IgnoreProjector"="True" "RenderType"="Transparent"} LOD 200 Cull Off Fog {Mode Off} } Fallback "Transparent/VertexLit" }
(comments are locked)
|

Your first link has a good suggestion in one of the answers, you should map the texture based on the object's world position rather than there uvs. Then it should tile more smoothly.
[edit: moving this to comments]
If you think that would work, I will definitely try to approach it that way. What threw me off is that the user Owen who suggested that method also said "The edges all have bad seems, but there's no way around that."
but now that I am reading it again, perhaps that quote was caused by having to do differently angled walls rather than just one plane. Thanks! I'll get back with how my attempts go.