Announcement

Collapse
No announcement yet.

Extrude Texture intensity in Different masks

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

    #16
    Here is another idea and probably how I would approach this.

    Use more of a distance field approach. You can just blur your hard edges for now but you can use the photoshop layer style->stroke->gradient->shape burst method for nicer results.

    This method relies on the fact that you have gradients that are discrete for each layer, and separated by common border colors. Here there is a constant 0.5 separating the two fonts, and one is brighter one is darker. Made by simply duplicating the same layer and making one lighten and the other inverted and set darken. You could easily mask for either shape and get a nice soft mask.

    You could extend it to have more than 2 things obviously but you will have to expand the area around the additional shapes with a color that is inbetween them. This will work for any number of blends but at some point you will lose precision as there are only 256 values in an 8 bit texture.

    Click image for larger version

Name:	dftest.PNG
Views:	1
Size:	7.7 KB
ID:	1105415

    What this really does is create a discrete field around each shape, whereas in your original image, all shapes blend with 0 which means and blend with 1 is guaranteed to capture all values in between which gives the aliased edges.
    Ryan Brucks
    Principal Technical Artist, Epic Games

    Comment


      #17
      The distance field idea came to me too.

      But wouldn;t it be simpler to subtract 0.25, then clamp 0-1, then add 0.25 to get the 0.5 and 1.0 left alone then do the same for 0.5 to get just 1.0 on its own. You can do it the other way around as well and do some min/max tricks to isolate the one you want.
      Visual Effects Artist, Weta Digital, Wellington New Zealand
      BLOG www.danielelliott.co.uk
      @danielelliott3d https://twitter.com/danielelliott3d
      Unreal Engine and VFX Tutorials https://www.youtube.com/user/DokipenTechTutorials
      2015 Showreel: https://vimeo.com/116917817

      Comment


        #18
        Here is how I extract a gradient of a certain width from an edge like that. Lets call the texture sample red channel Tex.R.


        clamp ( abs(Tex.R - Location) / Width )

        By default this would make a mask that is black at Location and white after distance of 'width'. If you want the opposite, then you can do 1-x and it will be a white mask at Location. Or if you use it as a lerp mask skip the 1-x and just flip the A/B.
        Ryan Brucks
        Principal Technical Artist, Epic Games

        Comment


          #19
          I come from the following link with the same problem, in that case for a landscape, not for forniture.
          https://forums.unrealengine.com/show...-values-filter

          If helps , some weeks ago I tried playing with [ConstantBiasScale] in combination with the nodes [ceil] and [floor] but finally abandoned the idea because always finished with a dead-end.
          Click image for larger version

Name:	Select_Range_Gray.png
Views:	1
Size:	659.4 KB
ID:	1107765

          Comment


            #20
            clamp ( abs(Tex.R - Location) / Width )
            Mr.RyanB, ┬┐would you please helping me with that formula?
            I cannot reproduce it.
            Click image for larger version

Name:	Distance_Field_Gray.png
Views:	1
Size:	558.2 KB
ID:	1107768

            Comment

            Working...
            X