Hello,
I’m not sure if this is a simple application or not, but what I’d like to do is to have a gradient of opacity (from solid to transparent) based on an attractor point.
In looking for this, I’ve seen a color gradient from an attractor point (see below) but I’d like to do the same with opacity. If possible a combination of a color gradient and the opacity gradient is what I’d like to explore.
My wild guess is that the only way to create transparency is by a material, so I made seperate meshes out of every face and created a corresponding material (color + transparency is based on an attractor point), but the material creation slows the script down.
Thank you! I do get an error message on the C# script. Do you know why I’m getting this? I haven’t been able to figure it out.
I see the following errors:
Error (CS1061): ‘Rhino.DocObjects.Material’ does not contain a definition for ‘ReflectionGlossiness’ and no extension method ‘ReflectionGlossiness’ accepting a first argument of type ‘Rhino.DocObjects.Material’ could be found (are you missing a using directive or an assembly reference?) (line 82)
Error (CS1502): The best overloaded method match for ‘Grasshopper.Kernel.Types.GH_Material.GH_Material(System.Guid)’ has some invalid arguments (line 86)
Error (CS1503): Argument 1: cannot convert from ‘Rhino.Render.RenderMaterial’ to ‘System.Guid’ (line 86)