Announcement

Collapse
No announcement yet.

possible for user attribute to drive the offset of image sequence

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

  • possible for user attribute to drive the offset of image sequence

    Hi,
    Is it possible to have a user attribute of an object drive the offset of an image sequence on a texture?
    This way I could have one shader on multiple objects and each object will have each own offset in the image sequence in the texture.
    thanks,
    Arjan

  • #2
    Yes I think this might work.

    What you need to do is have a sequence like this tex.####.ext

    On each object you must add a user string and put a number there. For example in my test 1001, 1002. In file node specify file name but replace tex.1001.jpg to tex.<attrName>.jpg (where attrName is your shape user attr name)Then for each of your textures you should get different maps loaded.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      Hi Dmitry,
      Thanks for your reply.
      Is it possible to use this technique with an animated image sequence? So that every object has the animated sequence as a texture, but with a different offset in time.

      Comment


      • #4
        I don't think so. The offset is not controlled by the renderer which is where the user attribute comes in. I'll ask a friend he might know.
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          That is too bad. It would be great if you could add a time variable to the string. Like image_<attrName + frame>.exr
          Something like that wouldn't be possible right?

          Comment


          • #6
            I don't think its impossible, but it would have to be done as expression not as render attribute.
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #7
              Do you mean like a Post Translate Phyton Script or a maya expression?

              Comment


              • #8
                Could there maybe another solution for this?
                I have a large scene, where I want to have about 300 explosions occur a different times. To avoid having 300 shading networks I wanted to use the vray custom attribute to drive the offset in time of each explosion.
                I found out that the custom attribute node doesn't work with the time offset of a image sequence.
                I tried some different things like using a particle system with sprites for the explosions, but Vray doesn't seem to support the spriteNumPPP.
                Then I made one image containing the whole image sequence in a grid (like a sprite sheet in games). I used the custom attribute in combination with the time node to build a network that looped through the grid. But I couldn't get it to work in the render.
                The last thing I tried could be the best solution. I animated the uv of a Polyplane to match each frame of the image sequence in the the grid.
                Then I exported that as a proxy, so I only have to set the start frame of each proxy for every explosion. This way I can use 1 shading network for all the explosions.
                It would be ideal to have the custom attribute to drive the start frame of the proxy, so I could instance the proxy for each explosion and only use one proxy node and one shading network.
                I tried to connect the output of a custom color node to the start of the proxy node, but it didn't work. Could there be another way to have instances of a proxy and have each instance his own start frame?

                Comment


                • #9
                  I think you can add a dynamic string or float attribute to the mesh(es), and animate that (maybe with an expression) to go through all the frames of a sequence, then use can use the name of the attribute as a tag in the file name. The dynamic attribute must have be named vrayUserScalar_tagName or vrayUserString_tagName - then you can use <tagName> in the bitmap file name.

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

                  Comment


                  • #10
                    Thank you Vlado, that seems to be the best solution. I didn't expect that 300 simple expressions didn't slow the scene.

                    Comment

                    Working...
                    X