Consolidate Duplicate Objects??

As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

Any thoughts?

Comments

  • DartanbeckDartanbeck Posts: 21,543

    Unfortunately, no. However, another way to do it would be to load in all of the vehicles needed for the scene and, before moving them around, delete all of the wheels but the one. Then Remove unused Masters > Remove Unused Objects, then duplicate the wheel to each vehicle and save the set of vehicles. While it may sound like a pain in the tush... it wouldn't have to be - especially if most of the vehicles axles could line up in the same xyz space. 

  • I know only a little about Carrara's vertex modeller but I started to notice in Hexagon that making duplicates caused a clone symbol to appear beside the objects in the Scene window.  When editing one of the clones the others were affected as though there was one master instance.  Up until then I had been using the duplicate with symmetry tool to make copies of things and these were all new objects rather than clones.

    Perhaps there is something similar in Carrara?  Using Ctrl-D gave me the duplicates/clones in Hexagon.

  • DartanbeckDartanbeck Posts: 21,543

    Yup. Ctrl+D = Duplicate, and if we set out to modify any of the duplicated items, we get the option to modify ALL duplicates, or to make THIS one into its own separate item. I love these features and use them a LOT. I believe that, in Carrara, Duplicate with symmetry is still a duplicate instead of a separate entity. But we can separate any duplicated item from the rest simply by modifying one - or even just pretending to modify one just to bring up the option dialog, then not make any modifications - sweet! 

  • 3DAGE3DAGE Posts: 3,311

    Autodesk 3d max had a function called x reference, or X-ref, X-copy, something like that,. where you could create a model,. say a wheel,. save that scene file,. then reference that model within another scene,.

    so you would create a scene with multiple vehicles all referencing the same wheel from a single scene file,. without a wheel model in your scene.

    likewise, the vehicles or other objects could also be referenced from other saved scenes, and you can select individual assets within a larger scene,. to be X-referenced in you're scene.

    if you edit the original model,. then all it's X-references in other scenes will change.

  • DartanbeckDartanbeck Posts: 21,543
    3DAGE said:

    Autodesk 3d max had a function called x reference, or X-ref, X-copy, something like that,. where you could create a model,. say a wheel,. save that scene file,. then reference that model within another scene,.

    so you would create a scene with multiple vehicles all referencing the same wheel from a single scene file,. without a wheel model in your scene.

    likewise, the vehicles or other objects could also be referenced from other saved scenes, and you can select individual assets within a larger scene,. to be X-referenced in you're scene.

    if you edit the original model,. then all it's X-references in other scenes will change.

    Could you code up a plugin for us that does that in Carrara?

    Please?

    Wow... what a great feature to have!

    Although I really have to repeat myself again here... I really love what Carrara does for me already... I just love it!

    But, 3DAGE, once you make that plugin... just think of how much more lovin' we'll get from this software masterpiece!!!

  • PhilWPhilW Posts: 5,145

    Unfortunately, no. However, another way to do it would be to load in all of the vehicles needed for the scene and, before moving them around, delete all of the wheels but the one. Then Remove unused Masters > Remove Unused Objects, then duplicate the wheel to each vehicle and save the set of vehicles. While it may sound like a pain in the tush... it wouldn't have to be - especially if most of the vehicles axles could line up in the same xyz space. 

    Yes, thanks for the input, but actually the issue I have is not wheels on vehicles, it was just easier to use that as an example, and the meshes don't share the same location on each object, so that would involve hundreds of items to reposition - which is really what I was trying to avoid!

  • PhilWPhilW Posts: 5,145
    3DAGE said:

    Autodesk 3d max had a function called x reference, or X-ref, X-copy, something like that,. where you could create a model,. say a wheel,. save that scene file,. then reference that model within another scene,.

    so you would create a scene with multiple vehicles all referencing the same wheel from a single scene file,. without a wheel model in your scene.

    likewise, the vehicles or other objects could also be referenced from other saved scenes, and you can select individual assets within a larger scene,. to be X-referenced in you're scene.

    if you edit the original model,. then all it's X-references in other scenes will change.

    That would be really useful in this case, but sadly, I don't think there is anything like that for Carrara.

  • DartanbeckDartanbeck Posts: 21,543

    I know you were just using a wheel as an example, but in that example we could make a sort of uniform chassis onto which we place various shape vehicle bodies, then make a universal wheel which fits directly onto one side of one axle.

    Eventually getting to a point where we have a whole 'box' full of vehicles of different colors, with only one chassis and one wheel mesh and a few bodies and a few shaders. The box and it's contents are invisible and we duplicate out of the box to add vehicles into the scene, and make them visible as we do. (?)

    I'm doing stuff like that for some of my own Scene Builder things.

  • TangoAlphaTangoAlpha Posts: 4,584
    PhilW said:

    As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

    Any thoughts?

     

    I was thinking about that when saving out individual props for my crime lab set. A lot of props got used in more than one room, and loading them individually or even room by room would end up with lots of duplicate objects. The only real solution I came up with was to set up the props for the whole building and save them out as a single preset. That way there would only be one master for each object. I didn't find a way to consolidate multiple master copies into a single master. (Score 1 for DS in that respect.)

  • cdordonicdordoni Posts: 583

    Maybe Inagoni's Replica might work?

  • DartanbeckDartanbeck Posts: 21,543
    cdordoni said:

    Maybe Inagoni's Replica might work?

    Yes, kind of along the lines I was mentioning duplication, but not in merging like mesh, auto-parsing the leftovers.

    BTW... although I know very little of what Replica does... I do know that it freaking rocks. I love how my Carrara has evolved after acquiring the plugins I do have. ;)

  • DartanbeckDartanbeck Posts: 21,543
    PhilW said:

    As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

    Any thoughts?

     

     I didn't find a way to consolidate multiple master copies into a single master. (Score 1 for DS in that respect.)

    We can do it as long as the master stays in the scene - then we can get by using only one.

  • TangoAlphaTangoAlpha Posts: 4,584

    But we still can't load a second instance from the browser (say) and consolidate it into the existing master. This is the issue. It's a replicator's 'convert to real instances' in reverse.

  • PjotterPjotter Posts: 274
    PhilW said:

    As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

    Any thoughts?

    Maybe I am missing something? Use CTRL + D. It makes unlimited copied from one object and you can move them wherever you want.

  • PhilWPhilW Posts: 5,145

    I know you were just using a wheel as an example, but in that example we could make a sort of uniform chassis onto which we place various shape vehicle bodies, then make a universal wheel which fits directly onto one side of one axle.

    Eventually getting to a point where we have a whole 'box' full of vehicles of different colors, with only one chassis and one wheel mesh and a few bodies and a few shaders. The box and it's contents are invisible and we duplicate out of the box to add vehicles into the scene, and make them visible as we do. (?)

    I'm doing stuff like that for some of my own Scene Builder things.

    I actually do something similar with the Lo-Poly vehicles that I did for Night & Day City, using the Instance Randonizer to change body color and turn parts on and off, to give lots of different looks from the same base model.

  • PhilWPhilW Posts: 5,145
    Pjotter said:
    PhilW said:

    As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

    Any thoughts?

    Maybe I am missing something? Use CTRL + D. It makes unlimited copied from one object and you can move them wherever you want.

    Yes, I understand that and refered to it in my original posing of the issue.  To use my vehicle example again, if I made 36 vehicles all in the same scene, then I could indeed use Duplicate to have just one master wheel and move and rotate (and scale if required) that to fit each vehicle.

    That is not the situation I have. It is like I have separately modelled and saved 36 vehicles, each of which have the same wheel model. Now if if I want to build a street scene with each model included, when I load each model in, the wheel comes in as a separate model each time - it will be duplicated for each of the 4 wheels, on the saem vehicle, but each time I load another vehicle, it will load another master object for the wheel, it has no way of knowing that it is the same model, and there isn't a function that I can use to check for duplicate models and merge them, in the same way that I can do for shaders.

    I think the only way will be to use Inagoni's Swap plugin (or just re-do it with duplication) but this will mean doing over a hundred operations, which is what I was trying to avoid. Sawp only works at the instance level rather than the Master level, so you can't swap the master, you need to do it for each instance.

  • TangoAlphaTangoAlpha Posts: 4,584
    Pjotter said:
    PhilW said:

    As you know, there is a function in Carrara to Consolidate Duplicate Shaders. Does anyone know how to do something similar for Objects?  I know that you can use Duplication and Replication wiithin a scene, but what I am thinking of is when the same component has been used in a number of different saved objects. Let's use wheels on a vehcle as an example. You made a nice wheel, probably saved it as an object. You've then used this wheel as a part of several different vehicles and saved them individually as you completed them. When you come to put them all in a scene, the wheel model is loaded multiple times, once for each vehicle model that you loaded. But they are all the same, and the scene could be made much more efficient by using the one Master object for all of the instances, but as far as I know, there isn't a function that will do this.  The only thing I can think of is Swap by Inagoni, but you would need to do this one at a time for each instance.

    Any thoughts?

    Maybe I am missing something? Use CTRL + D. It makes unlimited copied from one object and you can move them wherever you want.

    The issue is not creating new duplicates of an object, it's taking a scene that contains multiple masters of the same object and consolidating them into one. How they got that way doesn't really matter (could be you accidentally clicked Create New Master when opening the vertex room, or you imported a prop grouping from your browser tray, or you clicked Create Real Instances from a replicator. Doesn't really matter).

  • PjotterPjotter Posts: 274
    PhilW said:

    Yes, I understand that and refered to it in my original posing of the issue.  To use my vehicle example again, if I made 36 vehicles all in the same scene, then I could indeed use Duplicate to have just one master wheel and move and rotate (and scale if required) that to fit each vehicle.

    That is not the situation I have. It is like I have separately modelled and saved 36 vehicles, each of which have the same wheel model. Now if if I want to build a street scene with each model included, when I load each model in, the wheel comes in as a separate model each time - it will be duplicated for each of the 4 wheels, on the saem vehicle, but each time I load another vehicle, it will load another master object for the wheel, it has no way of knowing that it is the same model, and there isn't a function that I can use to check for duplicate models and merge them, in the same way that I can do for shaders.

    I think the only way will be to use Inagoni's Swap plugin (or just re-do it with duplication) but this will mean doing over a hundred operations, which is what I was trying to avoid. Sawp only works at the instance level rather than the Master level, so you can't swap the master, you need to do it for each instance.

    Can't you import the car's without wheels > import one wheel > duplicate?

  • DartanbeckDartanbeck Posts: 21,543

    The issue is that the wheels are saved with the vehicles rather than as a separate file. Just delete the wheels from all the vehicle files and load them in as a separate file.

    But only do it like that at first - during the creation stage. So that, when you'r building a preset with thirty vehicle, it only loads in one duplicated whel in the end. But if the user adds more vehicles, that's where they might get more. But it could be easily explained in the instructions that we can build an entire scene with only one wheel if one loads in THIS preset and then uses duplicate to create more vehicles, rather than loading more from the browser.

    Using the existing InstaCity as an example, there are those nice blocks of traffic. Something like that could be created with only one wheel in the whole file and only one version of each main shape of vehicle body. Then if the end user wants more cars, they could load them from the browser, but if, instead, they duplicated from those already in the scene, they'd continue to enjoy the presence of only one wheel.

  • PhilWPhilW Posts: 5,145
    Pjotter said:
    PhilW said:

    Yes, I understand that and refered to it in my original posing of the issue.  To use my vehicle example again, if I made 36 vehicles all in the same scene, then I could indeed use Duplicate to have just one master wheel and move and rotate (and scale if required) that to fit each vehicle.

    That is not the situation I have. It is like I have separately modelled and saved 36 vehicles, each of which have the same wheel model. Now if if I want to build a street scene with each model included, when I load each model in, the wheel comes in as a separate model each time - it will be duplicated for each of the 4 wheels, on the saem vehicle, but each time I load another vehicle, it will load another master object for the wheel, it has no way of knowing that it is the same model, and there isn't a function that I can use to check for duplicate models and merge them, in the same way that I can do for shaders.

    I think the only way will be to use Inagoni's Swap plugin (or just re-do it with duplication) but this will mean doing over a hundred operations, which is what I was trying to avoid. Sawp only works at the instance level rather than the Master level, so you can't swap the master, you need to do it for each instance.

    Can't you import the car's without wheels > import one wheel > duplicate?

    Yes I can, but the particular scene that I have in mind, I would need to do this hundreds of times and move the objects into place each time - it is actually more complex than the car example in that the instances are not in a regular orientation and position as they would be for cars, I was simply using this as an example to illustrate the problem. I was trying to see if anyone had any clever ideas to shortcut this process.

  • PjotterPjotter Posts: 274
    PhilW said:

    Yes I can, but the particular scene that I have in mind, I would need to do this hundreds of times and move the objects into place each time - it is actually more complex than the car example in that the instances are not in a regular orientation and position as they would be for cars, I was simply using this as an example to illustrate the problem. I was trying to see if anyone had any clever ideas to shortcut this process.

    We have clever ideas. But everytime we have an idea you say it is more complicated.

    Maybe the surface replicator? A while ago I needed groups of trees on a surface. Added a plane underneath the visable surface and made several shader domains (the same name) on that plane and used these for planting the trees. For one tree, I made the shading domain smaller. With the parameters / settings I played till I had it as I liked it. (I think I did it like that.)

  • PhilWPhilW Posts: 5,145

    I need more precise placement than a surface replicator would provide - and I am talking about dozens if not hundreds of surfaces and certainly hundreds of objects to place. No-one has actually come up with a solution to the problem that I posed - ie. a way to consolidate multiple master objects which are the same, short of starting again. While I welcome everyone's input, and without wishing to offend anyone, the suggestions have been along the lines of "I wouldn't start from here".  But I am where I am with this particular scene.  Looks like I will just have to bite the bullet and duplicate everything from scratch if I am to streamline the scene.

  • cdordonicdordoni Posts: 583

    Others have pointed out that Carrara file is a text file, perhaps "search and replace" might work?

    I suppose you could create a file with just your single object to compare to an otherwise empty file. Then you would have to find how defining it as a Master would be different that using copies of the object.

  • PhilWPhilW Posts: 5,145
    cdordoni said:

    Others have pointed out that Carrara file is a text file, perhaps "search and replace" might work?

    I suppose you could create a file with just your single object to compare to an otherwise empty file. Then you would have to find how defining it as a Master would be different that using copies of the object.

    Thanks for that idea. I'm no expert in editing files, but there might be something there that I can try!

Sign In or Register to comment.