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 Macro · Nov 09, 2014 at 12:34 PM · cameraparticlesocclusionfog-of-war

Camera cutout effect (fog of war) based upon particle system

I am prototyping something 2d (top down) at the moment and was looking at trying to create a fog of war style effect around the player using a particle system. However for the life of me I cannot find a way to get it to work. I was assuming I could have a camera which has a solid colour background then do some form of cutout based upon a layer (the particle system) so only areas the particles cover would be visible, then have another camera with a lower depth render the rest of the game, so you would basically have a sort of viewable area based upon the particles.

I am sure this could be achieved with a render texture as a mask but I do not have unity pro, so I cannot do that approach, so there any way to achieve this with unity free?

Comment
Add comment · Show 4
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 MrSoad · Nov 09, 2014 at 12:42 PM 0
Share

You could have a look at these :

https://www.assetstore.unity3d.com/en/#!/content/20591

https://www.assetstore.unity3d.com/en/#!/content/11640

You could also have a look at utilizing this (prob you best option) :

http://wiki.unity3d.com/index.php?title=Depth$$anonymous$$ask

avatar image Macro · Nov 09, 2014 at 01:11 PM 0
Share

I have used depth cutout before, for making a porthole style effect on certain elements, but with the particle systems it does not seem to behave the same way but maybe its because its 2d and not 3d or something. Also this way requires you to have some form of overlay to act as the object you cull through, which is fine, but I thought there would be an easy way to do some form of alpha or depth check purely on the camera via a shader or something.

avatar image MrSoad · Nov 09, 2014 at 01:21 PM 0
Share

I wondered if you could have two or three large quads, each with a transparent tiled fog texture on them, each rotating the texture via texture offset, placed slightly above each other. You could then use the depth mask shader to cut through these quads via whatever shaped overlays you wanted to reveal what is underneath...

avatar image Macro · Nov 09, 2014 at 01:32 PM 0
Share

Just to clarify I am specifically after using particles for the viewing area, so I am not specifically after a fog of war, I just want to work out how to basically define the area to be rendered by where the particles are.

0 Replies

· Add your reply
  • Sort: 

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

27 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 avatar image avatar image avatar image avatar image

Related Questions

How to hide anamorphic lens flare when out of camera view and occluded? -1 Answers

Particles shrinking whenever camera gets too close? 1 Answer

2d Rain, moving with Camera 1 Answer

Shuriken won't render off camera bounds 0 Answers

Placing particle relative to character code 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