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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by porygon · May 15, 2014 at 02:42 PM · gridtileprojector

Alternative method to grid projection for a quad-tile game?

Unity default package projector comes with a grid projection cookie. It achieves a very desirable visual effect for me. However, I would want to create grid system where each grid can contains game data (x-y,size, move cost, height, objects that are on this grid, etc.). If I use projection method, projection's grid size depends on distance between projection source and the terrain. I also want to be able to highlight grid (e.g. selecting grid would blend it with blue).

My thought-up method would be to have an thin, transparent grid overlay on top of the terrain. Each overlay would be corresponded to 1 grid, so if I have 1000x1000, I would have 1000x1000 grid objects. These grid overlay will only have border if unselected and will be highlighted with a blending color if selected.

However, this would mean 1000x1000 of "game objects" or shaders. I don't know if this is the way to approach this problem. Is there any other alternative?

Comment
Add comment · Show 7
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 robertbu · May 15, 2014 at 02:53 PM 0
Share

You might take a look at Vectrosity for drawing the grid lines. Here is another gridline/terrain questions that you might find helpful:

http://answers.unity3d.com/questions/442581/how-to-draw-a-grid-over-parts-of-the-terrain.html

avatar image porygon · May 15, 2014 at 04:28 PM 0
Share

@robertbu Can Vectrosity draw a quad projection on a tile?

avatar image DMGregory · May 15, 2014 at 04:56 PM 0
Share

Can you add a mock screen shot of the final effect you want? Depending on your target, other solutions may be possible.

$$anonymous$$yself, I'll often draw a separate piece of geometry that uses a depth shader to overlay a grid on other content - it can be more efficient than projectors, particularly when using deferred rendering, because it doesn't require re-drawing every triangle of every object in the grid.

avatar image porygon · May 16, 2014 at 02:24 AM 0
Share

@D$$anonymous$$G Something along the line of Fire Emblem

Fire Emblem

avatar image robertbu · May 16, 2014 at 04:17 AM 0
Share

@robertbu Can Vectrosity draw a quad projection on a tile?

I'm not sure what you mean. Vectrosity is 'just' a line drawing package...but a very well written one that creates very efficient lines. If you had an arbitrary terrain that you wanted to draw lines on, you would need to supply the vertices for the lines, but it would handle a large number (32,000?) in a single draw call.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by adriandevera · Jun 30, 2015 at 12:20 AM

Huh? Im lost what issues are you having with quads? Im not having any, I just programmed the proper height. But I am having issues making some colors appear more opaque like red.

Is this what youre trying to achieve?

alt text

Comment
Add comment · 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
0

Answer by Cherno · Jun 30, 2015 at 12:58 AM

Here's an old thread that has a script for drawing lines in game view using GL Lines.

Draw grid lines in game view?

Comment
Add comment · Show 1 · 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 adriandevera · Jun 30, 2015 at 02:19 AM 0
Share

yea but Im sure he wants textures not just openGL lines, so the solution for him would likely be projectors

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

23 People are following this question.

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

Related Questions

Projecting a grid over a mesh 1 Answer

How to use the same tilemaps among multiple scenes (e.g. making it a prefab)? 0 Answers

How to check if a grid unit position has a tile from the Tile Palette placed on it? 1 Answer

Low frame rates when using custom 2d tilemap 0 Answers

Restrict the Projector Grid to a certain size? 1 Answer


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