Author Topic: How to map material / appearance properly  (Read 121 times)

0 Members and 1 Guest are viewing this topic.

Offline IngeniaSupport

  • Newbie
  • *
  • Posts: 7
How to map material / appearance properly
« on: May 03, 2019, 12:49:13 pm »
We are unable to match properly materials in Solidworks to Keyshot.

How are you supposed to name the custom material in Keyshot so they map properly. I have been working on this for the whole week and i have still not figured out why 99% of the material don't work.

Here an example from my latest test.

In Solidworks i create a new material called "Some Plastic"
It's appearance is "blablabla.p2m"
The appearance make reference to an image "PlasticRedMatte.png"

In Solidworks it works #1. everything looks good.
Now when i export to Keyshot the material is not recognized and in
the project material it shows as : "blablabla:255:255:255 (plasticredmatte.png)"
So by that format i understand it is {appearance name}:{Color.R}:{Color.G}:{Color.B} ({texturefile})
Color is default i did not touch it so being white i assume it's fine.

Now to make it work i create a tons of materials in keyshot with name somewhat possible of what it might look for without
any sucess. First i tried simple editing in keyshot in the material list the graph and simply change the color to something else
and saved it without changing the name into my library. Tried creating a new cube and dragging the texture on it and it works.
I closed keyshot and try re-exporting the sample part and it did not map the new texture and still used the png from solidworks.

So i created all these derivations with different colors and none are recognized when exporting that solidworks material :
- "blablabla"
- "blablabla:255:255:255 (plasticredmatte)"
- "blablabla:255:255:255(plasticredmatte)" <- no space
- "Plastic Red Matte"
- "PlasticRedMatte"
- "some plastic"
- "blablabla (plasticredmatte)"
- "blablabla:255:255:255"

How are we supposed to match material X in solidworks put material Y in keyshot.

« Last Edit: May 06, 2019, 05:59:06 am by IngeniaSupport »

Offline RRIS

  • Full Member
  • ***
  • Posts: 205
  • Renze Rispens - industrial designer
Re: How to map material / appearance properly
« Reply #1 on: May 07, 2019, 06:31:41 am »
Question: why even bother applying (visual) materials / textures in Solidworks? It's super limited compared to what you can do in Keyshot and the renders will look at best mediocre compared to Keyshot.

Offline IngeniaSupport

  • Newbie
  • *
  • Posts: 7
Re: How to map material / appearance properly
« Reply #2 on: May 08, 2019, 06:19:00 am »
Question: why even bother applying (visual) materials / textures in Solidworks? It's super limited compared to what you can do in Keyshot and the renders will look at best mediocre compared to Keyshot.

You are probably not doing real world work with Solidworks, probably hobby i guess.

Let me explain how material is extremely important with questions :

How do you get the weight of your part without it ?
How do you get the metal stretching when you bend, roll, punch without it ?
How do you know if your cage suspended under the bridge will fail with FEM without material specifications ?

The answer is that you can't. Material in Solidworks has nothing to do with visual, it's all about physical properties.

The problem is to render keyshot need to map those solidworks material to custom one's made in keyshot.
This is not happening and it's a big problem. We ran some very very very tiny samples with 300-400 part only and we have mapped the material of each part one by one manually and it took half a day.

Now we want to automate that as an example, yesterday i generated an assembly with over 170,000 parts in it and that would take months to manually map each parts material in keyshot. It need to be automatic since there is no way someone will do this manually. We have fully custom automated servers that output at a maximum of 15 to 18 highly complex solidworks parts per seconds. That is around 1.2 millions "sldprt" files per day throughput (that exclude assemblies).

I am not angry or anything, i just want to make it clear it is not used for hobby or simple 3d printing. We have dozens of giant manufacturing robots and cnc worth 6-7 figures behind this. This is for actual business work. Also eventually we need to program and API to automate the camera and animation over those bip project.

Offline RRIS

  • Full Member
  • ***
  • Posts: 205
  • Renze Rispens - industrial designer
