How to save & restore materials ?
I have a scene open with a nice floor material to be used in a different scene.
So I select the floor's surface group with Surface Selection Tool. Then I pick File/Save As/ Material Preset and deselect everything except for the surface group I am interested in. I save this in My Daz Library folder and open up the new scene. After selecting the surface material to be replaced I double-click on my saved material preset in the Content Library and... absolutely nothing happens. What's going on?
Comments
Looks like the material preset stores the name of the surface group it came from.
Is there any way to make it be agnostic to the source name and just apply to whatever I have currently selected ?
Save it as a Shader Preset instead of a Materials Preset, that has no surface name parameters, so it's applicable to anything.
The only gotcha is that you can't apply a Shader Preset to a surface that already has a different shader applied to it. E.g. if the material you save uses the D|S Default, UberSurface, HSS, AoA Subsurface shader etc, any surface you apply your saved file to must have the same shader base applied first, otherwise the extra parameters will be ignored. To check what's which, select the surface and look at the top of the Surfaces pane, it'll tell you there which shader is used.
Thank you!
Still looks like an oversight that the material enforces the surface name. :(
However, a material preset is different to a normal material. As mentioned above, it's possible to remove the restriction and create materials which can apply to any selected surface.
Material presets and shader presets serve two different purposes. Material presets can apply a collection of materials to all the different surfaces on an object, using the names of the surfaces to determine which material gets applied to each. Shader presets can be applied to any surface, but that means you need to select each surface you want it applied to.
That's exactly what I was looking for and it worked!
SpottedKitty mentioned that you have switch Shaders first before loading the Shader Preset. That's what I found disappointing. However, in my test I did NOT have to do that. I selected a surface with DAZ Default Shader and loaded a Caustic Glass shader from the preset. It switched shader + shader properties on the selected surface. :D
Where's the Caustic Glass setting from?
Another problem is, there's a lot of fuzzy terminology running around — and one of the biggest culprits are the shaders. Many of them aren't actual Shaders, they're Shader Presets; they don't change the actual shader used on a surface, only applying a Materials setting will do that, but they do apply values to all the existing surface parameters. Does the shader name at the top of the Surfaces pane change when you apply the setting? If it doesn't, then what you applied was a Shader Preset.
grubertm, while it APPEARS you are allowed to apply a preset from one shader to another, the problem is that because the shaders are different, it won't actually duplicate the shader. It will copy some settings; for example if both shaders have a "diffuse color" parameter, that part will get copied. But the surfaces will (or can) still look quite different due to the differences between the two shaders. Therefore, normally you don't actually want to do this. (obviously if you are happy with the results, even they are different in some way you can't see, that may be fine for what you are doing.)
Yep, the shader name changed when I loaded my saved Shader Preset -in my case from DAZ Default to that Caustic Glass one I mentioned earlier (Shader Mixer/Glass).
This is with version 4.6.3.52 if you want to give it a try.
Ah, that's it! You didn't mention you were using a Shader Mixer setting, they're a special case. I've never actually used any of the Shader Mixer presets that came with D|S's free content, that's why I didn't recognise it.