Inkscape: realistic lighting and shading

Graphics have never been my force, so i decided to close this gap.
After learning the basics of Inkscape and SVG, i’m trying to give more “reality” to my drawings.
I have a circle which i want to make appear as a realistic sphere.
After following this tutorial and playing with gradients and blurs, this was the result:

I think cast shadow can be longer, but that won't get it any closer to my idea

What i want is mainly a polished surface, or even if the matter has the same consistency as it is, at least an improved border. How to do it? Thank you.


This answer is rewritten because it contained much clutter which was gradually fixed due the given comments. In addition Inkscape 1.0 works a little better than older versions. The comments are now obsolete. The older revisions are readable and the comments are valid for before 2021 versions.

Draw a plausible greyshade sphere by applying a radial gradient to a circle. Make also a duplicate of the circle and fill it with solid color:

enter image description here

Place (align or have point snaps ON) the grey version above the colored version. Let the grey version have blending mode = Luminosity.

enter image description here

You can as well have the colored version on top and let it have blending mode = Color. The result is the same.

The white area can present a gloss which is too bright to be shown as colored in the RGB system. If you want the brightest area as colored you cannot have full white in the gradient. Or you can if the used blending mode is = Multiply.

In the next version the blending mode is still = Luminosity, but the bright spot is substantially darker. The colored version in the bottom has got a brighter color to compensate the darkening:

enter image description here

There’s another answer which doesn’t use blending with grey gradient for shading, the gradient contais all needed colors. That, of course, gives the best control, but you cannot experiment easily with different colors nor use imported images as surface color.

The shadow can be made as blurred grey or black ellipse. Here’s 2 elementary versions:

enter image description here

Placing the shadow and coloring it realistically is as tricky as creating the shading of the sphere. The shadow must be in accordance with the direction of the light, how the light is projected (=does it generate sharp shadow edges and is it uniform) and how much there’s diffuse ambient light. I skip the details.

I guess you may want glossy reflections. Making them needs an assumption of what’s around the sphere. Some cliches like a curved window or ellipse, of course, can be drawn quite easily, but there can be more. They are beyond the scope of this answer.

Photos as surface

enter image description here

You must import an already spherically distorted photo as PNG with transparent background. Then you use it as the color. Inkscape works in 2D, it has no idea how a photo should be distorted for right 3D geometry appearance.

Source : Link , Question Author : Daniele Squalo , Answer Author : user287001

Leave a Comment