enter image description here

I am trying to create a folded paper like object using Blender. This is something I've created. Now, I want to color edges of the paper and the creases of the fold. Like if the crease is downwards I want a green color line along that and if it is upwards the color should be red. Moreover, I want the edges to be colored as black line. Can anyone suggest any ideas about achieving this? Actually I am creating thousands of random pages like this using a python script. So it's not possible to manually label each of those. I need to find out an automatic process using a script. For this one the page should have this kind of markings. enter image description here

Any ideas for this would be great. Thanks in advance!


You can achieve this using freestyle:

  1. In your render properties tab, at the very bottom, activate freestyle.
  2. Then go to the render layers tab and scroll down to the freestyle settings.
  3. For every line style you want to display, you have to create a separate line set. For every set you can set a number of options.
  4. To color the outer border of the paper black, check "Silhouette" and "Border" and create a line style with black color underneath
  5. For showing creases, adjust the angle settings of a line set.

More information can be found here:

Introduction to freestyle: https://www.blender.org/manual/render/freestyle/introduction.html

Line set settings: https://www.blender.org/manual/render/freestyle/parameter_editor/line_set.html

Modifiers - you can even color by crease angle: https://www.blender.org/manual/render/freestyle/parameter_editor/line_style/index.html

Also take a look at this page - there are a number of dense, but very informational articles and infographics about freestyle: http://blendernpr.org

If you save the line styles and sets in a blender file, you won't even have to script all this, just enable it and run your script.

  • $\begingroup$ It was hard to achieve using the angle settings so I am using the edge mark option. This gives me complete control over the edges. But having a problem, I want different colors to draw the different marked edges. i.e. If I mark the edge along a specific crease then I want to color the edge using a specific lineset. Is it achievable? By using layers or something? $\endgroup$
    – glhf
    Jan 22 '17 at 17:24
  • $\begingroup$ Sorry, I don't know how to do this. I'd maybe try to create a linked scene and change the crease color there. Or else try to script the freestyle effects on python. $\endgroup$ Jan 23 '17 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.