PDA

View Full Version : halftone shader question



Simon-S
08-20-2013, 07:20 AM
Hi,

I wonder if there is a way of linking the halftone shader to ambient occlusion so I can bake a dotted AO pass from my model.

Any ideas?

Cheers,

BeeVee
08-20-2013, 03:00 PM
I think you'd need to do everything in nodes, you won't be able to mix shaders with nodes. Alternatively, do it after rendering in something else?

B

Simon-S
08-21-2013, 05:06 AM
I thought as much - I wonder if there is a way of creating a halftone effect using nodes only?

dwburman
08-21-2013, 10:39 AM
This would be pretty simple if we had a dot 2D node ... just plug a diffuse shader into the dot size or something, but it looks kind of odd with a 3D dot pattern because the dots also 'scale' based on where they intersect the object.

Check out the ShaderIntro video here: ftp://ftp.newtek.com/pub/LightWave/LW9/

At 1:40 minutes the presenter shows a setup with grid for shading with one light, but he doesn't go into details and it's a very early version of the node editor.

dwburman
08-21-2013, 11:57 AM
Here's a quick proof of concept test.

I was thinking that to be more accurate, the halftone pattern would not move with the object and the dots wouldn't scale in perspective as they would if they were pasted onto the object in surfacing, so looking it as a post process, I did it using denis' DP_Filter plugin as a Pixel Filter Node.

In the Pixel filter node, I have it take the color out and use it to control the diameter of the dots procedural. For the object surfaces, I just plugged an occlusion node into the surface's Diffuse Shading input. There may be a way to get the Ambient Occlusion to work in the pixel filter node without adjusting your surfaces (see http://www.youtube.com/watch?v=_FR89lTtXx0), but I didn't get it working for this quick test.

I think the dots look stretched horizontally because the shape of the render is horizontally stretched (16x9), so you may want to scale the width on the dots node to compensate.

The scene and objects are attached. I hope this helps. :)

XswampyX
08-21-2013, 12:26 PM
Try an Image of your half tone spots and the Logic node :-

http://i465.photobucket.com/albums/rr16/xXswampyXx/HalfTone_Skull_zpsb304abdc.jpg (http://s465.photobucket.com/user/xXswampyXx/media/HalfTone_Skull_zpsb304abdc.jpg.html)

Simon-S
08-22-2013, 06:12 AM
This looks really interesting. Thanks for this.

Will let you know how i get on.

:D

Simon-S
08-22-2013, 06:48 AM
Try an Image of your half tone spots and the Logic node :-

I cant seem to recreate this...what setting have you used for the logic node?

Sensei
08-22-2013, 09:48 AM
I cant seem to recreate this...what setting have you used for the logic node?

Greater than, or smaller than.

I was going to suggest using 3D Textures > Dots and Diameter input, but this idea with dot image is also good. At least UV map is supported.

XswampyX
08-22-2013, 01:43 PM
Greater than, or smaller than.

I was going to suggest using 3D Textures > Dots and Diameter input, but this idea with dot image is also good. At least UV map is supported.

That's correct! :)

Here's the dot image I used.

http://i465.photobucket.com/albums/rr16/xXswampyXx/th_Halftone_Spots_zpsf1b9aa6e.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Halftone_Spots_zpsf1b9aa6e.jpg.html)