Announcement

Collapse
No announcement yet.

Cannot use OSL UVWtransform as VRayBitmap mapping source

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

  • Cannot use OSL UVWtransform as VRayBitmap mapping source

    VRay 5.20.23

    I'm probably doing something wrong here

    What I'm traying to do is to use the Vertex Color to rotate the bitmap. It works when used in uberbitmap OSL directly (as illustrated in the image below), but I can't "feed" the UVW transform via a VRayOSLTex into a VRayBitmap

    Should I use Vray6, or am I making somthing wrong here in my shader ?

    Click image for larger version

Name:	Screenshot 2023-07-25 124436.png
Views:	363
Size:	534.1 KB
ID:	1187050

    Philippe Steels
    Pixelab - Blog - Flickr

  • #2
    Hi, I'm not entirely sure if this could help in your case, but what if you use the Vertex color texture as a mask?
    Once you have this mask you can rotate, scale, and do whatever you want with the texture specified in the area of the mask. Here I'm attaching an example with 2 different textures, but it could be the same texture, only rotated. I'm specifically pointing to the red channel, which is used to create the mask.
    Attached Files

    Comment


    • #3
      Originally posted by dimitar_panayotov View Post
      Hi, I'm not entirely sure if this could help in your case, but what if you use the Vertex color texture as a mask?
      Thanks Dimitar for your help.

      The problem I need to solve is that I have the same texture that has to be rotated in 10+ directions within the same editable poly, and preferably without multisub obejct material (we do that at the moment and it leads to unnecessary bloated materials)

      You solution only works with 3 additionnal rotations / vertex paint channel

      My idea is (a bit janky) was to use the vertex color luminosity (value), multiply by 255 (my OSL mulitply node) since it's a float between 0 and 1 (if I understand correctly) and use that number as degrees to rotate the texture.

      Advantages are that you assign vertex color direcly in the editable poly, you have unlimited rotations/ texture up to 180° and you only have 1 texture node / texture.

      It actually works nicely, except I can't use VrayBitmaploader. Not a big deal but that lead to the question of the limitations of OSL with vray and since my knowledge of this stuff is quite limited, the help files confused me more than anything.
      Philippe Steels
      Pixelab - Blog - Flickr

      Comment


      • #4
        Did you try Stochastic tiling from the UVWRandomizer?
        Attached Files

        Comment


        • #5
          Originally posted by dimitar_panayotov View Post
          Did you try Stochastic tiling from the UVWRandomizer?
          Rotation values are to be precise (and entered manually) and not random. That's why using vertex color + UVW modifier works well
          Philippe Steels
          Pixelab - Blog - Flickr

          Comment


          • #6
            Can you send a scene with your setup? It would be nice to see what you have on your end. You can do that from our Support page. Please link this thread in your ticket.

            Comment

            Working...
            X