Page 1 of 1

Problem with materials paths...

Posted: Sun Nov 06, 2011 12:26 am
by m-Que
Hello everyone,

So I've downloaded the Arroway Materials Collection and ran into a weird problem:
To have things a bit organized, I created a Textures folder within Arroway Materials folder and threw all the textures in there - MXMs always look for the Textures folder when missing something.
Now, when I open one of those materials with Material Editor everything works just fine.
But as I try to use those materials in Studio the paths are all messed up - Maxwell's looking for some weird texture folders I never had:
Code: Select all
C:\Program Files (x86)\NextLimit\materals database\textures\Arroway
I found a workaround - to open every single material in Material Editor and to re-save it.
But I was more curious - how come Studio refused to check the \Textures folder (the way Material Editor did) and instead went looking for some weird paths?

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 12:41 am
by JDHill
I think that the path you copied above is the one which is stored inside the MXM, and not any path that Studio is looking for on its own. The question, then, would be: why is Studio not finding the textures? A couple of things to try:
  • name your folder textures rather than Textures
  • add your textures folder to Studio's search paths
Not sure if the first one would make any difference at all, but it is something to check.

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 1:33 am
by m-Que
Thanks for reply, JDHill.
The second option fixed the problem - I wrote in the EXACT path of the textures folder.
But that's not a very good solution since there are only 5 slots in there...
BTW, Material Editor had the very same paths written in by default in preferences, so I wonder... :?

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 2:39 am
by JDHill
Could you confirm something for me?
  1. clear your Studio search paths and close Studio
  2. copy an MXS file into your Arroway Materials folder
  3. open this MXS in Studio by double-clicking it in Explorer
  4. import one of the MXM files from Arroway Materials
The textures should be found. Two other scenarios to check -- open Studio from the Start menu, then:
  1. open the MXS from step 2 above, then import one of these MXMs; its textures should be found
  2. close Studio and re-open it from the Start menu
  3. open an MXS in a different directory, then import one of these MXMs; its textures should be missing
If you can confirm these things, I can make a reasonable guess as to how it could be improved in the future.

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 2:05 pm
by m-Que
Yes, I can confirm that - I had exactly the same results as you described above.

Also, here's an interesting thing - I moved the Textures folder to:
C:\Program Files\NextLimit\Maxwell 2\materals database\textures\Arroway
instead of the one, MXMs are looking for:
C:\Program Files (x86)\NextLimit\Maxwell\materals database\textures\Arroway
and Studio found the textures for those materials.

Would it be because of:
ROOT_DIR\materals database\textures\Arroway
:?:

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 3:53 pm
by JDHill
It could be -- I assume there is a list of directories Studio always adds to its internal list of directories to check; perhaps it recursively searches all directories under materials database/textures.

Since you confirm the behaviors I listed above, I guess that it works in MXED but not in Studio, because when you use File > Open MXM in MXED, the current directory for the process is set to that of the MXM you choose, and that MXED finds the files in your textures folder using a relative path, textures/file.jpg, which is correct. In Studio, however, the current directory is set to that of an MXS file you have opened. The same code that runs in MXED, now running in Studio's material editor, would fail to find a file at textures/file.jpg, unless textures is in the same directory as the current MXS, as it was in step (a) above.

This would suggest that the MXM-loading code needs to specifically check the directory where the MXM is being loaded from, rather than relying on the ability to find textures using the relative textures/file.jpg method, which is what it appears to be doing currently. One of the Studio developers could confirm whether this diagnosis is a correct one.

For the time being, it appears that you will need to use the search paths, or put textures in a default location, as you describe in your above post.

Re: Problem with materials paths...

Posted: Sun Nov 06, 2011 4:18 pm
by m-Que
Cool, Thank you for the detailed explanation.

Well, since this is the first time it happened to me in years, it should not be a problem. And besides, I always change paths/reorganize when it comes to new materials.
But anyways, it's good to know for the future :wink: