Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 isnotinvain · Apr 05, 2016 at 05:39 AM · particleseffectsgradientvolumetric

How to make a volumetric gradient / fog / haze

Hello!

I am trying to come up with a way to visualize the gravitational forces in an n-body simulation. Basically, I want the player to be able to see where there are stronger gravitational forces.

I was thinking of doing something like a volumetric haze that gets stronger where the gravity is strongest, sort of like colored fog. Something like this image: http://www2.sjs.org/raulston/mvc.10/Topic.2.Lab.2_files/image139.gif except instead of arrows, a smooth fog with gradient coloring nebula effect, eg something like the effect in these two assets: https://www.assetstore.unity3d.com/en/#!/content/11707 and https://www.assetstore.unity3d.com/en/#!/content/40016

I would give those assets a try, but I actually want a gradient and not a solid color, and the "shape" of the fog is not going to really fit a primitive like a cube or sphere very well.

One idea I'm considering is a particle effect where I programmatically place all the particles in a 3d grid and adjust each particle's color individually. I think that will work, but it'll probably be a lot of particles, which is why these fog-like shaders seem like an interesting way to go.

Thanks in advance for any tips or ideas! Alex

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 isnotinvain · Apr 05, 2016 at 07:46 AM

I was able to come up with something that demonstrates what I'm going for: alt text

I did this by creating a 3D grid of particles, and setting their alpha to a value reflecting the local gravity at each point in the grid. While this sort of works, it doesn't really look "quite right" because I'm sort of cheating the volumetric-fog effect with particles instead of using some kind of shader that actually does volumetric fog. So I'd still be interested in any ideas on how to make this sort of 'volumetric' fog effect in an arbitrary shape (ideally based on a grid of intensity values).


screen-shot-2016-04-05-at-122346-am.png (210.5 kB)
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 rukukuku · May 09 at 02:22 PM 0
Share

Did you solved it?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Elementes like in "from dust" 1 Answer

Lerp an Alpha Gradient in Particle System Color over lifetime In script 0 Answers

Particle/Line renderer sword slash effect 1 Answer

Scaling the whole Shuriken effects? 1 Answer

Is there a way to create a complete circle made of particle ribbon trails ? 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