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 awang · Aug 08, 2014 at 05:58 AM · shadertexturefog of war

How to make a fog of war with textures

I googled a lot and find they all use shader to make it.

But I didn't know much about shader.

And I find the fog of war in the game(age of empires 2) is what I want.

In those times,shader haven't been so powerfull and they must make a fog with textures right?

alt text

Comment
Add comment · Show 1
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 rutter · Aug 08, 2014 at 06:00 AM 0
Share

You could probably try to accomplish that effect with multiple camera passes (one renders the world, another renders fog-of-war over that). See the camera manual page for more about that sort of technique. Sounds laborious.

Shaders are used nowadays because they're less effort overall, run faster thanks to the GPU, and they tend to look better besides that.

If you find them overwhel$$anonymous$$g, a simple-ish additive material effect, or maybe a z-test shader, might be an okay place to start.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by HarshadK · Aug 08, 2014 at 06:14 AM

Here are some tutorial and discussions about the topic:

  • Unity Fog Of War. Tutorial 2. Static and dynamic fog of war using render to texture feature

  • Newbie question on how to draw a custom texture

  • Fog of War

Comment
Add comment · Show 3 · 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 awang · Sep 16, 2014 at 01:54 AM 0
Share

Now I use shader to make it

avatar image fighder · Jun 16, 2015 at 12:25 AM 0
Share

awang, how did you do it? I've been looking for the exact same thing.

avatar image awang · Jul 09, 2015 at 08:35 AM 0
Share

@fighder Have you been used Tiled$$anonymous$$ap Editor?If not,you can try it and look at this article : http://www.codeproject.com/Articles/106884/Implementing-Auto-tiling-Functionality-in-a-Tile-$$anonymous$$. It used to make tile based terrains,but you can also use the algorithm to make fogs

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Global Rendering with a shader that uses a texture 1 Answer

How can i get mixed texture from one shader and set it for another object with another shader? 0 Answers

Open project from MAC at PC 2 Answers

Unity 4 Texture3D problems 2 Answers

Rendering a G-Buffer for a cubemap 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