Digital Art Zone

 
     
specifying relative paths to materials used in duf scenes
Posted: 15 September 2012 01:07 PM   [ Ignore ]
Power Member
Avatar
RankRankRank
Total Posts:  1333
Joined  2003-10-09

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.

Profile
 
 
Posted: 15 September 2012 02:03 PM   [ Ignore ]   [ # 1 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2790
Joined  2004-04-14

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

 Signature 

My DAZ3D Store
My Free Stuff
My Art @ DeviantART
Ships of the Line - MEGA THREAD
How to use the Poser Format Exporter - **Updated 2013-02-09**

Profile
 
 
Posted: 15 September 2012 02:21 PM   [ Ignore ]   [ # 2 ]
Active Member
Avatar
RankRank
Total Posts:  893
Joined  2007-01-04

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.

 Signature 

**shuffles of with a new headache** tongue wink

Profile
 
 
Posted: 15 September 2012 03:16 PM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1333
Joined  2003-10-09

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!

Profile
 
 
Posted: 28 September 2012 08:16 PM   [ Ignore ]   [ # 4 ]
Power Member
Avatar
RankRankRank
Total Posts:  1333
Joined  2003-10-09

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.

Profile
 
 
Posted: 29 September 2012 05:32 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13654
Joined  2003-10-09

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

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 29 September 2012 08:37 PM   [ Ignore ]   [ # 6 ]
Power Member
Avatar
RankRankRank
Total Posts:  1333
Joined  2003-10-09

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.

Profile