Replace materials in scene

Started by andy.engelkemier, June 11, 2020, 07:23:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andy.engelkemier

I'm thinking I'm doing this wrong, or hoping that's the case.
I'm trying to figure out a way to update materials in scene with whatever version of a material is saved in a library. If I update a material while working in Scene A, then open Scene B I want to update that material.

BUT, in my current scene I notice I have multiple materials named the same thing. I've imported bits and pieces from other keyshot files.
For my test I wanted to use a material named Anthrecite. So I saved that to the library. In my material tab I see 2 materials named Anthracite. One is Generic and One is Metallic Paint. Then there are two more with #1 and #2 after them which is more what I would expect.  So I have materials with the name Anthrecite that I want to be replaced with the one from my material library.

So on to Material Templates. I create a new one, with Source Type being Material, Material Reference from Reference Library Materials, and name the source Anthracite, with the new Material being Anthracite.
That should be it right? Apply to scene.
Hmm, nothing happened.

So I tried Anthracit* for the source thinking, maybe it didn't like them to be the same name.
But then I tried applying a completely different material from the library also, and no luck.

I've got to be doing something wrong?

DerekCicero

I am having a little trouble following, but I think I am able to reproduce?

If you create scene 1 and make a multi-material, save it to the library and and apply it, changes to that material inside scene 1 are never seen when you apply the same material in Scene 2 using the Material Templates?

andy.engelkemier

I can't actually get the material template to replace any material, so I gave up for now. Although, we keep making updates to this so it would still be helpful.
I didn't know you could drag a material from the library directly to a material in the materials "bin?" and replace it. So that at least helps.
So for now, I'm linking duplicate materials, then replacing the one left with the matching material from the library.

Are you able to get the material templates to replace Any material from the library to the scene?

Niko Planke

Hello Andy,

I have a suspicion regarding what the problem is.
The Material based Material Templates, uses to the "Original Material" and not the current material in the scene.
The "Original Material" would be the materials name in the original CAD model that was imported.

When selecting a part in the "Scene" Tab you can usually see the "Original Material" in the Parts Properties. (attached is a screenshot of where to find it)

To replace the current material, i believe a script would be the best option.

andy.engelkemier

Awe. Well, that's sad and disappointing. But thank you very much for the answer.

Hopefully this is something keyshot will add in the future, the ability to run that on any Current asset. Often overlooked, is working with someone else, so that original files are often out of your control. Also collaboration in general isn't great (but that's Most software, probably due to how difficult planning for that might be).

richardfunnell

Yeah, I was just chatting with someone about this a few days ago. If you do any sort of unlinking in KeyShot after the import, Material Templates stop being useful.

In an ideal scenario you'd be able to define 100% of your original CAD colors, but it can be unforgiving when you're receiving the CAD from someone else.

People have gotten SUPER excited to see an auto-material-assignment feature in KeyShot but I usually have to explain the limits for source CAD to them :/

andy.engelkemier

I completely agree. Keyshot has some very useful tools, but many of them aren't designed well for just "slapping things together" and then refining later. Clients don't see my workflow, but most of the time spent rendering is probably in Rhino, making sure everything is layered out properly. Parts are split in the right way. Things are named in more cohesive ways, etc. Because if someone gives me an update, AND THEY WILL, keyshot isn't ready for it unless I do all that.
One of the most frustrating things with that is lots of labels on one material. If I have a specific black material, with a specific bump map, and if I get fancier maybe even a spec map, and roughness map. Adding lots of labels you have two choices. Duplicate the material over and over and apply the labels as part. OR apply All the labels to one material using Model.
And that's where you get killed with an update. If you update the model with that, you'll likely have to do all that work again. And if someone changes the material, you have to find every instance of that material and change it.
If someone then adds 7 color options? Yay, if that's client work that's probably more money for you. BUT, that means if you went the part method, and you had 8 labels, you now have to create multimaterials for 8 materials, so you have 56 material. OUCH.
It would be SO awesome if you could reference an existing material in the material graph. And understandably, that may be not the most simple concept if not done right. But basically, I want to add a black material as a reference for an object. Then when I create new labels for other objects, I can do the same thing. This also allows you to stack multimaterials but only have 2 materials. I know, that gets complicated, but it's just one step further than node editors really. You'd see a symbol telling you the material is referenced from the material bin. Double click it to edit the master? That material could also be a multi-material. So my material could have maybe a few materials for the label as a mutlimaterial. Say one white, one silver, and one black. Then My base material is a linked multimaterial. So when I change the base from black with silver text to black with white text, or red with silver text, or red with black text, now I only have to change two multimaterials. The base color, and the version of the text multimaterial label. Studios would no longer have a list of materials 56 materials long. It would just be 2.

Rhino is probably still my favorite for dealing with cad data just because of how fast it is to reorganize things. Fusion deals with fixing certain things Amazingly fast, but organization is crazy slow. And ProE and SolidWorks are crazy expensive, so I try and free up those licenses for engineering even if they were fast. And I'll move over to Blender if I need something unwrapped, but then I've gotta make sure my polygon data is pretty darn solid. Updates there....well, there's no real updating. You've just gotta do whatever it is again.