Is there a way...to copy materials from one object to another?



  • @structure No big deal. I did it manually.



  • Save as a material file and load it?



  • I believe that this is something that UV Mapper can do. You create a uvs-file from the obj-file with the correct layout and apply it to your other obj-file to transfer the uv-layout. For example Lyne used this to remap the animals she made many years ago. Even the free version works.



  • @fverbaas Tried that, didn't work. I eventually opened both in the modeler and copied the islands from the good one, selected the UV islands in the other one and named the materials to match.



  • @marianner I think only the Pro version of UVMapper can do this. I lost my copy several hard drive crashes back and can't get the UVM guy to answer emails.



  • @glitterati3d Just because I was curious I downloaded the Classic version from uvmapper.com right now and ran it. It does have a menu choice "Export UVs". I didn't try it though.


  • Poser Ambassadors

    Does anyone know what happened to Steve Cox?? We even shut down the UV mapper forum at Rendo cuz he stopped answering.



  • @glitterati3d said in Is there a way...to copy materials from one object to another?:

    @marianner I think only the Pro version of UVMapper can do this. I lost my copy several hard drive crashes back and can't get the UVM guy to answer emails.

    If you want to reinstate your copy without Steve's involvement, I think all you need is the registration e-mail with your file in it. If you use web based e-mail that could still be in there somewhere?

    For reference, this is how you'd do it using UVMapper Pro.

    • Open the OBJ which has the mapping you want, and export a UVS file. Tell UVMapper Pro not to export materials, groups, or anything else that's been lost. Your UVS therefore contains only the mapping.

    • Open the original OBJ - the one which does have the material zones etc. Import the UVS file you just saved, which will apply the new mapping but not overwrite the materials.

    • Save early, save often. Use a different name, of course. :)



  • @structure was that due to missing information in the original obj file, or difficult/impossible logic in identifying common facets between the source and destination obj?

    I'm asking, because I have some obj parsing scripts that might be straightforward to augment to provide this function. @Glitterati3D you say you did this manually, and if the geometries (or more specifically, just the facet definitions, as the vertices could move) are essentially identical, except for missing material zones (usemtl lines), that shouldn't take a lot of effort to script in Python.

    UVMapper was great when it was available for both Mac and Windows, but since it went Pro, it seems to have languished, and the Classic version for Mac is now completely unsupported under OS X.



  • @anomalaus - I am not sure - it's a script I wrote a long time back and I did not look through the code before I trashed it - I just remember getting very frustrated with it - I thought I had finished it - but apparently never did.



  • @anomalaus It was a conversion from a pair of boots I had done for another figure. Everything was the same except for position, scale, etc. I managed to maintain the UV map, just not the materials settings on the shoes. And, yes, the first thing I did was copy the .mtl file over to the new object, but that did nothing.

    So, I just opened 2 windows in the modeler, put the "old" shoes in one, the "new" shoes in the other and following the "old" settings added the proper materials to the "new" shoes.

    My main goal was to save the texturing step and use existing textures on the shoes for the new figure.



  • @glitterati3d it's my understanding that the .mtl file just contains file references for the material groups/zones. The association of facets to materials is all done in the .obj file itself, so it's quite possible to have a new obj file, with all of the vertices scaled and displaced to match another figure, but as long as they remain in exactly the same order, all of the facet lines should be identical. If the facet lines actually are identical, since they just refer to the vertex numbers in order, even if the vertex coordinates have changed, it should be possible to replicate the 'usemtl' lines in the original obj file, which define the material groupings, into the new file with missing materials.

    Even a side-by-side comparison of the two .obj files in a text editor (once you get past any vertex coordinates) should easily show if it's just the 'usemtl' lines missing. A script to copy those across shouldn't be very difficult, if the assumption that one file was derived from the other is correct, and the vertex numbers and facet definition order haven't changed at all.

    The other possibility is that the material names (usemtl lines) in the new file exist, but don't exactly match the original.