Custom Preview Shinyness when using create material (BUG ?)

Hello @Joseph_Oster,
I have a little script that allows me to have some Shininess and Reflexion. As you program it will be easy for you to tweak it if necessary. I have already published it here in this forum and I am quite sure it is from David Rutten code.

    Reflection = Math.Min(Math.Max(Reflection, 0), 1);
    Smoothness = Math.Min(Math.Max(Smoothness, 0), 1);
    Rhino.DocObjects.Material material = new  Rhino.DocObjects.Material();
    //material.SetBitmapTexture(fileName);
    material.ReflectionColor = Colour;
    material.DiffuseColor = Colour;
    material.AmbientColor = System.Drawing.Color.Black;
    material.EmissionColor = System.Drawing.Color.Black;
    material.Reflectivity = Reflection;
    material.ReflectionGlossiness = Smoothness;

    var renderMaterial = Rhino.Render.RenderMaterial.CreateBasicMaterial(material);
    Mat = new GH_Material(renderMaterial);


material.gh (5.5 KB)

P.S. : from your question I understand you now use R6. It is good for the forum that you joined.

1 Like