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 HammerBG · Nov 15, 2013 at 10:42 AM · shaderlinerenderercircle

Visualizing area of influence in a sci fi game

Hello there handsome folks,

I am trying to figure out how to display an area of influence around player/enemy owned objects in my 4x game.

So far i am using a line renderer to display the outer influence ring, but i have no idea how to display the inner ring. Plus i would like if the areas collide to share space and push each other depending on the power of each influence (similar to civ5), but that is for much later :)

This is an example of how things should look: http://img34.imageshack.us/img34/5124/bqee.png

I would be very happy if any of you guys share an idea or two on how you would implement something like this. :)

EDIT:

http://canadianonlinegamers.com/wp-content/uploads/2012/07/Endless_Space_Galaxy_View_2.jpg - A similar implementation of what im trying to achieve. Look at the stars "Vorta, Horolium" as the one influence point and the "graffias, wordan" as the opposing influence point.

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 mattssonon · Nov 15, 2013 at 10:49 AM 0
Share

Scale a plane with a circular texture?

avatar image TpkQ91 · Nov 15, 2013 at 10:55 AM 0
Share

Do you want this to be seen in the Game View? or only in the Scene View?

avatar image HammerBG · Nov 15, 2013 at 10:56 AM 0
Share

Yes i thought of this option, but then changing shape based on the colliding borders is impossible to do. Also you're pretty much forced to look straight down with the camera.

avatar image HammerBG · Nov 15, 2013 at 11:00 AM 0
Share

@TpkQ91 its supposed to be a in game representation of the player/enemy influence in the galaxy. So yeah in the game view.

avatar image mattssonon · Nov 15, 2013 at 11:02 AM 0
Share

Why are you forced to look straight down? I'm not sure what you mean by "changing shape based on the colliding borders is impossible to do".

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tanoshimi · Nov 15, 2013 at 10:52 AM

For visualisation purposes, this could be calculated in a custom shader by comparing the distance of each point to the centre of the planet in world space, as described at http://alastaira.wordpress.com/2013/09/07/super-mario-galaxy-reveal-hidden-platforms-cg-shader/.

Comment
Add comment · Show 5 · 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 HammerBG · Nov 15, 2013 at 10:59 AM 0
Share

I will try and see if i can use this, thanks for the suggestion :)

avatar image NicoVar · Mar 17, 2014 at 08:32 PM 0
Share

I'm jumping on a somewhat old thread but, by any chance, did you get it working? I've been playing with this also and I'm not getting the result.

I'm more inclined to think Endless space does not use shaders to accomplish this effect, but rather some mesh deformation technique.

I would love to get your input on this.

Thanks.

avatar image HammerBG · Mar 18, 2014 at 01:37 PM 0
Share

I had to jump to a different project so i could not actually finish this part, but from further research i think a "fog of war" approach is actually pretty viable. Basically each owned planet is a "fog of war" emitter.

On the actual realisation i am pretty sure this is going to be done with combining mesh points to create a huge mesh that envelops all of the players territory, then based on the ownership draw different fills (this is where i think shaders come in handy). I still have no idea on what to do with colliding AOIs from different players though :)

avatar image NicoVar · Mar 18, 2014 at 04:04 PM 0
Share

I've played a bit with the Proximity shader approach. Had to tweak the shader a bit, but got pretty good results.

Problem appears when one planet's influence has to be "eaten" by more than one influence of different ownership. At this stage, I'm not sure the shader approach might work.

I'm thinking of using masking shaders of some sort. I'll see if I have time to play a bit today with that.

Here are some pictures for reference. You can see the problem I mention on the third. alt text alt text alt text

screen shot 2014-03-18 at 1.03.01 pm.png (180.7 kB)
screen shot 2014-03-18 at 1.03.23 pm.png (157.2 kB)
screen shot 2014-03-18 at 1.03.29 pm.png (162.6 kB)
avatar image HammerBG · Mar 18, 2014 at 05:18 PM 0
Share

Damn, pretty good job. Way more "working" than what i had :) Now i really wanna get back to that project :)

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

21 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

Related Questions

Line Renderer will clip some segments if its too far. How to force it to draw regardless of distance? 1 Answer

LineRenderer renders the wrong color 3 Answers

LineRenderer / Shader Disappears After 4.0 Upgrade 0 Answers

Linerenderer circle not drawing as expected 3 Answers

Circle of Transparency Shader: How to implement? 0 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