Cycles Wire frame Shader

Description

I came up with an idea how to make a node setup to render wire frame in Cycles with adjustable thickness.

Enjoy

== UPDATE ==

I added another method based on the parametric (barycentric) coordinates of the triangle using the Geometry node output.

Unlike the UV method it DOES NOT need the UV map, but it will shade the edge of each triangle so if you subdivide the mesh a lot the wires will be tiny.

So you have now two node setups for quads or triangles.

Enjoy! Agus.

Comments (38)

G
gregzaal about 14 years ago

wow genius method

M
Mats Halldin about 14 years ago

Yes, this was brilliant. Wish I got started with Cycles. :(

R
riemenschneider about 14 years ago

O yes, thanks a lot:).

A
avbear about 14 years ago

Wow! How to render wire frame in Cycles?

A
agus about 14 years ago

Blender Nerd: Yes i came up with this idea after a huge dinner :), don't ask why just happens

Z
zerba about 14 years ago

Is it ok if I try to make an add-on for this? I'll give you full credit for it. This is such a cool idea, but I think it would be easier to not have to go through the whole process everytime.

A
agus about 14 years ago

Of course you can, and I am thankful you want give me the full credit, but if you do the add-on, you are also part of the credits, okay :) Let me know when you finish it, i certainly will use it !!

B
Bizla about 14 years ago

And so will I :) great job on figuring this out, I havnt tried it yet but im about to :)

T
TowerCG almost 11 years ago

Is the addon done yet? I want to download! :D

B
Belich about 14 years ago

!! thats awsome, great idea

R
ramaswamy about 14 years ago

really cool... good idea....

B
BhaWin about 14 years ago

sweet, a wireframe render solution. Addon would be great.

C
Cluster.One about 14 years ago

Excellent shader, only one drawbak: it don't render 1 edge of the tris (the diagonal in the UVs)

C
cnd about 14 years ago

I suppose that the RGB separator is used to get the y,x,z coordinates of a point in the UV-Map. Right? How can I look at those values? Why are they between 0.1 and 0.9 if I choose a wireframe thickness of 0.1?

A
agus about 14 years ago

You right, x and y (or R, G in the separator node) are u and v respectivelly, In your case, all what is between 0.1 - 0.9 for u and v will be masked out (black)

J
johnnydwicked about 14 years ago

This is awesome stuff. :D

C
CapedSam about 14 years ago

Genius idea. I can't wait to use this in an animation.

J
jafem about 14 years ago

cool i must download and try it myself :D

B
Belich almost 14 years ago

if i remember right, was there a tutorial about this? i cant find it

J
Jibberish almost 14 years ago

Awesome! Worked perfectly in Blender/Cycles 2.63 Thanks!

R
ronigavsh over 13 years ago

Very very nice

D
dbishopn over 13 years ago

Nice node! thank you for sharing!

G
Glewisguy over 13 years ago

I'm having some troubles with finding a WireFrameMask node? I have to search for it and when trying to add it in it just gives me an error about not being able to find it! I'm running 2.64, could someone help?

H
hentosama about 13 years ago

I read the faq and the included txt files where do i put this file to install in blender 2.66 thx! i need wireframes for a nonprofit artistic project :D

K
kbellis about 13 years ago

Agus - thank you so much; very cool and quite clever!! And FYI, I got pointed here from Greg's tutorial, and had gotten pointed there from this thread: http://blenderartists.org/forum/showthread.php?290145-A-Shader-for-Wire-Frames Kind regards, Kelly

F
fracto almost 13 years ago

Excellent! I made the whole process and it works correctly but for one detail: the lines that define the mesh shown me some thicker than others. How can that be?

C
contmike almost 13 years ago

This is just mindblowing :O True genius!

A
Alfisko almost 13 years ago

Really ingenius, but there is a problem with very quads or triangles that have huge aspect ratio (are much longer than wider). The shorter edge is much thicker. It's because the distance from the other shorter edge of the face is much longer than the distance between the longer edges and thus the same value of 0.1 and 0.9 provide bigger thickness. Is there a way around that? I can't think of a solution when you approach the wireframe material like this.

B
Bizla almost 13 years ago

is there a way to switch the colours around, they seem to be locked :/ Even in black/cream this is fantastic though

J
jlrazr over 12 years ago

Great shader! Thanks for sharing.

I
iloveaphextwin over 12 years ago

Please forgive my ignorance, but is there any way to easily use this in my project. At the moment the only way I can see is to import my models into this file. Sorry I'm a total n00b.

B
Brandonliebenberg almost 11 years ago

Dude, you are a F#cking legend. Thanks for sharing this. You rock

K
KevinBoyette almost 9 years ago

What would cause some of the lines to render thicker than others? This is a small part of my model. Simple box with a bevel (not bevel modifier). The rest of the model is fine, but this one box shows thick lines. I can't figure out what's causing the issue. ![Wireframe Shader Issue](http://i.imgur.com/yY4pHCS.jpg)

H
HDGrass almost 9 years ago

Edit: Worked it out. Just use two UV maps. Make Default "UVMap" your unwraped UV's and then a second one the reset UV Map. Use a UVMap input node on the UV Frame mask {instead of texture coordenate input node} and select the second UVMap for the UVMap input node. Then bake :)" remembering to add a texture node". As blendswap doesn't host images i may dust off my photobucket and post images if there is intrest. I am only intending to use this for alpha build placeholder art bling to spice stuff up :) but i'll feature a credit in full release builds under 'Alpha Phase Credits' heading. And Thanks. This is a great node setup either way :). OLD : - Can this work with a unwraped UV for baking or is there some nodes magic im missing:? For topologie wireframe, not the triangulated one. Really don't wanna manually gimp 300 models worth O'h colour bakes :S

J
jrf2 almost 9 years ago

Hey, this looks great. I sell models on TurboSquid and they ask for thumbnails of the wireframes of the model. It is okay if I use this to render those thumbnails? (I'm not quite sure how the license applies) Of course I'll credit you.

P
psychoboy852 about 7 years ago

Thanks! Great shader

P
pather over 6 years ago

NO matter what I do, I always get triangles... I did try almost everything, well apart from a human sacrifice, but stil triangles... Is it just me, or what the heck is happening? Blender 2.81

E
edwhardhitten over 3 years ago

I posted here what I done with it. YOu can download the .Blend file. Thanks to Angus. https://e10blender.wordpress.com/2022/02/01/short-mixed-tips-about-anything-blender/

Sign in to leave a comment.