In our RhinoCommon based plugin for Rhino 8 I would like to set the bump amount for a PBR material. I can successfully set a bump texture but I’m not able to set the bump amount.
I created a Material: var mat = new Rhino.DocObjects.Material();
And finally I created a RenderMaterial: var renderMat = Rhino.Render.RenderMaterial.FromMaterial(mat, doc);
How can I change the bump amount of the PBR material? I tried to set it in all three materials. The PhysicallyBasedMaterial seems to have no bump amount property and I also tried things like renderMat.SetChildSlotAmount("Bump", 50.0, RenderContent.ChangeContexts.Program); without success.
Edit: btw. if you create this PhysicallyBased material from scratch you’ll need to enable the displacement / bump UI section as well. See this post for more information. The best way to find out about the used parameter names is to create a material in the material browser then save it as rmtl file and look inside the xml structure…
@johnc, i think Rhino 8 has a bug. To repeat it, please create a new document with only one physically based material with a bump slot, then run this script: