- Home /
Blob light projector tiling across deformed terrain
Pictured above is what I am trying to accomplish. I'm projecting a hexagon grid onto some terrain so that when there are changes in the terrain elevation, there is still a visible grid if you look at the terrain from directly above. So far, things are working great until...
...Until I attempt to actually deform the terrain. Once I do that, the orthogonal projection stops tiling and will only actually effect the area it's being projected on to. Is there an easy way to fix this?
i've got the same problem may someone know how to fix this?
try to add collider ar adjust clipping planes for projector to match your terrain height
I also have this problem. To be clear, it's not a question of the clipping planes for the projector. The problem doesn't occur if you don't tile the projector.
Also, in my case, the grid can appear on parts of the terrain (when it should appear on all of the terrain). The area on which the grid gets drawn seems to vary with the location of the camera.
A bit more experimentation seems to suggest that this is limited by the number of triangles the projector can project onto. If I zoom out very far from my terrain, the area on which the projector is visible is larger. As I zoom in, the area where the projected grid is visible shrinks in steps. Fully zoomed in, only on little corner of the terrain displays the projected grid.
I have this same problem. It only projects on a patch of the terrain, and when terrain LOD takes place, patches increase and decrease in size. So yes, directly tied to triangles.
I think this is a BUG!
Answer by Myrddraal · Sep 21, 2012 at 04:37 PM
I think I found the solution: make the projector the same size as the terrain object.
It takes a bit of tweaking to get the tiling right, but it works. The reason the problem occurs is because of the way Unity divides the terrain up into multiple meshes for creating LODs. That's why the problem doesn't occur if the terrain is not deformed.
Hope this helps.
Hey $$anonymous$$yrddraal,
Sweet name btw, I'm reading "The Great Hunt" right now!
So I know that works, but I want to avoid the inefficiency of doing that... I am assu$$anonymous$$g it is much more inefficient, but I might do some profiling to see just how much worse it is.
Thanks for the thought though. I'll try it out!
I think it is worse in terms of efficiency, as it will cause an extra draw call for each extra mesh the terrain gets divided into, but I don't think there's any way around that. It's less efficient but it's the only solution that works (that I'm aware of).