Announcement

Collapse
No announcement yet.

How to reuse Textures, Materials, Meshes and such.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to reuse Textures, Materials, Meshes and such.

    I think I am trying too hard, but I can't seem to get textures, materials, meshes and such that I used for one map and want to use in another map. With UT2K4 it was easy. Everything used MyLevel as the package. I can't just load one of my maps in the editor and then load my new map and expect the materiasl and meshes to still be there. So I thought I would create a package where I can store all of my textures, materials, meshes and such and then just copy them over to the map that I am working on. Textures copy just fine with using duplicate. Materials and Meshes do not. Well they copy over, but reference the Textures or Materials from which it came from. So I thought I would be slick and just rename them to the package name of my map and then don't save changes made to my original package. This usually ends in the editor crashing. Is there an easy way to reuse stuff and have it saved in the ut3 file? I do NOT want to know how to get UT3 stock items over into my map. So please don't refer me over to all of the posts in regards to using obj savepackage blah blah blah, unless there is a slick way of doing this to get stuff from one package and into my map. These are items that I have created or ported over from UT2K4 maps with permission from the designer of the map. When I am trying to get stuff from another map, I am using the unpublished version of it.
    Thanks for your help,

    #2
    Do as you said and load the map with the materials etc. then close it and load the new map up.

    The stuff should still be there in the Generic Browser. Just right-click and Duplicate them and Rename the duplicates and change the Package Name to the new map's name.

    That should work I would think...

    Comment


      #3
      As soon as I load the new map, which closes the map with the materials, also removes them from the Generic Browser.

      Comment


        #4
        Originally posted by aCruceSalus View Post
        As soon as I load the new map, which closes the map with the materials, also removes them from the Generic Browser.
        I haven't tried this but I know that you can double launch the Editor. Launch the Editor twice, load a different map into each, and then copy and paste between the two maps.

        Comment


          #5
          Originally posted by aCruceSalus View Post
          As soon as I load the new map, which closes the map with the materials, also removes them from the Generic Browser.
          Check if you have turned on option to show only assets in use, it is somewhere in general browser.

          Also for more complicated things (like using modified EPIC material, or randomizing speedtrees), check sticky topic about how to copy Epic content. That one about "obj savepackage ...". If you save some package this way it will, enable copy, rename and duplicate for all assets in it. Now you can duplicate anything you want from original packages into your map package. Then you can modify material.

          All that features with locked packages are because cross dependency and they try to protect other maps from modyfing by editing packages it was created with. So be careful not to modify Epic package, it may make some maps incompatible with its original version, so you can get kicked by punk buster.

          Comment


            #6
            Thanks for your input, but again, I am not working with Epic's materials. I have a map called DM-MyMap1.ut3 and it contains resources that I want to use in DM-MyMap2.ut3. If I load DM-MyMap1.ut3, of course I see it in the Generic Browser. As soon as I load DM-MyMap2.ut3, DM-MyMap1 disappears from the generic browser. So I decided to create a package called MyPackages.upk to store all of my Textures, Materials, Meshes etc. Now when I load DM-MyMap2.ut3 I can load MyPackages. Just in case you are wondering, I really did not use these names they are just examples. Anyways, It took me hours to get everything imported into MyPackages. I first started by doing the obj savepackage .... to get DM-MyMap1 to MyPackages and then imported all of my new Textures, Meshes and creating Materials. Now I want to get them from MyPackages into DM-MyMap2.ut3. If I sellect all of the Textures, Materials, Meshes and such from MyPackages and select duplicate, It will indeed duplicate everything over. The problem is now I have to go into every single Material and change the Texture references from MyPackages to DM-MyMap2. Then I have to go into every single Mesh and change the Material references from MyPackages to DM-MyMap2. I am talking about around 130 Materials and 50 Meshes. There has got to be an easier way to reuse resources. I will try opening two editors, but I think it will result in the same issue as using duplicate. Plus a note about using renaming, the "ok to all" button is grayed out and I have had the editor crash on me several times when selecting a huge number of items to rename. Any more insight/suggestions would be great.
            Thanks again for everyones' comments.

            Comment


              #7
              Duplicate all resources you want, save that package as something, then load other map and open that package you just saved. If you cannot duplicate resources (it is greyed out) you need to follow that topic about exporting cooked resources.

              for eg you want static mesh: DECO_DRAGON, from map DM-ASIAN, copied over to your map: DM-YOUR_MAP

              open DM-ASIAN and select DECO_DRAGON, right click on it.
              if "Duplicate" is greyed out you need to follow instructions from topic about copying cooked resources. After you unlock DECO_DRAGON
              Duplicate it as DECO_DRAGON in for eg. MY_TEMP package (just write its name in popup that asks for target name)
              After you copy all resources you need from DM-ASIAN, save MY_TEMP package
              then open DM-YOUR_MAP and if necessary open MY_TEMP (but should be loaded if you have enough memory free).

              Then repeat process for all resources from MY_TEMP and duplicate them to your map.

              You can select multiple resources and just change name package, they all will be moved in batch.

              Comment


                #8
                So the answer is "no, there is not an easy way to reuse resources". I open the map that I am working on. I then open my package of Textures, Materials and Meshes in the Generic Browser. I started out by selecting just the necessary Textures and Materials for one Mesh. I then right click and select duplicate. I then change the package to duplicate them to my map. As expected, I opened up the Materials and they are still referencing Textures that are in my package, not the newly created duplicated Textures. I then open up the Mesh and update the Materials that referenced to my package to the newly duplicated Materials. I then place the Mesh in my map and do a rebuild. I then proceeded to unload MyPackage from the generic browser, so that I am only working with the resources for my map. I was promptly told that it could not close the package because it was currently being used. Regardless if I hit "OK" or "CANCEL", UT3 crashes. I now have to start the duplicating process over again. Needless to say, this is very frustrating. I checked and double checked and my map is not using any resources from the loaded MyPackage, as I make sure there is nothing referencing back to it after duplicating it to my map. Any more suggestions?
                Thanks,

                Comment


                  #9
                  Let me step through this please:

                  DM-MyMap1.ut3 contains resources that I want to use in DM-MyMap2.ut3.
                  A typical mapmaking procedure.

                  If I load DM-MyMap1.ut3, of course I see it in the Generic Browser.
                  Yes you do, but sometimes you have to click in Browser to update it or scroll down to see newly added items.

                  As soon as I load DM-MyMap2.ut3, DM-MyMap1 disappears from the generic browser.
                  Normal. Only one map/package can be loaded at a time into the Browser to view.

                  So I decided to create a package called MyPackages.upk to store all of my Textures, Materials, Meshes etc.
                  Should be no problem but it is an external package and must accompany the map when distributing.

                  Now when I load DM-MyMap2.ut3 I can load MyPackages.
                  As it should be. You can Load as many packages as memory will allow.

                  Now I want to get them from MyPackages into DM-MyMap2.ut3.

                  If I sellect all of the Textures, Materials, Meshes and such from MyPackages and select duplicate, It will indeed duplicate everything over. The problem is now I have to go into every single Material and change the Texture references from MyPackages to DM-MyMap2.

                  This is where you lose me. It sounds like you want to have two maps with each one having its own Map package. Here is my understanding...there is no problem with having a separate external Map package...and that is exactly what it would be. You should be able to load ANY map and reference assets from that package...but it must be zipped and shipped w/ the map. But that may be a problem because you are only going to reference assets from that package. When you reference assets externally from MyPackage they will show up in the MyMap2 internal package...but they are only referenced unless you copy the assets to the MyMap2 internal package and rebuild...then they will be referenced from internally. You need to clarify this a little more for me.

                  If I wanted to cause a situation as you describe (as I understand it anyway), I would transfer my assets from Map1 to Map2, in whatever manner, and then I would quit UED or load another map. At any rate, whenever I loaded Map2 again there would be absolutely none of the assets that I had previously loaded and saved. Because I did not use them on anything in Map2 and therefore were not referenced to anything. Unreal Ed will not Save assets into internal packages unless they are referenced to something somewhere in the map. If not, they usually disappear from the Browser as soon as you save the internal package. A normal Save (the single Disk icon) will NOT save an internal package. You must do that another way.....don't recall it now but....you can Save using the "multi-Disk icon" and it WILL save your internal package. That is what I do. Plus, rebuilding will Save the internal package, but you then also have to Save the Map.

                  Here is what I see. You have an external package containing all of your map assets. And you have two different maps that you want to use those assets in.

                  These are your choices: 2 Maps that reference from the same external package....or....2 Maps that have had those external assets copied into the internal package of each Map, therefore ALL the referencing will be internal....or....a mixture of the two choices. I know of no other way.

                  Something else...You sometimes have to do a rebuild before the references (that were just added) are changed (rebuilt) inside the map file itself.

                  Move something into a Map. Reference it to something in the Map (use it somewhere, don't just leave it in the package (Browser). Then rebuild all so that the references are built. Save Map and internal Map package.

                  The first choice of an external package seems the best if your Cooked map will be large in size.....30Mb+? I would say that if the Cooked map is less than 30Mb?, then the internal Map package should do.




                  Then I have to go into every single Mesh and change the Material references from MyPackages to DM-MyMap2. I am talking about around 130 Materials and 50 Meshes. There has got to be an easier way to reuse resources.

                  It's tough. But I've still had to do it. You have more than me though. I think there is a Batch import somewhere. I'll look if you like.


                  I will try opening two editors, but I think it will result in the same issue as using duplicate.

                  You are right. It only serves to Copy and Paste between the two Maps. Once pasted inside the Map it would still reference MyPackage.



                  Plus a note about using renaming, the "ok to all" button is grayed out and I have had the editor crash on me several times when selecting a huge number of items to rename. Any more insight/suggestions would be great.

                  I think you have to do this in steps...textures, materials, meshes, etc. Not all mixed together. The "OK TO ALL" button may be grayed out because two or more items description doesn't match or something. Like if you select Bold and Regular text at the same time. The Bold style will be unchecked or grayed out.


                  Thanks again for everyones' comments.

                  FYI-I'm not a Power UED user so I can get mixed up. If I am misleading you, that is not my intention. If I have stated anything wrong I will gladly edit it.
                  .
                  .

                  Comment


                    #10
                    Originally posted by aCruceSalus View Post
                    So the answer is "no, there is not an easy way to reuse resources". I open the map that I am working on. I then open my package of Textures, Materials and Meshes in the Generic Browser. I started out by selecting just the necessary Textures and Materials for one Mesh. I then right click and select duplicate. I then change the package to duplicate them to my map. As expected, I opened up the Materials and they are still referencing Textures that are in my package, not the newly created duplicated Textures. I then open up the Mesh and update the Materials that referenced to my package to the newly duplicated Materials. I then place the Mesh in my map and do a rebuild. I then proceeded to unload MyPackage from the generic browser, so that I am only working with the resources for my map. I was promptly told that it could not close the package because it was currently being used. Regardless if I hit "OK" or "CANCEL", UT3 crashes. I now have to start the duplicating process over again. Needless to say, this is very frustrating. I checked and double checked and my map is not using any resources from the loaded MyPackage, as I make sure there is nothing referencing back to it after duplicating it to my map. Any more suggestions?
                    Thanks,
                    ===========

                    I see that you have responded before I posted my last response.

                    Based on what you say here you might want to remove MyPackage and place it on the Desktop or something. Launch UED and Load your Map. UED should tell you that the package is not available and what that package is referencing in your Map. If there are no references in your Map to MyPackages, as you say, then nothing should happen when you Load your Map.

                    Sorry if I'm not helping.
                    .
                    .

                    Comment


                      #11
                      Hi BullyBob,
                      Thanks for your suggestions. I have always tried to keep from using external packages to hold assets. This just makes it easier to distribute, plus less of a chance of somebody modifying an asset for their map and causing problems for everyone else when they load it onto a server. With that said, I am trying to keep everything in one file. I am just using the external package as a place to store all of my assets until needed.

                      Comment


                        #12
                        Originally posted by aCruceSalus View Post
                        I can't just load one of my maps in the editor and then load my new map and expect the materiasl and meshes to still be there.
                        This no longer works the same as UT2004 since there is no common "myLevel" alias name.

                        Originally posted by BullyBob View Post
                        Launch the Editor twice, load a different map into each, and then copy and paste between the two maps.
                        Most assets cannot be copied this way. Only minimal stuff that supports copy/paste as t3d, etc. will work like this.


                        Originally posted by Nawrot View Post
                        Duplicate all resources you want, save that package as something, then load other map and open that package you just saved.
                        This is the way that you do it.

                        Originally posted by BullyBob View Post
                        If I sellect all of the Textures, Materials, Meshes and such from MyPackages and select duplicate, It will indeed duplicate everything over. The problem is now I have to go into every single Material and change the Texture references from MyPackages to DM-MyMap2.
                        Don't Duplicate to get them into the second map...
                        You use Duplicate to copy them from Map #1 to the temporary package, but then Rename them from the temporary package to Map #2. Just be sure to not save the temporary package when you exit if you wish to keep it intact.
                        Duplicate does a simple copy, Rename changes the name and creates redirector references.

                        Note that you will also most likely have to run the "fixupredirects" commandlet after this process since there will be redirectors to the temporary package for certain asset types.

                        What I do instead is maintain a clean organized library of meshes and textures and import those as needed into each map, then for things like Materials I use the Copy/Paste in the Material Editor. This bypasses the redirector issues.

                        IMHO the redirector was not a good idea of implementation in the engine.
                        Previous engine builds had an option on Rename to ignore the redirector which worked perfect for transferring multiple assets from package to package, but that appears to have been removed on later engine builds.

                        Comment


                          #13
                          Thanks DGUnreal. The crashing issues I was having after renaming my assets into my map were caused by redirector issues. It took me several tries to find the culprit, but I found the problem Texture/Material. I can now save my map and close the editor knowing that when I try to load my map again the editor won't crash.

                          Comment


                            #14
                            THANK YOU BullyBob you saved my day/night with that big post!!
                            That clears it up about those nasty references...

                            Comment

                            Working...
                            X