3D shading difficulty

Post questions on how to use or achieve an effect in Inkscape.
TDB
Posts: 2
Joined: Mon Feb 28, 2011 10:37 am

3D shading difficulty

Postby TDB » Mon Feb 28, 2011 10:55 am

Hi,

I'm trying to create a pipe elbow with pseudo 3D shading. The light is coming from top left. Look at the image: note how the gradients on the straight segments of the pipe are inverted in relation to each other (to match the light direction). Is there a way to create the missing curved segment without resorting to Blender? :?
Thanks!!!!
TDB

Image

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

Re: 3D shading difficulty

Postby brynn » Mon Feb 28, 2011 12:37 pm

Hi TDB,
Image
Welcome to InkscapeForum!

How did you manage the other corner? I think you would do it in the same way, it's just that it would be placed differently. In the example below, I think you would want the highlight to extend where I've placed the heavy blue line. Up to approximately the pink line, you would extend the same gradient that you used on the rest of the vertical section of pipe. Then you would do whatever you did for the other corner, in place of the curve in my heavy blue line. Please note that the curve in my blue line is not the same as the curve at the bottom, and neither is it the proper curve. The heavy blue line is just a guide.

And btw, I would love to know how you made the curve of the highlight. I've struggled with a similar problem, and basically just had to fake it. With Inkscape, a gradient can't be "curved". So however you did it, is very effective!!

ex1h.PNG
ex1h.PNG (20.7 KiB) Viewed 2202 times


I'm not sure, without an actual model to look at, or experimenting myself with the image, but the shape of the curve of the highlight might be slightly different than the other. It might be either a little elongated, or maybe wider at the bottom, because of the shape of the pipe??

I did a drawing with something like tree branches, and all "manually". But someone posted this tutorial for me later. Maybe it will give you another idea how to handle this, even if this technique isn't quite right. I'm thinking by examining a similarly shaped and aligned curve,made with this technique, you could get the slight distortion of the curve right. You can also get the SVG file of the tut, so you can take it apart and look more closely. http://inkscape.org/screenshots/gallery ... D-rope.png

TDB
Posts: 2
Joined: Mon Feb 28, 2011 10:37 am

Re: 3D shading difficulty

Postby TDB » Mon Feb 28, 2011 1:17 pm

Hey, thanks for the reply! Your blue line gave me an idea and I think I did it ;-)

Solution: instead of using gradients, I simulated the gradient with 3 blurred outlines of a rounded rectangle. This way I created a kind of a "highlight object" that I correctly positioned over the solid gray pipe for 3D effect. 3 outlines worked for me (each with different thickness, blur and opacity to create somewhat non-linear levels of white in the "gradient"):
Image

Now to answer your question: I originally did the transition with a circular gradient applied to a 90deg segment that matches the linear gradient on the straight pieces. Pretty simple.

Hey, happy to be part of Inkscape forums now! :tool_pencil:

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

Re: 3D shading difficulty

Postby brynn » Wed Mar 02, 2011 4:49 am

Awesome TDB!!
We're happy to have you, and hope to learn much from each other. Hey, already we have!


Return to “Help with using Inkscape”