Announcement

Collapse
No announcement yet.

Bitmap distort by color input

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

  • Bitmap distort by color input

    I've been trying to figure out a way to distort a texture by, or assign UVW coordinates according to a colored map. This would be similar to how you can choose vertex color for your mapping coordinates already, unfortunately we can't choose an actual map. Baking the map to vertex colors doesn't work that well as it would require a very dense mesh, prone to a lot of distortion from the interpolation between vertices, and also isn't easily animated. Another example is how RE:Map UV plugin works in After Effects by applying a texture using an exported UV map bitmap from a 3D application, what I'm looking for is the reverse. Attached is a very simplified simulation of what I'm trying to achieve. Binary Alchemy long ago had a Mental Ray shader that would do this, the red input warps the U coordinate, green warps V.

    Is this something that can be added to the VRayHDRI in the Mapping type? Or maybe another map that would convert the mapping where you could plug in any texture that relies on UV's and it would warp it appropriately?

  • #2
    Hi, ah yeah I really missed this feature in max, so I made a shader allows you to do that. At least if I understand your post correctly. Have a look at the following link:
    http://www.rensheeren.com/blog/osl-uvtransform/
    Thread with other shaders as well:
    https://forums.chaosgroup.com/forum/...r-your-perusal
    Rens Heeren
    Generalist
    WEBSITE - IMDB - LINKEDIN - OSL SHADERS

    Comment


    • #3
      DUDE! That worked flawlessly! I'll need to do some more testing with it to make sure it'll work with displacements, opacity masks, etc, but so far this is it. The only issue I had, and was totally my fault, was I started with a VRayOSLMtl, and nothing would render. Took me a few minutes to realize that there was a VRayOSLTex to embed in the material. ;D

      Not sure why this isn't included with max by default, this is so useful when needed.

      Comment


      • #4
        Two downsides to the OSL shader. Doesn't show in the viewport, which is not too big of a deal. But speed wise, it seems to be very slow to render. Especially when you have it used several times (bump, diffuse, opacity, etc), and especially when as displacement. It'll do the job but I'll have to use it sparingly.

        Edit: Also doesn't work with VRayBlendMtl if used more than once as a mask. :/
        Last edited by Badbullet; 21-08-2017, 03:25 PM.

        Comment


        • #5
          It's not terribly difficult to code this; will see what can be done about it.

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

          Comment


          • #6
            Originally posted by vlado View Post
            It's not terribly difficult to code this; will see what can be done about it.

            Best regards,
            Vlado
            Thanks !
            It would be really useful !
            (Sorry for my bad english)

            Comment


            • #7
              Thanks Vlado, it would be a great addition if you get it in. I'll keep using Rens' OSL shader until then, as it'll help me test how far I can test this workflow setup that I've had in my head for awhile now for a specific project. Thanks Rens for making that.

              Comment


              • #8
                You're welcome! Glad it's working, though sorry to hear it's a bit slow. : D
                And yes, UV replacement/transform would be great to have natively in VRay!
                Rens Heeren
                Generalist
                WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                Comment


                • #9
                  Originally posted by vlado View Post
                  It's not terribly difficult to code this; will see what can be done about it.

                  Best regards,
                  Vlado
                  Any update on this?
                  http://henrikbclausen.com

                  Comment

                  Working...
                  X