Functional Material Names and Material Styles
-
gullfo,
You will also want to see our other post:
Replace Materials while keeping the names
Which makes it very to change to color of several materials at once, while retaining the original names.
-
thanks Al! it looks like a nice feature set, but right now what i do is simply use the material replacer script to change out materials enmasse when i'm ready to render and i usually just clone the main working file to do that since i'm tweaking (not twerking ) things specific for the image generation that i do not want on my construction drawings etc.
the issue i raised though is that the name of the material is not observed by SU, only the actual underlying RGB composition. for example you could (in your tool) assign the same A02 color to multiple names in your rendering tool (i can do the same in Kerkythea) but in the native SU i cannot have 2 materials with the same RGB - so for example i cannot use the same gray color to represent all steel items, i have to use variations. when it comes time to render (only a small part of my workflow) i can apply the same color to as many things as i want (and it looks like your rendering tool can as well) but when i need to generate material lists for parts, lumber, sheet materials, steel structure, etc - i cannot because the SU materials are not separated by name (annoying as noted before )
it would be a good feature in your tool to enable unique so your tool would want to create these as true SU materials (and the unique forces a small tweak to the RGB to enable it to be truly unique). -
@gullfo said:
the issue i raised though is that the name of the material is not observed by SU, only the actual underlying RGB composition. for example you could (in your tool) assign the same A02 color to multiple names in your rendering tool (i can do the same in Kerkythea) but in the native SU i cannot have 2 materials with the same RGB - so for example i cannot use the same gray color to represent all steel items, i have to use variations. when it comes time to render (only a small part of my workflow) i can apply the same color to as many things as i want (and it looks like your rendering tool can as well) but when i need to generate material lists for parts, lumber, sheet materials, steel structure, etc - i cannot because the SU materials are not separated by name (annoying as noted before )
it would be a good feature in your tool to enable unique so your tool would want to create these as true SU materials (and the unique forces a small tweak to the RGB to enable it to be truly unique).I must be missing something here???
In this model I place color 0001 on the first component, then renamed it (-A), and then placed the same color on the 2nd component and renamed it to -B.
The two materials both have the same RGB, and both show up in the report.
(I have attached the SKP)
How can I reproduce what you are describing?
Make Unique
We are adding a Make Unique button to our material placer which will take the selected, but not yet placed material and and -01, -02, ... to the name until it has a name which is not yet being used in the model.
If what you say about RGB is true, then we could easily modify the RGB slightly until it became unique as well. But i would like to be able to demonstrate the problem in some way.
-
sorry i should clarify, if you try to load a second material with the same RGB it will revert to the first color with that RGB.
for example, save your two materials to your materials directory, create a new file and add your components, then from your materials window, select the saved -A material and apply it. then try to select the saved -B material and apply it.
so one option to get around this would be to create and save all the materials i want into a model file which is loaded like a component so the materials are on-boarded, just not directly from the materials window. but i don't always want to load all of them, so maybe i need to create material components which are by class of material...
-
I sounds like if our Make Unique function not only made the name unique, but also changed the RGB slightly until is was unique as well, then the materials would stay unique.
I'll try that out.
It also sounds like when you load a component, SketchUp will use existing materials if they are identical to the materials already in the component. That would still be a hassle - since the material colors in the component materials might accidentally match the colors in the model already.
I'll see if the reuse happens even if they component has attributes. If attributes solve the problem, then we can just add a unique (UUID like) attribute to each material when we make it unique.
-
so.. i did create an SU model with a bunch of materials, created some squares to apply them to, and then saved it. opened a new model then added the material file as a component. only the first material to load with that RGB was applied ("used") even though all the materials show in the model... so somewhere SU is looking only at the RGB aspect of the material for applying or displaying - maybe something to improve rendering time... still it would be nice to have it based on name...
-
If you don't mind doing a little more work, lets try this with a minimum amount of materials
- Create a model with just 2 squares.
Apply the same material to them - renaming it as you go so you now have two rectangles with two materials which are identical with different names.
Purge Unused just before saving, and verify that there are only two materials in the saved model.
-
Create a new database, and apply the original, un-renamed material to a rectangle.
-
Load the first model as a component (I was using import for this)
When I am done I have three unique material names.
1 I had just placed and 2 from the component.
(Use list view to see the material names, rather then the colors)
Try my two SKP files: Open
Load 1-rectangle with color.skp, and then import 2-squares with color.skp into it.
It works fine for me. If it doens't work for you, perhaps a rendering package you have loaded, or some other plugin i optimizing the materials for you???
-
interestingly... your files loaded ok. so i disabled all my plugins and used a simple native template, and replicated the idea - but it would not work - still have the missing material issue with adding the 2 squares into the 1 rectangle (my files). but - if i load the 2 squares first and then import the 1 rectangle - i get all 3 materials...
i don't use a built-in rendering tool and as a note all plugins (including SU ones) were disabled and i was using the native Simple template w the person removed and purged...
-
I had the same problem importing your 2-square model.
I noticed that your 2 materials were called Material1 and Material2
I renamed them and saved the model with a new name and imported it and it imported OK.
Do you usually leave the default names on your materials before importing the models as components, or do you rename the materials first?
Try importing this model - which is your model with the materials renamed.
-
that worked. i don't typically leave the name as a default - but - i also don't typically put hyphens in them. i'm wondering if there is something about the names having underscore or hyphens that matter
edit -- so using hyphen or underscore in the name seems to work... creepy coding behind the scenes to not take names without them but i can live with that...
so it appears that if you have materials with only alphanumeric values in the name you get the RGB collision, and if you have (at least) a hyphen or underscore in the name, then you don't get the RGB collision... probably something you'll want to make a note of for your product guide
-
I tried simply renaming them to Material1A and Material1B - no hyphens - and they loaded OK - so simply renaming seems to fix the problem.
Then I renamed them again to Material21 and Material22, and they failed - so it is not just sequential names 1,2,... which fail.
I suspect that SketchUp tries to map it automatically assigned material names, MaterialNNN, to an identical material if found. That makes some sense - since SketchUp might assume that people who create materials and don't change the names don't really care if they get renamed when importing the model as a component.
Thanks for your help on this. It is a lot of work to learn how materials really work.
Rich is working now on a edit box during placement which will make it easy to select a material from the library, rename it and then place it all in one step.
-
very good! i'll try the experiment as well. if so this would be something they should fix soonest as its a real pita.
Advertisement