# How to impose golden color on 3D object with flat surface?

I would like to have a 3D object with a golden color as in the attached image, how can I create such color and edges in Mathematica?

Here is my try

    Graphics3D[{Specularity[Gray, 1], EdgeForm[None], Orange,
Lighting -> "Neutral", Opacity[0.95],
Cuboid[{0, 0, 0}, {6, 1.2, 1.3}]}, Boxed -> False,
ViewPoint -> {2, 0.2, 1}, PlotRange -> {{-2, 6}, {-2, 2}, {-2, 2}}]


• MaterialShading["Gold"] Commented Oct 4, 2021 at 8:22
• Related Commented Oct 4, 2021 at 8:29

We can add custom settings to MaterialShading, use non default Lighting, and add a rounding radius to our block. The various settings in MaterialShading can be changed to give different effects:

massoc =
Association[{"BaseColor" -> RGBColor[1., 0.75, 0., 1.],
"SpecularColor" -> GrayLevel[1], "MetallicCoefficient" -> 0.8,
"RoughnessCoefficient" -> 0.5, "AmbientExposureFraction" -> 1.,
"SpecularAnisotropyCoefficient" -> 0.3}];

r = 0.05;
{c1x, c1y, c1z} = {0, 0, 0} + r;
{c2x, c2y, c2z} = {6, 1.2, 1.3} - r;
faces = Polygon[{
{{c1x, c1y - r, c1z}, {c2x, c1y - r, c1z}, {c2x, c1y - r, c2z}, {c1x, c1y - r, c2z}},
{{c1x, c2y + r, c1z}, {c2x, c2y + r, c1z}, {c2x, c2y + r, c2z}, {c1x, c2y + r, c2z}},
{{c1x, c1y, c2z + r}, {c2x, c1y, c2z + r}, {c2x, c2y, c2z + r}, {c1x, c2y, c2z + r}},
{{c1x, c1y, c1z - r}, {c2x, c1y, c1z - r}, {c2x, c2y, c1z - r}, {c1x, c2y, c1z - r}},
{{c1x - r, c1y, c1z}, {c1x - r, c2y, c1z}, {c1x - r, c2y, c2z}, {c1x - r, c1y, c2z}},
{{c2x + r, c1y, c1z}, {c2x + r, c2y, c1z}, {c2x + r, c2y, c2z}, {c2x + r, c1y, c2z}}
}];
tubes = Tube[{
{{c1x, c1y, c1z}, {c2x, c1y, c1z}}, {{c1x, c1y, c1z}, {c1x, c2y, c1z}}, {{c1x, c1y, c1z}, {c1x, c1y, c2z}},
{{c2x, c2y, c2z}, {c1x, c2y, c2z}}, {{c2x, c2y, c2z}, {c2x, c1y, c2z}}, {{c2x, c2y, c2z}, {c2x, c2y, c1z}},
{{c1x, c2y, c1z}, {c2x, c2y, c1z}}, {{c2x, c1y, c1z}, {c2x, c2y, c1z}}, {{c2x, c1y, c1z}, {c2x, c1y, c2z}},
{{c1x, c1y, c2z}, {c2x, c1y, c2z}}, {{c1x, c2y, c2z}, {c1x, c2y, c1z}}, {{c1x, c2y, c2z}, {c1x, c1y, c2z}}
}, r];

Graphics3D[
Boxed -> False,
Lighting -> "ThreePoint",
ViewPoint -> {2, 0.2, 1},
ViewVertical -> {0, 0, 1}
]


Needs["OpenCascadeLink"];
shape = OpenCascadeShape[Cuboid[{0, 0, 0}, {3, 1, 1}]];
Show[bmesh[
"Wireframe"[
"MeshElementStyle" ->
Directive[EdgeForm[],
Lighting -> "Standard"]


Edit

Test another solids.

Clear["*"];
Needs["OpenCascadeLink"];
bmesh[solid_, l_ : .05] := Module[{shape, fillet, bm},
Show[bm[
"Wireframe"[
"MeshElementStyle" ->
Directive[EdgeForm[],
Lighting -> "Standard"]
];
solid1 = PolyhedronData["Cube", "Polyhedron"];
solid2 = PolyhedronData["Dodecahedron", "Polyhedron"];
solid3 = TruncatedPolyhedron[Icosahedron[], 1/3];
solid4 = AugmentedPolyhedron[Dodecahedron[]];
bmesh[solid2, .05]


From version 12.3 on, there is a new graphics directive called MaterialShading for various materials.

Graphics3D[{MaterialShading["Gold"],
Cuboid[{0, 0, 0}, {6, 1.2, 1.3}]}, Boxed -> False]


However, you will probably have to play around with different lighting settings to achieve a similar result as in the photo.

• Respectfully, using MaterialShading["Gold"]` doesn't appear to work when applied to flat surfaces. You'll note that all of the samples shown in the MaterialShading link apply to non-flat surfaces. I think the OP will need to look into the application of textures or possibly create some kind of irregular surface to achieve their end. Commented Oct 5, 2021 at 0:04
• @Jagra, thanks a lot for the hint, I was trying to play around with lighting as suggested in the answer but could not achieve the desired results. However, for non-flat surfaces, it is working like magic. Hope someone can provide a workaround. Commented Oct 5, 2021 at 6:05
• @valarmorghulis Another hint is that because of how graphics work, a single triangle will only interpolate between 3 colours (3 vertices). Each face of the cuboid is broken down into two triangles. Thus we can't have realistic-looking shading. The usual solution to this is to discretize the cuboid and let each face be made up of many small triangles. I had an answer on this site which shows how but can't find it now, and no time at this moment. Commented Oct 5, 2021 at 8:31
• Thanks, @Szabolcs for the hint, kindly if you find the respective answer share the link, please. Commented Oct 5, 2021 at 11:38