specifying relative paths to materials used in duf scenes

srieschsriesch Posts: 4,241
edited December 1969 in Daz Studio Discussion

Is there any way to specify a relative path instead of an absolute path for materials used in the Surfaces tab so my saved .duf scene folder doesn't have to keep the same name and location on my hard drive until the end of time?

For example, maybe I have a folder "C:\whatever\my scene" with "scene x.duf" and "a texture for scene x.jpg". This works great until I rename it to "C:\whatever\a scene with a better name", or move it to E: then it can no longer find my .jpg. I can of course fix one if I know I'm going to rename it, but 5 years from now when I forget and rearrange stuff or move it to a different disk I don't want to suddenly discover a zillion scenes are no longer working.

Comments

  • MattymanxMattymanx Posts: 6,902
    edited December 1969

    In DS native files, all texture paths should look like this:

    "/Runtime/Textures/foldername/texture.jpg"

    Its simular to the Poser method excpet that instead of the forward slash, a : is used.

    My tutorial here - http://www.mediafire.com/view/?oqcf29kmigzd3gk - covers this on the last page or so. Pleaes note that the screen shot is from a DSA file

  • BejaymacBejaymac Posts: 1,886
    edited December 1969

    As long as everything was in a mapped directory when you made the DUF, then all pathways should be relative, starting "/data for assets and "/Runtime for textures.

  • srieschsriesch Posts: 4,241
    edited December 1969

    It appears that the problem is the .duf wasn't created in an appropriately mapped folder. Looking at the .duf file, it had the following line:
    "image_file" : "/EU01_Acer_campestre_Field_Maple/inverted EU01lef_a.jpg"
    Once I mapped a new folder and recreated the .duf from scratch and saved it in there, the extra folder name EU01_Acer_campestre_Field_Maple is no longer referenced in the duf, and I was able to rename or move my folder to another drive without any problems.

    Thanks!

  • srieschsriesch Posts: 4,241
    edited December 1969

    I have an existing .duf scene I'm trying to fix (without recreating it from scratch) to eliminate the absolute path references. I tried loading the scene, mapping the folder it was in, then resaving it over the top of itself, but no luck. I also tried going into the Surfaces tab and setting one of the custom materials' diffuse textures to none instead of the filename, then changing it back to what it was, but unfortunately that did not reset it either. Any other ideas?

    it's not critical, so I don't want to waste days on it or anything, I was just hoping for a relatively straightforward fix if there was one available.

  • Richard HaseltineRichard Haseltine Posts: 100,747
    edited December 1969

    Decompress the file and edit with a text editor. An archive utility will extract it (sans extension) or you can use the Window>Panes(Tabs)>Batch Convert

  • srieschsriesch Posts: 4,241
    edited December 1969

    Thanks.

    Turns out this second time the problem wasn't an incorrect reference; this time I had copied a scene over to a second PC, which didn't have the scene's parent folder mapped as content, so it wasn't looking in the right spot. The original scene actually had saved the references correctly after all. Once I mapped the content on the 2nd PC too, everything worked.

Sign In or Register to comment.