3
$\begingroup$

I have a 2D base image on which I'd like to overlay a set of edges (several thousand), where each edge has a value determining its color.

For example:

sample image

My plan is to add each edge as a separate object with a custom property; then a single material across all edges can use the custom property to determine color.

The bit I'm having trouble with is actually getting edges to render. I was hoping that a wireframe modifier would give the edges enough geometry to be visible to the camera, however edges without associated faces don't seem to survive the modifier.

Is there a good way to get these edges to render?

$\endgroup$
  • $\begingroup$ I've found that having several thousand separate objects is much slower than having one object of several thousand edges. You could use vertex colors to give the edges a sort of ID, as a replacement for object IDs. You can render edges in BI, but not in cycles - which are you using? $\endgroup$ – Greg Zaal Jun 11 '14 at 13:35
  • $\begingroup$ I tried both.. freestyle edge rendering had the same trouble as my wireframe modifier though $\endgroup$ – ajwood Jun 11 '14 at 13:37
  • $\begingroup$ @GregZaal: It seems that even vertex colors are tied to the existence of faces! I suppose Blender simply isn't designed for rendering edges.. perhaps I should look for a different tool? $\endgroup$ – ajwood Jun 11 '14 at 14:43
  • $\begingroup$ Might it be possible to use something like hair particles instead? $\endgroup$ – gandalf3 Jun 11 '14 at 19:27
  • $\begingroup$ Those lines kinda look like hair, eh? I'm pretty inexperienced with hair, so I'll have to do a bit of research before I weigh in $\endgroup$ – ajwood Jun 11 '14 at 20:18
2
$\begingroup$

Cycles

I don't know of any way to render edges like this natively in cycles, however the screw modifier can add geometry to edges:

enter image description here

It's a bit of hack, but I don't know of any faster way to add faces to edges using modifiers (it's not actually that bad, in most other cases using the screw modifier you would probably use only edges anyway).

Blender Internal

You can render edges using a Wire material:

enter image description here

Opengl

Of course, the viewport can render edges, however you are pretty limited in terms of controlling the color..

enter image description here

This patch may help though.

$\endgroup$
  • $\begingroup$ My problem with the BI solution is that I can't use vertex paint to control the edge color.. The cycles solution doesn't look very good for my data.. and the Opengl again doesn't give enough color flexibility $\endgroup$ – ajwood Jun 12 '14 at 18:46
  • $\begingroup$ Both the skin and wireframe modifiers add renderable thickness to edges. $\endgroup$ – PGmath Nov 24 '14 at 19:57
  • $\begingroup$ @PGmath The skin modifier is quite heavy (probably no good for>1000 edges), and the wireframe modifier doesn't work on edges without faces (not sure why though). $\endgroup$ – gandalf3 Nov 26 '14 at 18:55
0
$\begingroup$

You can try the skin modifier for semi-okay results. for better results, try rendering curves with vector points at the start and end instead of edges (v key in edit mode) . under curve properties, set the fill to "none" and turn up the bevel/bevel resolution - this will create a "pipe"

Edit: more detailed instructions here as requested by CharlesL: (right click image, view image to zoom) http://i.imgur.com/9yPKjsA.png and here

$\endgroup$
  • $\begingroup$ Could you detail the workflow a little more? It will make the answer more accessible to beginner users. $\endgroup$ – CharlesL Jun 11 '14 at 17:27
  • $\begingroup$ CharlesL: see above. $\endgroup$ – user1562431 Jun 11 '14 at 17:57
  • 1
    $\begingroup$ @user1562431 Please try to avoid putting text into images without also explaining with actual text. Search engines can't read text in images.. $\endgroup$ – gandalf3 Jun 11 '14 at 19:11
  • $\begingroup$ affirmative. Images were for clarifying earlier text. Will keep formatting in mind for next response. $\endgroup$ – user1562431 Jun 11 '14 at 19:14

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.