Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

I want the same face color for a 3D Polygon when viewed from front or back or from any angle. i.e. I want the color not changed under any conditions. Front and back.

According to help

Mathematica graphics

And in typical Mathematica documentation fashion famous for being so brief, there is no example or help to explain how and what syntax this is supposed to mean, leaving it to the user to try different syntax. What does outside of FaceForm mean?? How to define a color for use with FaceForm outside of FaceForm ?

Here is a MWE

Graphics3D[
 {FaceForm[LightBlue],
  Polygon[{ {0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]
  }
 ]

Mathematica graphics

Once I rotate it to see the other side, I get

Mathematica graphics

Here is another example, where I like all face colors to be the same

Graphics3D[
 {FaceForm[LightGray],
  Polygon[{ {0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}],
  Polygon[{ {-1, 0, 0}, {-1, 1, 0}, {-1, 1, 1}, {-1, 0, 1}}],
  Polygon[{ {0, 0, 0}, {0, 1, 0}, {-1, 1, 0}, {-1, 0, 0}}],
  Polygon[{ {0, 0, 1}, {0, 1, 1}, {-1, 1, 1}, {-1, 0, 1}}]
  }
 ]

I might need another option here to fix the color? I tried Opacity and Specularity and few other things, but nothing has worked.

Version 9.01 on windows.

share|improve this question
2  
You need Lighting->"Neutral" and FaceForm[Glow@LightGray]. –  Kuba Sep 3 '13 at 4:59
    
@Kuba thanks. I can't get it to work. Graphics3D[{Lighting -> "Neutral", FaceForm[Glow@Blue, Glow@Blue], Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]}] and Graphics3D[{Lighting -> "Neutral", FaceForm[Glow@Blue], Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]}] –  Nasser Sep 3 '13 at 5:48
    
Put Lighting as an option for Graphics. –  Kuba Sep 3 '13 at 6:00
    
@Kuba it is still not working: Graphics3D[ { FaceForm[Glow@Blue, Glow@Blue], Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}] }, Lighting -> "Neutral" ] I also tried Lighting -> "Neutral" inside. –  Nasser Sep 3 '13 at 6:04
    
Ah, yes, try Graphics3D[{FaceForm[Glow[Blue]], Black, Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]}, Lighting -> "Neutral"], but don't ask me why there is this Black ask Jens under the answer :) –  Kuba Sep 3 '13 at 6:08
add comment

marked as duplicate by Kuba, m_goldberg, halirutan, Sjoerd C. de Vries, Artes Sep 3 '13 at 11:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 4 down vote accepted

Your problem, as Kuba points out, is with the default lighting of 3D objects. I believe the following will give you what you are looking for.

Graphics3D[{
  FaceForm[RGBColor[.5, .65, 1.]], Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]},
  Lighting -> {{"Ambient", White}}]

Although I have never been fond of the default lighting, I believe it is designed to bring out the surface details in surfaces plotted with Plot3D.

3DGraphic.png

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.