Re: How to map material / appearance properly
« Reply #3 on: May 08, 2019, 07:15:18 am »
You guessed wrong, I use Solidworks professionally on a daily basis. Best not make assumptions. Although your situation is a bit on the extreme end.

If I understand you correctly, you have a library of materials in Solidworks and you want Keyshot to match those materials with each fresh scene / import?

Only way I can think of is to make a custom default Keyshot scene where you have a bunch of hidden objects with custom materials that you use in Solidworks.
That way Keyshot will recognise imported geometry as sharing the same material as the hidden geometry in your new default scene and automatically apply the right materials to the imported geometry. I don't know if it would work by simply making a material library.

Maybe there's an easier way..
« Last Edit: May 08, 2019, 07:24:56 am by RRIS »

Offline IngeniaSupport

  • Newbie
  • *
  • Posts: 7
Re: How to map material / appearance properly
« Reply #4 on: May 09, 2019, 11:43:05 am »
There is another way for sure. If i create a simple cube and put one of the many default Solidworks material, let's say "Oak" and export to Keyshot the material in keyshot is some kind of Oak. But that material is NOT the one displayed in solidwork and that is fine, i totally understand. I don't want to waste time playing with solidworks visual side of material that much. All that time should be put toward having the best material finish in Keyshot.

Right now Keyshot use it's own material when it finds one that match by some kind of name. I have some custom material in solidworks that do match but the rest all create new materials with all properties of the one in solidworks. So the final texture is exactly what solidworks show, aka a crappy texture that i don't mind in solidworks but definitely don't want in Keyshot.

We have our own standard in material for working in solidworks and i don't want that to be in keyshot. Like no one use white for cpvc because it's always thought to see when working on a model. We use a pastel blue like color in solidworks even though the real thing is white. I would want my custom blend of cpvc to be my pastel blue in solidworks for work efficiency purpose as usual but once in keyshot i want it to map to the a material i made really white/plastic.


Right now on an empty scene i have 1 material that actually work one of which is a custom copper named "copper" using "copper.p2m" as an appearance which uses "copper.png" as an image and that material map to one in keyshot that is not my texture, it's theirs. Another material as an example is my Brass. Brass is named "Brass" in solidwork and have "Brass.p2m" as an appearance which point to "Brass.png". Brass does not get mapped to the keyshot material also called brass. So i guesses it might be something different so i went sneaky and copy all copper file and rename it to brass for the fun of it and it still doesn't work.

In the end Keyshot seems to have some sneaky way to map the materials. We are trying the default scene trick if it works. The goal would be to make a small assembly with little cubes one with each custom material and use that in the default scene mapped correctly. If it works it's obviously 1,000,000 times easier that manually set all material. I rather set 400-500 material by hand once than couple million each day.
« Last Edit: May 09, 2019, 11:50:23 am by IngeniaSupport »

Offline Sune

  • KeyShot Support
  • Newbie
  • *****
  • Posts: 1
Re: How to map material / appearance properly
« Reply #5 on: May 10, 2019, 02:55:56 am »
I believe our Material Templates can help you.

You can use them to automatically set a KeyShot material to a part based on the source name.

You can read about it in our manual here: https://luxion.atlassian.net/wiki/spaces/K8M/pages/311951636/Material+Templates

Offline IngeniaSupport

  • Newbie
  • *
  • Posts: 7
Re: How to map material / appearance properly
« Reply #6 on: May 10, 2019, 06:58:27 am »
I believe our Material Templates can help you.

You can use them to automatically set a KeyShot material to a part based on the source name.

You can read about it in our manual here: https://luxion.atlassian.net/wiki/spaces/K8M/pages/311951636/Material+Templates

It worked on a small sample i made. The only problem i have with it is that it doesn't automatically apply the rules after an export. I have no human in front on the PC there to click for every time on the menu window / material templates, select the template and click apply to scene.

I have found out something else. When i import the assembly from keyshot the materials works perfectly without templates or anything. The problem is when we use the solidworks plugin it doesn't work. With our API in solidworks i can trigger the export to keyshot plugin but not trigger keyshot import itself the assembly. How can i set parameters to the solidworks keyshot plugin to work exactly like keyshot import menu ?