Announcement

Collapse
No announcement yet.

Materials - image location relative paths, not absoulte - please give us this option!

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

  • Materials - image location relative paths, not absoulte - please give us this option!

    I just had a strange interaction with Chaos Group support. I wrote to them inquiring about the option to link material jpg/png files using relative paths instead of absolute. I work remotely on some days, so opening up a project on my home PC (using Dropbox Business) 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, Rhino does relative paths, but why can't Vray do relative paths? We're pretty good at keeping out material library neat and collected, so unless some intern links an old material from a faraway location, everything image map can usually be found in the same project folder.

    Chaos group wrote back and said 'this is not a Vray issue, it's a Dropbox issue' and suggested I made the file paths on my work server and Dropbox home folder identical. Which is impossible because our server has a completely different set-up to my home Dropbox.

    Why can't Chaos Group see the value of relative paths and implement it? It seems like it's even more important with more people working remotely these days.

    Have I missed something here? I feel like I suggested something impossible to them and that it's my fault I'm having this issue.

    (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).


    Last edited by jeremy_levitt; 29-07-2021, 09:39 AM.

  • #2
    hi jeremy,

    Well neither AutoCAD nor any other software use relative file paths internally, though it seems so.
    Under the hood they use the specified "relative path" to build up a full path based on certain criteria, that may or may not be hidden from you

    There is no other way. What if you render your scene on the cloud ? or distribute the rendering locally using Swarm ? relative paths doesn't work in these scenarios
    Or what if you did not save your morel to a file, and put a relative path as texture asset. The relative path is relative to what ?

    Instead of dealing with relative paths, V-Ray is rather managing absolute paths. There are an automatic and semi-automatic methods for that (well, manual as well).

    * The automatic method is considering the .3dm file location, as well as the Rhino search paths.
    At file open, V-Ray goes thru all file path parameters on all assets, and verifies the absolute path to the referenced files.
    it basically tries to match the current path in all of the search directories, including the folders that precede the file name. The actual algorithm is not that simple, but if it has enough information to locate the file, it will

    For example if your absolute path at the office machine is D:\Dropbox\project1\folder1\file1.png, and then you go home, where the file is physically located at E:\Work\Office\Dropbox\project1\folder1\file1.png,
    You put "E:\Work\Office\Dropbox" in the Rhino's search paths and then open the model file. V-Ray has enough information to be able to locate the file and once done it will modify the original path so it points to the found file.
    The next day at the office the same thing happens, and the file is "matched" back to D:\Dropbox\project1\folder1.

    * The semi-automatic way is to use the V-Ray File Path Editor, where you can do basically the same, fixing every group of files that have a red square icon

    If any of the solutions here does not work for you, then please contact support again and ask about file path management.

    Comment


    • #3
      Hello Nikolay,

      Thank you for the detailed response.

      I understand that Rhino and AutoCAD may use some complicated technology behind the scenes to make things look like paths are relative, but whatever the algorithm does, all I know it just works. I can open my Rhino file on my work or home PC and all the links are intact. No error messages. I don't have to add paths, repath anything, or change any settings. The same for AutoCAD, I open it wherever I am, and it works.

      I tried the automatic approach you describe, but unfortunately it didn't work. We have materials organised in several subfolders, and adding each folder is very time consuming to Rhino search paths. Also, this approach to adding search paths is specific to that unique Rhino file, so each time a new project is created, I would have to add multiple folders, and each time a new material is created, I would have add folders again. Storing the jpg & png files of each material in the same folder as the Rhino file would go against our office's attempt to keep things organised and easy to locate information. We have multiple people working on each project so there has to be a structure to our project folders. I'm including some images here to show you how our projects are set up.

      I would suggest you seriously consider a solution for this process that works, now that people are working remotely and all around the world. It would make many people's lives easier.


      Click image for larger version

