Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Agumen · Jul 30, 2012 at 10:31 PM · terraingridrender

How to render a grid on non-flat world mesh / terrain

Exactly what the question says. I'm looking to render a grid over my world mesh. It's not a unity terrain but it could be if I wanted it to be.

Essentially, what call / function should I be using to draw the lines, and is there a clever way of dealing with the height issue?

I need this for two projects, actually. One is a golf game, where the grid is needed in the landing area for the ball and on the putting green. The other is an isometric tiled RPG like final fantasy tactics etc.

If anyone knows of any bre-built scripts that do this that would be great for me to study, I'd also appreciate any advice as I'd like to learn the theory behind it rather than just plugging and playing with a script.

Thanks for your time.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ScroodgeM · Jul 30, 2012 at 10:39 PM

heights: you can move vertices in plane using it's mesh

http://docs.unity3d.com/Documentation/ScriptReference/Mesh.html

explain: you can take standard built-in plane (200 tris) and using mesh, move vertices id different ways. this way you can get any terrain-like surface. more tris - more detailed terrain can be done. also, you can create surface without basing on plane or something. tell if you want to know how to generate mesh procedurally

different painting: shader is the best way to achieve that

explain: the fastest way to make a painting like a terrain is to use vertex colors. each vertex can have it's own RGBA color. this can be used like a mask. i mean we analyze each channel separately and draw texture based on this color. so, you can use 4 textures to cover you geometry and mix them as you wish

in a complex, if you havn't reason to don't use Terrain, use Terrain 8)

tell if you want to know more 8)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Agumen · Jul 30, 2012 at 10:54 PM 0
Share

I'm afraid I need more info, I'm not sure I understood you.

avatar image ScroodgeM · Jul 31, 2012 at 04:17 AM 0
Share

look answer. there's more info 8)

avatar image
0

Answer by Eric5h5 · Jul 31, 2012 at 04:28 AM

The easiest way is to use a projector. It will work on any mesh, including a Unity terrain, and you don't have to worry about height or anything. The downside is that a projector re-draws everything it touches, so you'd want to be a little careful about using it, but you can use layers to exclude objects that shouldn't be affected.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ScroodgeM · Jul 31, 2012 at 06:36 AM 0
Share

just to be sure about 'and you don't have to worry about height'... projector is able to change geometry???

avatar image Eric5h5 · Jul 31, 2012 at 07:17 AM 0
Share

No, but it projects on any geometry.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to generate a grid for procedurally generated platforms 1 Answer

Render object through terrain 2 Answers

A* Can't Scan GridGraph 0 Answers

How to only show objects in range ? 2 Answers

Terrain hill generating by code 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges