Announcement

Collapse
No announcement yet.

Is this possible

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

    #76
    For the banding, do you also get this same effect if you make a long object and give it a zheight based gradient that lerps between 2 color values?

    It might be some floatingpoint inaccuracies, how big is the scene actually, 1:1 scale or is it actually scaled down a lot compared to 1unit = 1cm?
    Another thing to check is any display/gpu settings, are you rendering 32bit or 16bit color to your monitor?

    Comment


      #77
      Setting my material to before tonemapping solved it

      Thanks Arnage and MissStabby

      Comment


        #78
        I'm not exactly sure where the distance factor should be added, as an alpha for the Turbidity Diffusion's lerp, correct?

        Comment


          #79
          This seems to work, might not be the right way to do it

          Click image for larger version

Name:	Distance.jpg
Views:	1
Size:	351.3 KB
ID:	1072153

          Comment


            #80
            Here are some of my results with the above distance factor added, the falloff curve seems to be a little to steep but this is something i still don't fully understand mathematically yet

            Click image for larger version

Name:	1.jpg
Views:	1
Size:	303.7 KB
ID:	1072160

            Click image for larger version

Name:	2.jpg
Views:	1
Size:	312.1 KB
ID:	1072161

            Click image for larger version

Name:	3.jpg
Views:	1
Size:	326.7 KB
ID:	1072162

            Comment


              #81
              That works, the only thing I would recommend is using an exponential falloff instead of a linear one. I adjusted it to this:

              Click image for larger version

Name:	DistanceBlending.png
Views:	1
Size:	150.5 KB
ID:	1072166

              Note that I also inverted both the top/bottom and distance effects. As this allowed me to replace the lerps with multiplications. Not really necessary, but it works a little more intuitive.

              Edit: We seem to have posted at the same time. That too steep falloff you mention is probably caused by the linear falloff I mentioned here so I may have answered your question before reading it :P
              Last edited by Arnage; 04-08-2015, 04:53 PM.

              Comment


                #82
                Btw. the easiest way (at least for me) to better understand the math of a shader is to not only look at the effects in the viewport. It's math, so just throw it at a graphic calculator or wolfram alpha and it becomes a lot easier to understand what is happening.

                As an example, here's a plot of that linear falloff compared to an exponential one:



                This directly shows why a linear falloff causes a harsher transition.

                Comment


                  #83
                  Thank you for the explanation

                  I have increased the Distance Factor of the Turbidity Diffusion, my ocean is really deep and it turned dark too quickly, it now matches the depth of my ocean pretty well, this is not real life accuracy but it looks right for my scene

                  Click image for larger version

Name:	turbidity.jpg
Views:	1
Size:	177.0 KB
ID:	1072169

                  However increasing the Distance Factor caused the effect to be scaled out of proportions, when looking down, the diffusion radius is too small for its distance now, it appears very narrow

                  Click image for larger version

Name:	Bottom.jpg
Views:	1
Size:	123.6 KB
ID:	1072170
                  Last edited by KhenaB; 04-09-2015, 02:51 AM.

                  Comment


                    #84
                    Also the exponential falloff made an amazing difference

                    Comment


                      #85
                      Originally posted by KhenaB View Post
                      However increasing the Distance Factor caused the effect to be scaled out of proportions, when looking down, the diffusion radius is too small for its distance now, it appears very narrow
                      That is probably related to the linear relationship between intensity and the Z axis in the top/bottom effect. Changing this to something less linear should improve it.

                      I guess the main take away in all this is: real life is almost never linear

                      Comment


                        #86
                        Arnage,

                        A quick question regarding the light absorption effect

                        To get good results i have to set the effect to "before tonemapping", setting it to "before transparency" isn't properly blending with the translucent objects in my scene, but i want my helmet glass reflections to be drawn over everything in my scene

                        Is it possible to draw the reflections of my helmet glass over the post process effect while keeping the post process material set to "before tonemapping"? Even with a high priority sorting the post process is always drawn above translucency

                        Thanks

                        Comment


                          #87
                          You have to manually apply the separate translucency in the post process, for example like this:

                          Click image for larger version

Name:	PostProcessSeparateTranslucency.jpg
Views:	1
Size:	179.0 KB
ID:	1075033

                          Comment


                            #88
                            That worked perfectly, thank you so much

                            Comment


                              #89
                              I was thinking about adding even more details to the scene, and crepuscular or god rays would be an amazing addition, and since you have already implemented light absorption, wouldn't it be possible to use that to make some low cost god rays?

                              I don't fully understand how water and light interact with each other, but i assume that god rays are there because of the wavy water surface, making light penetrate unevenly?

                              I'll try to find some papers on that subject and see if i can come up with something

                              Comment


                                #90
                                Arnage,

                                Concerning adding the separate translucency manually, i have noticed that it gives me the same results as setting the material to "before translucency"

                                It makes my translucent helmet glass render over the PP effect but all the other objects in my scene too, some of them needs to be rendered below the PP effect

                                Could it be that i missed something?

                                For example, with your trick my helmet is now fine, but the diving water surface isn't affected by the fog anymore

                                With separate translucency:

                                Click image for larger version

Name:	2.jpg
Views:	1
Size:	177.1 KB
ID:	1075068

                                Without separate translucency:

                                Click image for larger version

Name:	1.jpg
Views:	1
Size:	164.5 KB
ID:	1075069

                                Thanks

                                Comment

                                Working...
                                X