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 Casanova · Apr 05, 2012 at 10:32 PM · 2dlighting

2D Lantern Lighting Effects/Fog of War

REVISION: My understanding of the problem has gone up a bit, so hopefully I can direct this question a little better.

I'm looking for a general guideline on how to create a lantern light effect similar to what's used in Royal Envoy 2 (reference: http://youtu.be/WJZD6-OuREU). Initially I explored the Fog feature in the Render Settings, but the problem with this is that the fog applies to the entirety of the scene and I want to be able to lift portions of the fog by lighting lanterns in the scene.

The two best ways I can think of at the moment to approach this problem are:

1) Darken the scene's default lighting, assign point lights to lanterns and script in the appropriate functionality when other objects are lit.

2) Apply a material that emulates darkness/fog in front of the background, cut out appropriate portions of the material whenever a lantern is set to be lit.

The project I'm working on to incorporate this is similar in nature to Royal Envoy 2; most specifically, it's in 2D. Would either (or both) of these methods work? And if so, how would I go about doing them?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by fafase · Apr 05, 2012 at 11:36 PM

Well not so sure what you want but there is a fog tool

http://unity3d.com/support/documentation/Components/class-RenderSettings.html and

http://unity3d.com/support/documentation/ScriptReference/RenderSettings.html

and you can control it by script of course

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 Casanova · Apr 09, 2012 at 03:18 PM 0
Share

Awesome, this is definitely a step in the right direction. $$anonymous$$y big question, then, is say I use this to create a layer of fog over a 2D scene. If I were to do something like lighting a lantern in the scene, how would I be able to essentially hide the part of the fog that the lantern is lighting? Is this something that lighting effects can accomplish on their own, or is it something I have to script? And if I have to script it, what would be a good starting point?

I have only a couple months of solid experience with Unity and this is kind of a new thing with me, so bear with me. :\

avatar image fafase · Apr 09, 2012 at 06:57 PM 0
Share

Unfortunately. after looking around I don' think this is possible with fog. This is more for real fog effect like getting the background fading away...

BUT!!! You could try to use particle ins$$anonymous$$d. Those you can place them where you want. You make them real slow, and only where you need them. You can use this http://answers.unity3d.com/questions/10596/how-do-i-make-a-good-smoke-particle-effect.html and start tweaking value and see the result. Remember to keep thme slow so that they don't go flying away like real smoke.

avatar image Casanova · Apr 09, 2012 at 07:21 PM 0
Share

Excellent, I'll give it a shot and keep things posted as to how well it works. Thanks.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Extrange Behaviour with 2D Lights in Universal RP 0 Answers

Is it possible to use soft shadows in 2D using URP? 1 Answer

2D and 3D lights in a scene. URP,2D and 3D lights in scene URP 1 Answer

Modify 2D Point Light Distance in runtime? 1 Answer

How can I use a depth mask shader to have a 'shine through' effect? 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