2
$\begingroup$

[Blood vessel][1]

I am trying to draw a 3D blood vessel. I want the outer side of the vessel to be darker than the the inner layer. My problem is when I assign a color it will be applied for both inner and outer layer.

Is there any simple way to assign the color to the outer surface only just like the attached photo (red surface and yellow inner layer)? Thank you!

Blood vessel with red surface and yellow inner layer

[1]:

$\endgroup$

2 Answers 2

6
$\begingroup$

If you create the thickness of the walls of your blood-vessel using a Solidify modifier, you can set material offsets for the generated faces:

Here's a tube generated from a simple Bezier Curve (right), using its native 'Bevel' setting, followed by a Solidify modifier to give the walls thickness, (and a Bevel modifier to sharpen the rim's edges):

enter image description here

  • The top box shows the material slots for the curve
  • The middle box shows its 'Material Offset' settings in its Solidify modifier
  • The bottom box shows the 'Bevel' settings in the curve's Data tab > Geometry panel
$\endgroup$
8
  • $\begingroup$ Actually I couldn't get the third box. I tried to add these two modifiers but the result was the bezier doubled and didn't turned into a tube! $\endgroup$ Commented Dec 23, 2021 at 10:00
  • 1
    $\begingroup$ @MajdiAl-Amili It's unfortunate that a Bevel modifier, and the curve's own 'Bevel' are called the same thing, when they are completely different. The 'Bevel' that turns the curve into a tube is in the curve's own Data tab, Geometry panel: imgur.com/a/HMa1Qdp $\endgroup$
    – Robin Betts
    Commented Dec 23, 2021 at 10:10
  • $\begingroup$ Done! That is very interesting. I used a cylinder because I can delete some faces to make some pores or a window to let some particle to be visible to the outside, but how to make a pore in this way of beveled bezier? $\endgroup$ Commented Dec 23, 2021 at 10:26
  • 1
    $\begingroup$ @MajdiAl-Amili a Boolean modifier could cut the windows to look inside procedurally. Convincing pores would be more work with procedural textures etc. Possible, but only worth setting up if you have to produce a wide variety of illustrations. You can vary the thickness of the walls by vertex-weight, and the diameter of the vessel as a whole by the 'Radius' of the curve ( A different question). Depending on how many of these you have to make, it may be just worth going as far as you can with thee modified curve for modelling, followed by conversion to a static mesh, for further detailing. $\endgroup$
    – Robin Betts
    Commented Dec 23, 2021 at 10:36
  • 2
    $\begingroup$ Succeed! it converted to mesh and worked. I would like to thank you so much and wish you happiness everyday. Thanks! $\endgroup$ Commented Dec 23, 2021 at 11:15
4
$\begingroup$

You can achieve this quite easy without the need of two different materials. Delete the second one, and edit the first material by adding a Mix RGB node in the Shader Editor. with the outside color on the first color and the inner color on the second. Then add a Geometry node and plug the Backfacing output in the Fac input of the Mix RGB node.

color mix

However, no blood vessel is infinitely thin, as you can see in you reference image there is a red tube with some thickness enclosing another lighter colored tube with thickness inside of that. So I would actually model two tubes, each with their own color so different colors for inside and outside would not be necessary.

$\endgroup$
4
  • $\begingroup$ That is very cool! But why when I add a solidify modifier the color will be back to single? $\endgroup$ Commented Dec 23, 2021 at 9:55
  • 1
    $\begingroup$ Yes, of course. I guess you should do basic tutorials on what faces are, what backfacing is, the modifiers... My setup works, because you have polygons where you can see the front/outside and the back/inside. If you solidify them, they are like e.g. a cube, they have a real outside enclosing a space between those polygons. Since it is closed, you cannot see the backfaces or inside of the polygons. As described in the other answer, when using a Solidify Modifier you can specify extra materials for the newly created faces. But in your reference there are two tubes, each with his own color. $\endgroup$ Commented Dec 23, 2021 at 10:05
  • $\begingroup$ OK, can I make it more complicated and i just want to know if blender can make 10 colors on the surface and another different 10 colors in the back after we give up the solidify? $\endgroup$ Commented Dec 23, 2021 at 10:35
  • 1
    $\begingroup$ @MajdiAl-Amili Well, that depends on how you want to determine where which color should be, I'd say... $\endgroup$ Commented Dec 23, 2021 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .