How can i make gradients like this?

Post questions on how to use or achieve an effect in Inkscape.
RocketTom
Posts: 3
Joined: Sun Aug 24, 2014 8:29 am

How can i make gradients like this?

Postby RocketTom » Sun Aug 24, 2014 8:35 am

Hello i want to make custom sprites but i can't get stock feeling. Please help Image

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can i make gradients like this?

Postby Lazur » Sun Aug 24, 2014 9:08 am

Hi.

Have you tried blurring objects and clipping them?

Hmm maybe not necessary, most of those can be covered by simple radial gradients.

RocketTom
Posts: 3
Joined: Sun Aug 24, 2014 8:29 am

Re: How can i make gradients like this?

Postby RocketTom » Sun Aug 24, 2014 11:23 pm

Thanks! Probly closest i could get:
Image

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How can i make gradients like this?

Postby brynn » Mon Aug 25, 2014 1:28 am

What do you mean by "stock feeling"? Do you mean, like a photo?

Is that generally a cylinder shape? I think the gradient could be improved (still using Inkscape). Sometimes for a complex realistic look, I'll use 2 or sometimes 3 gradients (on a cylinder like that)....well sometimes many, many gradients, depending on the image and goals. As long as you're using plenty of transparency/alpha -- and maybe with more practice, it should be do-able.

Example of realistic image of grapes that I'm working on. So far, approx 160 gradients in the 3 finished grapes and 1 half finished grape.
http://forum.inkscapecommunity.com/index.php?topic=89.0

Here's something more like what you're drawing. The bottle isn't a cylinder, but I guess kind of a :? flattened cylinder There are 7 gradients in the bottle and cap: http://forum.inkscapecommunity.com/inde ... 849#msg849 The front of the bottle has 3 gradients stacked up. The front of the cap has 2. Then there's 1 on the top of the cap and 1 on the stroke that makes the edge of the top of the cap.

Here's the SVG if you'd like to examine how it's made.

shampoo_bottle.svg
(122.33 KiB) Downloaded 165 times

The attached SVG file is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

RocketTom
Posts: 3
Joined: Sun Aug 24, 2014 8:29 am

Re: How can i make gradients like this?

Postby RocketTom » Mon Aug 25, 2014 3:19 am

I wan't to make like those in first image. Also thanks for links they are very useful.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can i make gradients like this?

Postby Lazur » Mon Aug 25, 2014 8:05 am

It's a matter of time.

Here is an example of an energy module part:
SVG Image
-svg, you can download it and check the gradients and blurs-

Thinking it over, it's mandatory to keep in mind the correct sizes.
Though inkscape produces nice vectors, probably it will be displayed at a fixed zoom and/or represented by raster images.
Because of that, anti-aliasing needs special care.
If you want to make it vectors, set up a pixel grid in document's properties (Shift+Ctrl+D) and fit the nodes and gradient steps on that.
(I didn't take care on that in the svg example, would need a complete redo if it was for real.)


Edit:
Looked at my previous works at openclipart I realised there was a similar shading problem:
http://www.inkscapeforum.com/viewtopic.php?f=9&t=15339
That as well could be improved much.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How can i make gradients like this?

Postby brynn » Mon Aug 25, 2014 10:48 am

Lazur,
Unless gradient stops are less than 10 to 15 px apart, I don't understand how having them aligned to even pixel values, or a pixel grid, could create a visible difference.

It must be something like the star vs circle vs true circle issue, where the difference is infinitesimal?

A screenshot perhaps?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can i make gradients like this?

Postby Lazur » Mon Aug 25, 2014 11:03 am

Hmm you are right, gradients are rendered without anti-aliasing.
Thought sharp transitions would be messed up, but it's the other way around.
Even mentioned that with the chrome rail tutorial somewhere, have no idea how I forgot.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How can i make gradients like this?

Postby druban » Mon Aug 25, 2014 10:32 pm

I totally understand that no one really wants to use Gradient mesh since it crashes if you blink wrong, but when it's the only game in town you have to learn to play by its rules, or not play at all...

Capture.PNG
Capture.PNG (111.69 KiB) Viewed 3768 times


Although I don't know what the status of GM is in terms of SVG standard, does anyone know if it's in now?
Your mind is what you think it is.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: How can i make gradients like this?

Postby hulf2012 » Tue Aug 26, 2014 12:43 am

Hello

To Druban:
I believe that the same effect can be done with blurring and clipping. I agree that, for Inkscape, there is no tool that will do that in 1 step or in less steps as it's being done now, even with the experimental gradient mesh tool. And based in some videos on youtube about the use of the gradient mesh in Illustrator, those effects aren't easy to achieve either.

About RocketTom request:
I'm not sure, but I note some kind of metallic texture behind your example artwork. Also, you have to learn about where are you going to locate your light source, and based on that, you have to put the lights and shadows in your metalic surfaces.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How can i make gradients like this?

Postby druban » Tue Aug 26, 2014 8:04 am

hulf2012 wrote:I believe that the same effect can be done with blurring and clipping.


You are right of course. The original coding of the tool was to simulate several objects blurred and snapped together. In practice I found it nearly impossible to simulate conic gradients with blurring and clipping. Also impossible to blur an object more at one end than the other! These outside cases ( and the tapered gradient is not really an outside case) make the GM tool useful.
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can i make gradients like this?

Postby Lazur » Tue Aug 26, 2014 10:50 am

Not play at all, as on linux it would need deeper knowledge of things going.

So a bit of promoting, if my previous link wasn't bold enough:
bent.png
bent.png (102.47 KiB) Viewed 3600 times


This was made with using markers with gradients.
Original svg here:
https://openclipart.org/people/Lazur%20URH/bent.svg

Description here:
http://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=23

I'm guessing such looped shapes would count as horrible blinking?


On conic gradients I still prefer this solution, because a colour setting can be used on different shaped objects as well without the need of re-adjusting each of the colours position.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How can i make gradients like this?

Postby druban » Tue Aug 26, 2014 9:12 pm

Amazing that that even works without crashing, if I understand correctly you are using thousands of custom markers, right?
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can i make gradients like this?

Postby Lazur » Tue Aug 26, 2014 9:36 pm

That's right, a path with a gradient fill, masked to a circular shape and converted to a marker object.
The nodes are generated with pattern along path live path effect.
If it would make the system crawl during the editing, the lpe can be made invisible.


Return to “Help with using Inkscape”