Create a sphere without using a gradient?

Post questions on how to use or achieve an effect in Inkscape.
Mosely
Posts: 3
Joined: Tue Jun 21, 2011 2:56 am

Create a sphere without using a gradient?

Postby Mosely » Tue Jun 21, 2011 3:20 am

Forgive me if this is too generic of a question - but here goes...

I'm a writer who uses technical diagrams in pdf manuals. I'm trying to migrate our doc environment to a new system, where XML markup and included SVG diagrams are rendered (using XEP) to PDF. The problem is that XEP does not support gradients and I have hundreds of existing diagrams (EPS - converted to SVG) that contain gradients.

The gradients are always used in one of two cases:

-To create a sphere
-To provide depth to cells in a table

Here is an example of what I'm talking about:

Image

I'm looking for a way to create a sphere, or to give some kind of depth or at least stylize a 2D circle without using gradients (linear or radial). Any help would be greatly appreciated. I'm happy to do the research, I just need a push in the right direction. If I can create a template with some samples, then I can replace the existing spheres.

Thanks in advance.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Create a sphere without using a gradient?

Postby llogg » Tue Jun 21, 2011 5:50 am

Hope this makes sense. No time to do a proper tutorial. Note that if you are also limited to not using blur filters, then you can simply increase the number of interpolation steps dramatically and get a pretty smooth effect.
g5585.png
g5585.png (47.68 KiB) Viewed 1436 times

Mosely
Posts: 3
Joined: Tue Jun 21, 2011 2:56 am

Re: Create a sphere without using a gradient?

Postby Mosely » Tue Jun 21, 2011 7:05 am

Thank you!

Exactly what I'm looking for - unfortunately that didn't *quite* work.

I managed to interpolate, blur, and clip to produce a nice sphere-like image, however the rendering engine (XEP) still removes the gradients between each step of the interpolation, leaving a circle with a relief map-like appearance, all the same color. I'll fiddle around some more with blurring...

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Create a sphere without using a gradient?

Postby llogg » Tue Jun 21, 2011 10:13 am

Yeah, sounds like it won't read the filters correctly. If you just do a ton more interpolation steps you can make it pretty smooth. A good rule of thumb is for a circle n pixels in diameter doing >/= n steps of interpolation will produce a perfectly smooth effect, while somewhere around 0.7n steps should be acceptable.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Create a sphere without using a gradient?

Postby flamingolady » Tue Jun 21, 2011 3:33 pm

I'm just wondering if you could make sphere(s) with the needed various gradients, then export them as pngs and then just keep using these as the base of your diagrams, adding the text as you need it? Is there a reason that wouldn't work?

Mosely
Posts: 3
Joined: Tue Jun 21, 2011 2:56 am

Re: Create a sphere without using a gradient?

Postby Mosely » Tue Jun 21, 2011 11:42 pm

I've thought about doing that as well.

I'm not clear how that would work resolution-wise though? I need to create PDF and HTML versions of these diagrams, and some of these spheres will need to scale to %500 of their size. The idea is that the writers would grab the assets from a single file, copy them into their new diagram, then scale them as they see fit.

At build time, the SVGs are either used in a PDF, or automatically rastered down to a lower resolution .gif.


Return to “Help with using Inkscape”