Announcement

Collapse
No announcement yet.

Question about DistanceTex

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

  • Question about DistanceTex

    I am currently wondering if there is a way to modify the distance blend inside the texture via a falloff map or curve? I have a few hundred objects scattered in different shapes and sizes on multiple spherical surface and I want to blend the materials based on how far they're away from that surface. The distancetex already works very well for what I want to achieve but I'd still like to tweak the linear distance blend. I already tried placing it in a collercorrect map to tweak the contrast but that only gets me so far.

    Any help would be appreciated!
    Cheers,
    Oliver

    https://www.artstation.com/mokiki

  • #2
    You can put it in a gradient ramp perhaps? As the gradient input.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Hmm the problem with this method would be that I have to rely on the objects UV Coordinates, which would be a problem given the different rotations and sizes.
      Cheers,
      Oliver

      https://www.artstation.com/mokiki

      Comment


      • #4
        unless i misunderstood, there is no use of UV mapping involved in using gradient ramp in "Mapped" mode. you just plug the distance tex into the map input of the gradient ramp.. then the gradient ramp becomes a 2d representation of your near/far gradient in the distance tex. so you can get it to do all manner of funky things.

        Comment


        • #5
          Oh wow. I had no idea this was an option inside the gradient map. I completely misunderstood what Vlado meant.
          Thanks Vlado for bringing it up and thank you super gnu for the explanation!
          Cheers,
          Oliver

          https://www.artstation.com/mokiki

          Comment


          • #6
            I guess you could also just put the VRayDistanceTex in an Output map and use the color map curves in there.

            Comment


            • #7
              Yep, it's the handiest way of toughening up the result of a dirt map too - just nest it into a colour correct and use those curves to give it more contrast.

              Comment


              • #8
                Originally posted by ralphr View Post
                Oh wow. I had no idea this was an option inside the gradient map. I completely misunderstood what Vlado meant.
                Thanks Vlado for bringing it up and thank you super gnu for the explanation!
                yes the mapped mode of gradient ramp is extremely powerful. you can remap the gradient to any b/w gradient produced by any other texture.

                Comment


                • #9
                  Originally posted by joconnell View Post
                  Yep, it's the handiest way of toughening up the result of a dirt map too - just nest it into a colour correct and use those curves to give it more contrast.
                  Hey JConnell... Do you mean use the output curves in a Color Correct? This is cool if you need the Color Correct as well, but if all you want is the curves have you tried an Output map? This guy basically gives you those output curves (from the output rollout) as a separate node.

                  I have learned to never set curves inside the output rollout settings of Bitmap Or VRayHDRI nodes themselves. Instead I use a second Output map node to do this. That way when you later find you need the same image with some other tweaks to the output curve, or without the output curve at all, you can just take the output form the original Bitmap or VRayHDRI. Otherwise you end up having to duplicate the Bitmap or VRayHDRI. While VRayHDRI is smart enough to only load the image once Bitmap will load a new copy of the image for each node.

                  Comment


                  • #10
                    Yep, only the output map itself - colour correct seems to do horrid things. As you say its great having the original map instanced with the possibility of layering on variation afterwards, especially for generic breakup maps that you use multiple times at different settings in the scene - I'm going to look at using bercon mapping more often too to add in more random offsets and what not.

                    Comment


                    • #11
                      I use Color Correct mainly just for (in the advanced settings) gamma and gain. Sometimes I tweak saturation too.

                      I did some tests a long time ago (some thread on CgTalk, but I don't know where) and determined that Color Correction actually needs a gamma of 2.2 before it and a gamma of 1/2.2 = 0.454 after it in order for "Contrast" to work correctly. It is incorrectly applying the contrast to the image that it has internally already applied a gamma of 0.454 to (for linear workflow). These gamma adjustments can be done with two additional Color Correction nodes set to advanced.

                      I seem to recall there may be some other legacy nodes that also need this gamma tweak as they are designed to work in 2.2 gamma space, not linear space.

                      Of course, the curves in the Output node gives you more control over things like contrast anyway. I just spent a little while reverse engineering it a couple years ago.
                      Last edited by Joelaff; 12-05-2016, 08:44 AM.

                      Comment


                      • #12
                        I totally don't use Bercon enough. I had some crashing issues early on that I got out of the habit of reaching for it. It seems to have been pretty stable lately, though.

                        Comment


                        • #13
                          I got a crash today trying to set the position of a flag in bercon gradient by typing a number, some great bits in there though!

                          Comment


                          • #14
                            Originally posted by Joelaff View Post
                            Color Correction actually needs a gamma of 2.2 before it and a gamma of 1/2.2 = 0.454 after it in order for "Contrast" to work correctly. It is incorrectly apply the contrast to the image that it has internally already applied a gamma of 0.454 to (for linear workflow).
                            Can you tell me why that is? We had a huge debate internally about the contrast function of the VFB and whether it should be applied to the original linear colors, or to the sRGB colors. I have no idea which is the correct approach - currently it's applied to the original linear colors which preserves the 0.5 linear level, but someone suggested it should preserve the 0.5 level after sRGB mapping.

                            Best regards,
                            Vlado
                            I only act like I know everything, Rogers.

                            Comment


                            • #15
                              Hey Vlado... The correctness of this is mainly my opinion...

                              However, let's just say applying the contrast in 2.2 space seems more predictable to the user. It acts like a contrast control in Photoshop (which I don't think I've touched since version 1.0 of Photoshop, since curves or levels are usually what I want anyway).

                              Honestly, I have not tried the contrast control in the VFB, as I just eschew brightness and contrast in favor of curves or levels.

                              So I really don't know what is correct, but I prefer to make all my adjustments with controls based upon 2.2 space. Even Curves or levels-- I would rather the midpoint of the curve be in 2.2 space. This is mainly because curves in linear space get difficult to adjust for general corrections, such as increasing or decreasing contrast, because they are so biased to one side.

                              My research into the Color Corrector node came about because somebody on CGTalk was saying how contrast destroyed their image. I just set to figure out why this was happening. Then I proceeded to still use an Output node with curves

                              Comment

                              Working...
                              X