Hi~ I'm Korean Unity3D User. Recently I'm Playing 'Tiger Woods PGA Tour Online' Because I Heard That Game Was Developed By Unity3D Engine. When Playing The Game, I Saw Grid Is Drawn On Terrain When Ball Is On The Green. So I Wonder How Can Draw Grid Like That On Terrain. I Hope Someone's Help. Thank You~~
Answer by 3dDude
Sep 27, 2010 at 01:04 PM
well i would try a projector with a grid texture...
read about projectors here i would make a orthographic projector that is the same size as the terrain.
The problems on projectors are several and severe if you want decent results. The first of them is to deal with shaders. The best "easy way" i found is to use the projector included on Standard Assets and to change the texture it uses. But it's important you change the image of your texture and add a transparent border, otherwise you won't be able to resize it by using "clamp" mode on the texture import settings. Once you manage to get your projector's grid on the surface you will notice a glow beyond the projection area in camera view or game view. This glow is not visible in editor view, but in camera is, and if you have set a color for the projection light it will look odd and ugly at certain distances. This happens no matter the source object you use for the projector, and still it happens when you use a light source and a cookie texture.
Besides projectors you can try the "grid painted on texture" option. To chieve this, modify your terrain texture by making a copy of that texture with the grid painted on it, and apply it to the terrain. The problem here is you can't define the borders accurately, cause you must "paint" the texture on the terrain, and even using a solid pencil, the borders won't be accurate enough.
Hope you find a better solution. I'm still looking.
Answer by Simpliplant
Jan 02 at 01:58 AM
Simple example without projectors or shaders http://rene.klacan.sk/draw-grid-on-the-terrain-in-unity/
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
2 People are following this question.
Creating a terrain of tiles from an dimensional array
Create terrain with grid
Any resources for using grid/tile data structures with terrains?
Best way to project a grid onto unity terrain
A* Can't Scan GridGraph