How on earth can I apply materials to whole models?

Ever since the first time I used sketchup (probably back in the Google days), there was a huge user experience issue, that i have run into again and again during the years:

Applying materials to objects, and group of of objects, with speed.

Here is my use case, which can’t be THAT uncommon:

I want to create a quick design of an interior space, so i download a model from the 3d warehouse. So far so good (more than good actually, this is sketchups key strength).

However, the new model i downloaded, let’s say a sofa, has many materials applied to it.

My expectation:

I want to be able to select the whole model and be able to override all materials at once. I want to switch the whole sofa’s colours quickly so that I can see if it is a good fit for the interior space.

The reality:

I have to dig deep into the model and find the selection that allows me to change the material. This is done by selecting and applying the material iteratively till it gets applied. If it doesn’t work? Too bad, you have to go deeper into the model. It’s not like the ui shows you the correct selection by highlighting the material or anything useful like that.

The fact that this process can take up to a few minutes, per model, is insane to me. Imagine wanting to do this for many models, it can take very long and there is no reason for that.

Please don’t tell me about plugins, this should be a basic feature

If there is a way to change materias on whole objects quickly, please let me know.

On iPad? Not easy.
On Pro? Material Tools and Material Replacer Plugin by Thom Thom.

2 Likes

And remember, free is free. The 3d Warehouse is a Wild West of quality -many models (especially furniture, fixtures, etc.) have been made in other software and imported into SketchUp and uploaded to the warehouse. You will have no rhyme or reason sometimes to the nesting of groups, the hidden entities and the materials.

You want quality and you want it the way you want it? You’ll have to work for it - either create your own components that let you swap things easily, or modify the free stuff you can get…

3 Likes

Wait, this has nothing to do with the warehouse or free or paid models, please don’t derail the conversation.
This has to do with the fact that there is no built in functionality to change a model’s materials at once.
It could be MY model, for which i want to reset the materials for whatever reason, or it could be for paid models. The warehouse part was just an example.

Make a post or edit this one show it shows up in Feature Requests.

just edit the material itself.

if you download a pink sofa and you want it to become a blue sofa, you could spend minutes replacing groups, components and faces with a blue material.
or you could edit the pink material and make it a blue material instead.

6 Likes

It seems to me the answer depends on the amount of nesting, whether the materials have been applied to faces or entire objects, and how many distinct materials are involved. Given the possibility for these factors to combine in various ways, I don’t see a single best solution.

Not only that, it is also important that if you download a model from the 3D warehouse you have not done it and you do not know how they have done it. I think that’s the most delicate thing.

When you add a new component, the materials for it are added to the palette. Delete them and replace with default. The component will now appear white. Then apply any material you want with a single click.

1 Like

Thanks, the default material solution seems to be the only half-decent one, with two important caveats

  1. The default may be used in other models already, and if you want to change the material to something unique for the model in question, there is no avoiding the tedious process.
  2. You may want to keep materials. Remember, it may be the case that you want to swap materials on a model you built, with shared materials across the scene.

I don’t believe the argument about nesting, or the model’s structure is valid either. The most well structured models are actually the worst for this type of process due to the many layers

I never said to modify the default, and of course it’s used in other models. It’s the default for a reason lol.

I said to remove the colors that came in with the model in question so that it’s stripped down to default without so much drilling down and clicking. That is the only way to apply a different material with a single click. This is what you asked for.

1 Like

So import the materials you want and don’t delete them if you want to use them.

It’s important to understand that the “default material” is what is used to color an entity that has no material attached (unless the entity is an object and some entity nested inside it has a material).

2 Likes

This simple Ruby snippet removes all materials used in the model, then assigns a new material to all of the model’s entities and nested objects too…

model = Sketchup.active_model
mats = model.materials
### remove all materials
model.start_operation('Remove-All-Mats', true)
mats.each{|mat| mats.remove(mat) }
model.commit_operation
### add one new material
model.start_operation('Add-New-Mat', true)
m = mats.add('NewMat')
m.color = 'Red'
### or you can do this step manually
### now give material m to all entities
model.entities.each{|e|
  e.material = m
}
### and give material m to all nested entities
model.definitions.each{|d|
  d.entities.each{|e|
    e.material = m
  }
}
model.commit_operation
###

1 Like

+1 on that! I use it all the time for this task. If you have an entire kitchen in birch wood grain and you want to change all occurrences of that with cherry wood grain without changing the stainless drawer pulls, it’s literally two clicks. (or four if there’s two different wood grain directions)

5 Likes

Can you use Ruby on iPad?

No you can’t - but if you limit yourself by your OS/platform/version choice you get what you’ve got - we can’t work miracles…

No Ruby snippets or extensions are worth anything without the appropriate SUp version etc…
So there’s no simple solution to this issue without a major change to his set up.

3 Likes

Agreed, but OP doesn’t want to hear about plugins… only magic I guess.

1 Like

The last several posts simply demonstrate that Ruby and extensions can do a lot more that a cut-down web-based SUp version…
What he wants to do is quite possible with a fuller version of SUp…
The choice is his…

2 Likes

I don’t disagree…

1 Like