I want to apply Lighting
to some ListPlot3D
s with Texture
applied, but it's not taking as it does with Plot3D
. As an example,
p[x_, y_] := PDF[MultinormalDistribution[{25, 25}, {{25, -12.5}, {-12.5, 25}}], {x, y}];
(* too dark *)
Plot3D[p[x, y], {x, 0, 50}, {y, 0, 50}, PlotPoints -> 50,
PlotStyle -> Blend[{Blue, Red}, 0.5], ViewPoint -> {-1.8, -2.2, 1},
AxesEdge -> {{-1, -1}, {-1, -1}, {-1, 1}}, PlotRange -> {0, All},
MeshFunctions -> (Sqrt[#3] &), Mesh -> 50]
(* better with Lighting *)
Plot3D[p[x, y], {x, 0, 50}, {y, 0, 50}, PlotPoints -> 50,
PlotStyle -> Blend[{Blue, Red}, 0.5], ViewPoint -> {-1.8, -2.2, 1},
AxesEdge -> {{-1, -1}, {-1, -1}, {-1, 1}}, PlotRange -> {0, All},
MeshFunctions -> (Sqrt[#3] &), Mesh -> 50, Lighting -> "Neutral"]
Yet if I do the same on my Texture
d ListPlot3D
, it doesn't work:
texture =
ListDensityPlot[Table[0.5, {y, 0, 50}, {x, 0, 50}], Mesh -> None,
InterpolationOrder -> 0, Frame -> False, PlotRangePadding -> None,
ImagePadding -> None, ColorFunction -> (Blend[{Blue, Red}, #] &),
ColorFunctionScaling -> False];
(* too dark *)
ListPlot3D[Table[p[x, y], {y, 0, 50}, {x, 0, 50}],
DataRange -> {{0, 50}, {0, 50}}, PlotStyle -> Texture[texture],
TextureCoordinateFunction -> ({#1, #2} &),
TextureCoordinateScaling -> True, PlotStyle -> cf[0.5],
ViewPoint -> {-1.8, -2.2, 1},
AxesEdge -> {{-1, -1}, {-1, -1}, {-1, 1}}, PlotRange -> {0, All},
MeshFunctions -> (Sqrt[#3] &), Mesh -> 50, Lighting -> "Neutral"]
I tried Glow
as in this answer but it wasn't looking great.
Any way to mix Texture
and Lighting
?