absolute vrs relative path

When creating a product for distribution, how does one handle paths?

My problem is as follows:

A prop, an object or a material, is always called up by it's location as assigned when saved to -- for example -- a textures library and data folder that is located in a specific place on an specific individual's hard disk.

But when that same prop and all its associated files are transfered to another person's PC, the script will (I guess) not be able to find the same path (hard disk (name) > users (name), etc) that was originally used.

In order for everything to load correctly (i.e. not being prompted to locate files), don't I need to have an absolute -- not a relative path -- associated with the prop .... and if so, how do I set that correctly?

Comments

  • crosswindcrosswind Posts: 6,926
    edited May 2023

    Ds always uses relative paths for the resources unde the root path of a 'Daz Library'... you may open a DSON User File or DSON Support File to take a look at those file paths which are all 'relative' ones..
    Therefore you just need to save your product files to the folders where they should locate... data / runtime... People / Environments / Props... and relevant sub-folders, etc. in your 'Daz Library', and then distribute the product as per the files structure...

    Post edited by crosswind on
  • Richard HaseltineRichard Haseltine Posts: 100,778

    You must have the assets, mainly an issue with textures, in a mapped content directory when you save the files - otherwise DS won't be able to discard the oepning parts of the path, leaving just the relative location. You must also not have nested content directories - one selected content directory inside another - as Ds may thens tart the relative path with the inner folder, which will cause it to fail on other systems..

  • crosswindcrosswind Posts: 6,926
    edited May 2023

    Mainly an 'SOP' may be as below:  (mostly like a PA usually does..)

    0) ... all making and necessary preparation......
    1) Save Scene, Figure / Prop assets (DSON User Files) to 'user-face' folders (Environments, People, Props .... etc. + 'Vendor' and 'Product' sub-folders as needed);
    2) Save UV / Morph assets (DSON Support Files) to data folder with 'Vendor' and 'Product' names;
    3) Save texture maps to \Runtime\Textures\ + 'Vendor' and 'Product' sub-folders......
    4) Assign texture maps from 3) to Surfaces ......
    5) Save necessary ...Presets files to the folders along with 1) ..... 
    etc.

    So if following the standard procedure, normally you don't have to worry about 'paths' problem... 
    Then better set a 'Test Library' for the products you make,  copy all Content to this lib or use Content Wizard to build an IM package of your product and use DIM to install it to the lib for testing...

    Post edited by crosswind on
  • mcorrmcorr Posts: 1,084

    excellent .... thanks all!!

    @crosswind ... very logical, detailed and thorough ... thanks a million!

    Your explanation basically confirmed what I hoped was the case .... just put things where they belong in the DAZ content structure as it was (where it was) originally installed by DIM. The retrieval of textures and data (like UVs) then happens in conformity with the (vendor) folder name assigned during the creation process (like when saving -- for example -- as a "support asset").

  • crosswindcrosswind Posts: 6,926

    mcorr said:

    excellent .... thanks all!!

    @crosswind ... very logical, detailed and thorough ... thanks a million!

    Your explanation basically confirmed what I hoped was the case .... just put things where they belong in the DAZ content structure as it was (where it was) originally installed by DIM. The retrieval of textures and data (like UVs) then happens in conformity with the (vendor) folder name assigned during the creation process (like when saving -- for example -- as a "support asset").

    You're welcome, and yeah, you're right yes 

Sign In or Register to comment.