Announcement

Collapse
No announcement yet.

Planetary atmosphere shader

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

    Planetary atmosphere shader

    How can I achieve this effect in blueprints?

    https://www.shadertoy.com/view/lslXDr

    Ideally I would like to co-op the existing atmospheric shader in UE but I only see the atmospheric fog and it doesn't show anything when I apply it to a mesh.

    #2
    You can create a distortion effect with world vector transform refraction.
    reference
    http://dirty-windows.de

    my blog
    http://ulrichthuemmler.blogspot.com/

    Comment


      #3
      or you can simply watch this
      http://eat3d.com/free/ue4-shader-fx-vertex-color-baking
      it is almost the same and more..^^

      Comment


        #4
        Give me a few minutes and I will get something up for you.
        Portfolio
        UE3 - Advanced FX Masterclass Part 1 DVD
        UE3 - Advanced FX Masterclass Part 2 DVD

        Comment


          #5
          So I looked at the behavior in the link you posted and built my own version using just the math nodes. (Trying to stay away from any code whatsoever).
          Hope you enjoy it

          The eclipse parameters work in world space, so they will need to be hooked up to your blueprint to work with your views.
          P.S. - All parameters and values may be changed to achieve different atmosphere colors, falloff, power, influence, shadow blend, and more.

          Click image for larger version

Name:	AtmosphereBreakdown01.jpg
Views:	1
Size:	119.4 KB
ID:	1051978

          Click image for larger version

Name:	AtmosphereBreakdown03.jpg
Views:	1
Size:	564.7 KB
ID:	1051982
          Attached Files
          Last edited by JBaldwin; 06-16-2014, 02:37 AM.
          Portfolio
          UE3 - Advanced FX Masterclass Part 1 DVD
          UE3 - Advanced FX Masterclass Part 2 DVD

          Comment


            #6
            Originally posted by JBaldwin View Post
            So I looked at the behavior in the link you posted and built my own version using just the math nodes. (Trying to stay away from any code whatsoever).
            Hope you enjoy it

            The eclipse parameters work in world space, so they will need to be hooked up to your blueprint to work with your views.
            P.S. - All parameters and values may be changed to achieve different atmosphere colors, falloff, power, influence, shadow blend, and more.

            [ATTACH=CONFIG]5239[/ATTACH]

            [ATTACH=CONFIG]5244[/ATTACH]
            I think I just fell in love with you. I needed this, thanks!
            Easy weapons in Unreal Engine 4:
            Check out Realistic Blueprint Weapons

            Currently doing a tutorial series on Vectors and what they are good for.
            Please visit Unreal Unscripted

            Comment


              #7
              Originally posted by JBaldwin View Post
              So I looked at the behavior in the link you posted and built my own version using just the math nodes. (Trying to stay away from any code whatsoever).
              Hope you enjoy it

              The eclipse parameters work in world space, so they will need to be hooked up to your blueprint to work with your views.
              P.S. - All parameters and values may be changed to achieve different atmosphere colors, falloff, power, influence, shadow blend, and more.

              [ATTACH=CONFIG]5239[/ATTACH]

              [ATTACH=CONFIG]5244[/ATTACH]

              JBaldwin strikes again lol . I also needed this. Thanks a million for the great community support .

              Comment


                #8
                No problem
                Glad you are finding it useful.
                Portfolio
                UE3 - Advanced FX Masterclass Part 1 DVD
                UE3 - Advanced FX Masterclass Part 2 DVD

                Comment


                  #9
                  Now we just need a multi-scattering solution for when the camera is inside the atmosphere :P

                  Awesome work.
                  Storyteller - An immersive VR audiobook player

                  Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                  Comment


                    #10
                    @n00854180t - You mean like height fog? o.o Cause that is a good solution (Unless you want to create a planet where you can enter and leave the atmosphere).
                    Portfolio
                    UE3 - Advanced FX Masterclass Part 1 DVD
                    UE3 - Advanced FX Masterclass Part 2 DVD

                    Comment


                      #11
                      Originally posted by n00854180t View Post
                      Now we just need a multi-scattering solution for when the camera is inside the atmosphere :P

                      Awesome work.
                      Wouldn't it work if you increased the multiplier for atmospheric fog depending on your distance to the surface of the planet?

                      Btw, thanks a lot Jeremy!
                      FREE Lightshow
                      FREE VR Drum Kit Project

                      FREE Color LUT Collection
                      FREE Physics Driven Spacecraft Project
                      FREE GTA Style Vehicle Interaction
                      Dynamic DoF(Depth of Field)
                      Camera Crossfade

                      Comment


                        #12
                        Originally posted by JBaldwin View Post
                        @n00854180t - You mean like height fog? o.o Cause that is a good solution (Unless you want to create a planet where you can enter and leave the atmosphere).
                        Yeah I meant for the case where you are inside the atmosphere standing on the surface.

                        Originally posted by Jacky View Post
                        Wouldn't it work if you increased the multiplier for atmospheric fog depending on your distance to the surface of the planet?

                        Btw, thanks a lot Jeremy!
                        I'd have to look into the whole thing again, but when I implemented a scattering sky the last time, it seemed like there were some differences between the calculations for in-atmosphere vs out-of-atmosphere which were more than just the camera position/view vector.
                        Storyteller - An immersive VR audiobook player

                        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                        Comment


                          #13
                          @Jacky - Anytime
                          Portfolio
                          UE3 - Advanced FX Masterclass Part 1 DVD
                          UE3 - Advanced FX Masterclass Part 2 DVD

                          Comment


                            #14
                            You guys may find this useful. There should be a material function in engine called SphereGradient-3D. it has a Boolean to do extra math checks for when the camera is inside of the sphere. I am sure it would take some minor fiddling to make it work with JBaldwin's eclipse (very nifty by the way sir!).

                            It is based off standard sphere-camera intersection math. I sometimes use it combined with the ExpentialDensity material function which gives a nice natural looking fog sphere.
                            Ryan Brucks
                            Principal Technical Artist, Epic Games

                            Comment


                              #15
                              @RyanB - Very interesting! I will have to fiddle with that and see what I can come up with
                              Portfolio
                              UE3 - Advanced FX Masterclass Part 1 DVD
                              UE3 - Advanced FX Masterclass Part 2 DVD

                              Comment

                              Working...
                              X