blink_fog_3d v1.8


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Owen Bulka
A BlinkScript Gizmo to create 3D/4D noise that can be used as fog.
Requirements:
14.0, 13.2, 13.1, 13.0, 12.2, 12.1, 12.0, 11.3, 11 or later
Linux, Mac, Windows
28 Jun 2024
922

Blink Fog 3D

blink_fog_3d is a tool for rendering 4d noise through a render camera with lots of additional user options to change the look and feel of the noise. The advantage of this blinkscript versus traditional 3d noise setups is the noise is rendered entirely in blinkscript and doesn't require the user to place a box or cards of noise in the scene. The node has a built in depth ramp so you can choose what depth from the camera the noise is visible and choose how the noise falls off as it gets closer to the camera (useful for making fast moving wispies). The 4d aspect of the noise allows you to animate the seed of the noise without having a visible direction to the noise (xyz) which can be used to make the noise look like smoke or steam. A depth input can also be used to apply holdouts to the noise for use as a procedural fog generator. Note that there is an 'invert depth' checkbox to use 1/z. The samples per ray knob is the general quality slider, the more samples you provide, the less noise you get but the slower the node becomes. The node is pretty fast if you have a fast gpu and a $GUI expression can be used on the samples per ray knob to make it more responsive locally.

Thank you to Eliot Eshelman for the 4D Perlin simplex noise function (https://github.com/BogdanDenis/OpenGL/blob/master/simplexnoise.cpp), as well as Mads Hagbarth for a reference conversion.

Usage 

You can add the `src/python` directory to your `NUKE_PATH` to add the gizmo to your node menu or simply open the example file to find the group node.

New in Version 1.8
  • added optional exponential falloff to sphere, box, and plane ramps
New in Version 1.7
  • a new 'spherical ramp' allows you to create a spherical ramp for the noise
  • a new 'box ramp' allows you to create a box of noise
New in Version 1.6
  • the 'y ramp' is now a 'planar ramp'
    • this allows you to orient the noise along any axis
    • you can translate the plane of noise
New in Version 1.5
  • a new 'y ramp' knob allows you to vary the noise density along the y-axis in worldspace
New in Version 1.4
  • this is a patch release v1.3.1 that fixes a bug with the deep (proxy) mode not switching to the correct kernel
    • Nukepedia does not let me version up to 1.3.1 :(
New in Version 1.3
  • Deep support!
    • Use the 'deep_holdout' input along with the following to work with deep data
      • Use the 'holdout mode' 'deep (proxy)' for fast deep that will work for most scenarios, but can have artifacts
      • Use the 'holdout mode' 'deep (full)' for slower but completely accurate deep
      • Use the 'output deep' checkbox to output deep data without holdouts
  • Overscan
    • Use the 'overscan' knob to specify any overscan
MIT License Copyright (c) 2024 Owen Bulka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please login in order to download these files.

Comments   

 
+1 # Jorge M 2024-05-31 17:03
This is tool is sick !!

I´ll will push this to the limit with your new Deep support !

Big thanks Owen !
 
 
0 # Jorge M 2024-05-31 19:07
Quick question ! is there a way to not just to have a depth ramp but also a ramp in Y ?
 
 
0 # Owen Bulka 2024-05-31 22:03
Hi Jorge! Glad you like it!

A ramp in the y direction in screen-space? What would you be ramping? The depth? Or just the final value? You could just multiply by a ramp if its to ramp the value, but if you want to vary the depth it should work to pass a ramp in as the holdout input. If the input ramps from the deepest depth value you want to use, to the shallowest depth value, I think that would achieve what you're looking for. You can also supply an alpha on the holdouts if you want to ramp the transparency.

Also worth noting that if the holdouts don't seem to be working correctly there is an 'invert_depth' checkbox for when the depth is provided as 1/z.
 
 
0 # Jacob Slutsky 2024-06-17 20:12
Hi Owen,
This tool is fantastic. Thanks for providing it for the community at large!
I have the same question as Jorge.
We often try to craft fog/atmosphere so that it's thicker near the ground and fades off in the global "3D" y-direction. Sometimes this does align with screenspace..bu t other times it doesn't since the camera might be at an angle to the ground or tilted to the sky etc.
Thanks!
-Jake
 
 
0 # Owen Bulka 2024-06-17 23:03
Hi Jacob,

Thanks for that info - that makes a lot more sense, I can look into adding some 3D bounds to the noise later this week.

Best,
Owen
 
 
0 # Owen Bulka 2024-06-19 05:03
Hi Jorge and Jacob.

The latest version now contains a second ramp that allows you to vary the noise along the y-axis. Hopefully that achieves what you're looking for. Please let me know if you have any questions!

Thanks,
Owen
 
 
0 # Jacob Slutsky 2024-06-25 21:53
Much appreciated Owen. The Y ramp on the new version is working very nicely!
-Jake
 

You have no rights to post comments

We have 2850 guests and 77 members online