Texture paths relative to model?

Texture paths relative to model?

CAMedeck
Advisor Advisor
10,308 Views
11 Replies
Message 1 of 12

Texture paths relative to model?

CAMedeck
Advisor
Advisor

I am developing a 3d library that will be replicated to various company servers throughout the country.  I have a folder (with subfolders) for different model categories, and I also have a folder (with subfolders) for any texture maps being referenced by those models.

 

What I would like to do is set the paths of the textures to be relative to the model location.  This way, the texture maps will be found by anyone opening the models, regardless of their server name or location.  For instance, my absolute path is \\servername\3DSMAX\Models\Vehicles for the model, and the associated bitmaps would be in \\servername\3DSMAX\Textures\Vehicles.  I would like to have the map path be something like \\..\..\Textures\Vehicles, where it starts looking from the model's current location.

 

Changing the Project Folder is not an option.  Is there some way to path the textures relative to the current model location?

 

Thanks.

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Accepted solutions (1)
10,309 Views
11 Replies
Replies (11)
Message 2 of 12

irishman_team_kilber
Mentor
Mentor
0 Likes
Message 3 of 12

CAMedeck
Advisor
Advisor

Thanks for the reply.  It could be possible for each user to add in User Paths for each subfolder under Textures, but as the library grows there could be a dozen or more folders paths that would need to be added.  I am trying to keep things simple and easy, where the end users do not need to configure anything.

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 4 of 12

darawork
Advisor
Advisor

Hi,

 

If you keep your paths short and sweet you can do a simple 'save as archive...'

 

That way the .zip file (when extracted) will populate the .max folder with the relative pathnames, all inside one easily movable parent folder.

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

0 Likes
Message 5 of 12

irishman_team_kilber
Mentor
Mentor

@CAMedeckas i am not experienced as you are a university speaker i would use the multi/sub-object but this is just IMHO this would cut down on the maps and texture you use would not it?

0 Likes
Message 6 of 12

CAMedeck
Advisor
Advisor

Thanks Darawork.  I create archives when sharing or archiving models.  But in this case, I am creating a master model library that will be replicated out to different offices on a nightly basis.  I want the end users to be able to grab models from their server as needed, with minimal setup.  Because the library is being replicated from a master, any time they change, remove, or add files to their local library, it will be overwritten from the master before the next day. 

 

Right now, I am just stripping texture paths from the models before I upload them to the master.  So every time a user merges in a model from the library, they'll have to relink the bitmap paths.  I'm trying to avoid that if I can.

 

Thanks.

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 7 of 12

darawork
Advisor
Advisor

I was going to mention 'Relink Bitmaps' by Colin Senner, but going by your phrase 'Stipping Paths' I'd guess you already have that plug-in?

 

If the clients all had a copy of that plug-in, and a main textures folder on their workstations then they could just 'relink' using the plug-in.

It takes 1 minute and always works for me.

 

For every model I have made over the last five years in this job I have dumped all the textures into one folder, one big mess of bitmaps... but it works great.

 

 

 

or maybe this is the answer we're looking for? (Thanks to @ )

 

If everyone will be using copies and not instances of the files with same sub-directory structure, then you can convert existing paths to relative.
   Customize -> Preferences -> Files -> Check Convert to local files Relative
 
If you are going to access a specific folder where all of the bitmaps reside, then you will want to convert the paths using UNC. This is assuming everyone has access to this folder via your network.
  Customize -> Preferences -> Files -> Check Convert to file paths to UNC

 

https://forums.autodesk.com/t5/3ds-max-forum/relative-texture-paths-help/m-p/4852323#M92080 

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

Message 8 of 12

CAMedeck
Advisor
Advisor

I sing my praise of Colin's Relink Bitmaps script all the time.  It is a main staple in our studio, since our data keeps moving to a new server every couple years.

 

I had come across that old post while searching, and the problem is that the paths aren't local.  They'll be network paths, and each office will have a different server name for their library.  

 

It doesn't seem that difficult of a thing to do!

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 9 of 12

darawork
Advisor
Advisor
It doesn't seem that difficult of a thing to do!

Well.. It's already given me a mini aneurysm on the cycle home.

 

 

Your're trying to wildcard the first word in the path-name, essentially.

I haven't got Max at home so I can't test stuff out here, but perhaps this might be along the lines:

 

http://www.scriptspot.com/forums/3ds-max/general-scripting/network-drive-path-to-unc-path

 

(Hopefully it works, there's old beer and perhaps curry in my keyboard and it's really hard to type). 

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

0 Likes
Message 10 of 12

CAMedeck
Advisor
Advisor

Thanks for trying, but I don't think that will work.

 

I am beginning to think that just stripping paths is the best bet.  The end users will just need to relink the maps each time they use the models.

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 11 of 12

CAMedeck
Advisor
Advisor
Accepted solution

Following up on this issue, I received an email from Autodesk Support stating there is no way to achieve relative paths at this time.  At least, not the way I'd like them.  However, they did log it as a wish for the future, so maybe we'll see this as an option in a later release of 3ds Max.

 

The Support Team also suggested writing a script that would convert paths, but scripting is not one of my strong suits.  It isn't even one of my weak ones, come to think of it...

Chris Medeck
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 12

Anonymous
Not applicable

Hey Camedeck, 

 

I feel we are trying to accomplish the same task. My company uses replicated servers to for all of our offices to access geometry, textures etc And its the typical task of importing the downloaded geometry and relinking all maps. As you've said it would be great if we can avoid this step.

I've gone down the route of -  Related maps and geo go into a .mzp archive with an accompanying mzp.run file. On drag and drop (from either the server, or its web based frontend) The mzp.run file is executed and the .mzp extracted to the projects maps folder and imported into 3ds max. The issue... The maps are absolute and not relative. And this is where i'm stuck.

 

Below is the resource i'm currently using.
Zip-file Script Packages

 

I'm pretty sure using fileIn <scriptname> to relink materials is the way to go, but my maxscript is flaky at best, and i'm yet to delve into 3ds max python api.

 

I know its not a solution, but hopefully it can be part of the foundation.

0 Likes