I'm trying to draw spherical pieces for a game, in WPF. Pieces are drawns as Elipses with RadialGradientBrushs. As you can see below, my black pieces look fantastic, but it is hard to get the white ones having any depth without making them look grey.
I'm currently using:
private readonly Brush _whitePieceBrush = new RadialGradientBrush(Colors.Snow, Colors.Ivory);
private readonly Brush _blackPieceBrush = new RadialGradientBrush(Colors.DarkGray, Colors.Black);
...
using (DrawingContext dc = _piecesVisual.RenderOpen())
{
....
Brush brush = piece.Value.IsBlack ? _blackPieceBrush : _whitePieceBrush;
var pen = new Pen(new SolidColorBrush(Colors.Black), 0.5);
dc.DrawEllipse(brush, pen, new Point(posX, posY), 15, 15);
...
}
The black circles around the white pieces don't help, but with out them, it looks even worse. (If I can find a good way to draw them that looks better, I'll be removing it)
What about something like the following. The focal point is a bit off-center, which i find improves the spatial impression.
<Ellipse Width="60" Height="60">
<Ellipse.Fill>
<RadialGradientBrush GradientOrigin="0.3,0.3">
<RadialGradientBrush.GradientStops>
<GradientStop Color="White" Offset="0"/>
<GradientStop Color="White" Offset="0.3"/>
<GradientStop Color="#FFF0F0F0" Offset="1"/>
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With