Announcement

Collapse
No announcement yet.

Materials - image location relative paths, not absoulte for working whith Google drive

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

  • Materials - image location relative paths, not absoulte for working whith Google drive

    I work remotely from my laptop on some days, so opening up a project on my home PC (using Google workspace) is a major headache - all the images are searching for file paths on my work server, so I have to repath. And then do it again when I go back into the office.

    This would save an incredible amount of frustration and seems like such a no-brainer. AutoCAD does relative paths, but why can't Vray do relative paths?

    (FYI, using 'Pack Project' is just as time consuming. Many people on my team are adding and changing materials throughout the day, and these people are in multiple locations - office or home. This means I would have to Pack Project multiple times a day, this is highly inconvenient and cumbersome).

  • #2
    Hi javier_beln​,

    Can you share an example of what your paths look like on the different systems and a more detailed description of how you imagine the relative paths working?
    V-Ray does resolve relative paths even now but only if they are relative to the model location.
    If a file is somewhere else on the file system or the network we have or allow setting the base location that the file is relative to.

    Regards,
    Konstantin

    Comment


    • #3
      Hi konstantin_chaos

      I have the Google drive desktop program in my home PC. There is located all my data (archives, images, textures, etc) I use for working. It's linked whith the network so I have acces from everywhere I go.

      The archive path on my home PC is: C:\Users\Chema\Desktop\NEW VIEW\2. PROYECTOS\PRUEBA\Prueba.skp.
      The material librarie path on my home PC is in: C:\Users\Chema\Desktop\NEW VIEW\3. BIBLIOTECA 3D\TEXTURAS\VRAY\PBR MATERIALS\CONCRETE\4k-concrete 6

      The issue is that when I acces from my laptop the archive root is diferent:
      X:\Googledrive\Otros ordenadores\Sobremesa\NEW VIEW\2. PROYECTOS\PRUEBA\Prueba.skp.
      As well as the material path location that is located in:
      X:\Googledrive\Otros ordenadores\Sobremesa\NEW VIEW\3. BIBLIOTECA 3D\TEXTURAS\VRAY\PBR MATERIALS\CONCRETE\4k-concrete 6.

      The thing is that if Vray had a relative path it just had to go backwards to the "NEW VIEW" folder and then forward searching for the file -at least this is how it works in AutoCAD-, whithout taking in acount the absolute location of my home PC -C:\Users\Chema\Desktop\...-

      Let me know if you need any other information

      Thank you​

      Comment


      • #4
        Hi konstantin_chaos​, do you have any insight into this issue?

        Comment


        • #5
          OK, if I understand correctly you would like V-Ray to search relative to the .skp but in both directions.
          I'm not sure I've seen a program that does that (haven't used AutoCAD).
          Is this automatic in AutoCAD or do you have to specify a list of search paths somewhere?

          Comment


          • #6
            Hi,

            Here's some additional info that might help you right away.
            Internally we have something called search paths used for automatically resolving missing texture paths on model load.
            However, there is no way to edit the list of search paths, something we can possibly enable in the future.

            To test how it works you can manually run the auto-resolve logic using the following Ruby script:
            Code:
            s = VRay::Context.active.scene
            s.add_search_path('Z:/(temp)/NEW VIEW')
            s.change{s.relink_files(:depth=>5)}​​​
            (Replace the 'Z:/(temp)/NEW VIEW' with the root path which is valid on the active system)

            This snippet adds a temporary search path for the current session and performs the auto-resolution.
            If we add support for this feature it would work between sessions too.

            Hope that helps,
            Konstantin

            Comment


            • #7
              Originally posted by konstantin_chaos View Post
              OK, if I understand correctly you would like V-Ray to search relative to the .skp but in both directions.
              I'm not sure I've seen a program that does that (haven't used AutoCAD).
              Is this automatic in AutoCAD or do you have to specify a list of search paths somewhere?
              Hi konstantin_chaos​, sorry fot my delay in my replay.

              The relative path in AutoCad doesn't have a specific searching path, it depends on the location of the file. In AutoCad, whe you have to navigat backwards the path starts whith dot dot backslash [..\] as many times as the number of backfolders needed.
              Let me put an example of how it should be in the example from above:
              My Sketchup file is located in C:\Users\Chema\Desktop\NEW VIEW\2. PROYECTOS\PRUEBA\Prueba.skp. My 3D librarie is located in C:\Users\Chema\Desktop\NEW VIEW\3. BIBLIOTECA 3D\TEXTURAS\VRAY\PBR MATERIALS\CONCRETE\4k-concrete 6. So when searching backwards for the 3D librarie you’ll have to go backwards 3 folders, to the NEW VIEW folder, and then go forward to the specified path.

              The path should be..\ ..\ ..\ 3. BIBLIOTECA 3D\TEXTURAS\VRAY\PBR MATERIALS\CONCRETE\4k-concrete 6

              It means you go backwards 3 folders, that’s why the path starts whith 3 x ..\, and then forward to the textura path.
              By that system you can freely move the Main folder (NEW VIEW) whithout loosing all the links, only works if they are linked between the folders inside the main folder. If they are linked whith outside folders, those will break.

              Thank’s for your time

              Comment


              • #8
                Thank you for the detailed explanation of how the relative paths work in AutoCad.
                I will log your request but I can not guarantee we'll be able to allow this syntax.

                In the meantime, did you have the chance to test the script I shared earlier?

                Comment


                • #9
                  Originally posted by konstantin_chaos View Post
                  Thank you for the detailed explanation of how the relative paths work in AutoCad.
                  I will log your request but I can not guarantee we'll be able to allow this syntax.

                  In the meantime, did you have the chance to test the script I shared earlier?
                  Hi! I've tested the script and it ended up working

                  At firts it didn't work, but I installed the pluguin rubyconsole+ from Sketchucation and it detected an error on your script... there was an extra space at the end of the sentence.
                  I fixed it and it worked! It took a long time to load, but in the end it worked, I guess it was because of the folder structure, which is very extensive.

                  thank's a lot!

                  It still being a bit anoying to insert the script for loading all the references, but is better than doing it manually.

                  Maybea introducing the script you gave me directly to the filepath editor it could work much better,

                  Thank you

                  Comment

                  Working...
                  X