Announcement

Collapse
No announcement yet.

Particle interaction with fog

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Yeah, this is being used in a wildly dynamic setting. I'll have to look and figure out what works out best for me. Thanks for the invaluable info!

    Leave a comment:


  • replied
    Originally posted by Mireneye View Post
    I found the node, I've started making and testing. I'm stuck at how to combine it with particle color and emissive color to get the appropriate color. But that should be down to tinkering. Any advice on my way? Otherwise I'm off to happily tinker =)
    A really quick and dirty method would be to try lerping between the atmospheric fog color node and your code, based on distance away from the camera. In your distance calculations, divide the distance by the max distance that you set. Clamp it to 0/0.75ish. The reason why I'm saying 0.75ish is because you should always have some original color left in the mix. Anyways, this will give you a percentage to work with for your lerp. So your inputs would be your atmospheric fog color and your own color, the alpha would be the distance math. It should work, but keep in mind that the atmospheric fog color node eats up a TON of extra instructions because it's essentially recalculating the fog at each pixel.

    You'd probably be better off using your own custom exponential falloff that mimics the fog falloff. You might need a material parameter collection to pipe in the fog colors, if you're planning on using the effect in a variety of fog settings.

    EDIT: After testing this out for myself, I've noticed that there seems to be some issues with the atmospheric fog color node. Perhaps it doesn't work with exponential height fog or something or maybe it's something wrong on my end. You're probably better off doing the latter that I said with the exponential density node. Just use pixel depth or the distance between absolute world position and camera position, divide that and clamp that to the 0.75 I mentioned earlier. You'll want to use the material parameter collection for any fog information that you might need like color, distance, density, etc.
    Last edited by IronicParadox; 10-06-2018, 06:43 PM.

    Leave a comment:


  • replied
    I found the node, I've started making and testing. I'm stuck at how to combine it with particle color and emissive color to get the appropriate color. But that should be down to tinkering. Any advice on my way? Otherwise I'm off to happily tinker =)

    Leave a comment:


  • replied
    Fog is applied as a post process that needs depth information to work, so it's applied before translucent stuff. There are material nodes that calculate fog at the specified world position which you can use in your particle materials so they can apply fog to themselves.

    Leave a comment:


  • replied
    The simplest solution (maybe not the best) would be implementing your own fog in the material of this particle effect. It should be relatively easy for this case with using ExponentialDensity node.

    Leave a comment:


  • started a topic Particle interaction with fog

    Particle interaction with fog

    While doing some testing, I've ran into this issue.
    I tried every setting I could find to make fog play nicely with these particle effects. I have and need to have height fog/atmospheric fog, preferrably with Volumetrics enabled. I've ticked the per pixel and apply fogging settings in the material. It's transluscent.

    I pondered moving over to a volumetric material instead for the clouds but those don't seem to play well with having individual control over color over many different types of clouds.

    Or am I just missing something obvious?
Working...
X