Name:	2021-08-09_092915.jpg
Views:	891
Size:	333.4 KB
ID:	1121662

      Comment


      • #4
        Hi,

        thanks for the details.
        You don't need to add subfolders. V-Ray for Rhino is by default searching 5 subdirectories in from each folder you enter in the Rhino search paths dialog. If your final files are not further than 5 levels, adding the very root shall be enough.
        Furthermore the current .3dm file path is also added to the search paths by V-Ray automatically, so if your files can be traced relative to your master model file it shall work again.

        Here I'm attaching a simple example file. The original directory where I created everything is D:\test. The material's texture is located (originally) in D:\test\Materials\Textures\Hedge 00 seamless.jpg (this is the path serialized in the file), and the file does not contain embedded textures whatsoever. I renamed my root folder to D:\some_test, then moved the entire thing to C:\another_test. On opening the .3dm V-Ray is relinking the missing D:\test\Materials\Textures\Hedge 00 seamless.jpg file to C:\another_test\some_test\Materials\textures\Hedge 00 seamless.jpg

        Please test that file opening from several locations on your machine, and check if the material's texture file is relinked to the correct location. As you said it shall "just work".

        p.s. I'm using the latest V-Ray 5.10.06 release, and it works here in the office, and on my machine at home
        Attached Files
        Last edited by nikolay.bakalov; 09-08-2021, 10:59 PM.

        Comment


        • #5
          Hi Nikolay,

          I have tried this and it still doesn't work. I am very confused.
          • On my work PC, I added P:\4356_Westin DC\01. 3D\01. MATERIALS to Search Paths in Rhino
          • On my home PC, I sync the same file via Dropbox and open it. It is located at C:\Users\[USERNAME]\Dropbox (PLD)\Parts and Labor\4356_Westin DC\01. 3D.
          • Materials are also synced to the exact same relative location C:\Users\[USERNAME]\Dropbox (PLD)\Parts and Labor\4356_Westin DC\01. 3D\01. MATERIALS
          When I check File Path Editor on my home PC, everything is red and still showing the work server path.

          What am I doing incorrectly?


          Click image for larger version  Name:	2021-08-13_163338.jpg Views:	0 Size:	89.4 KB ID:	1122104

          Comment


          • #6
            Hi Nikolay, do you have any insight into this issue?

            Comment


            • #7
              Hi, I'm out of town untill the end of the next week. The setup you describe looks absolutelly correct, and it shall be OK. Could you send me a small model with the material setup on your office machine. Norhing fancy, just one cube with simple material and one random texture. For investigation, also the exact version of V-Ray for Rhino you're using
              Last edited by nikolay.bakalov; 20-08-2021, 01:28 PM.

              Comment


              • #8
                Hi, you can download a zip file of a stripped-down version of the file I'm working on, with a few linked materials. I did this on my work PC. I am using this Vray version on both work and home PC

                Click image for larger version

Name:	2021-08-30_102614.png
Views:	841
Size:	30.8 KB
ID:	1123507
                • On my work PC, the Rhino file and materials are located at P:\4356_Westin DC\01. 3D test and P:\4356_Westin DC\01. 3D test\01. Materials
                • I try copying the entire "01. 3D test" folder to my work PC desktop: C:\Users\Thomas\Desktop\01. 3D test. When I open this copy on my work PC desktop, it is still showing material links to P:\4356_Westin DC\01. 3D test\01. Materials.
                • If I am to understand the search path procedure you describe in your test file above, wouldn't the file path editor now be showing material links at "C:\Users\Thomas\Desktop\01. 3D test\01. Materials" ?
                • Then I try opening the file on my home PC via Dropbox Sync, which is on my C: drive. When I look at file path editor, materials are now red and the file path is still looking for P:\4356_Westin DC\01. 3D test\01. Materials
                Please can you assist as soon as possible, this issue is causing me a lot of wasted time working remotely and it's been weeks attempting to resolve this.

                Thank you

                Comment


                • #9
                  Hi,

                  So it was a bug - a stupid one, however the workaround is very simple.
                  Basically the file path resolver thinks that "01. 3D test" is a file, not a directory, so it doesn't look into its subfolders, where the files are located.
                  To fix the issue, you just need to remove the "Archive" flag on the root folder

                  Click image for larger version  Name:	no_archive.png Views:	0 Size:	40.5 KB ID:	1123647

                  Windows will ask you if you want to apply to all folders and subfolders on which you answer with yes.

                  The fix will be available in the next update

                  Thanks for the report

                  Comment


                  • #10
                    Forgot to mention that you don't need to add the search path manually, since your textures are less than 5 levels deep relative to the .3dm file

                    Comment


                    • #11
                      Hello,

                      I just want to add some extra information.

                      On both my work and home PCs, I've turned off that archiving setting (and applied it to all subfolders and files) and things generally seem to work ok. However, there are some instances where the file path sticks to my work server.

                      Here you can see two paths, the P: drive is my work server, the C: drive is my home PC. This is what I see when I open the file on my home PC. For some reason, some materials are found, some are not

                      Click image for larger version

Name:	2021-09-14_084915.jpg
Views:	812
Size:	158.8 KB
ID:	1124732

                      Comment

                      Working...
                      X