Isotropix Forums

Halftone shader

General Discussion about Isotropix and CG related topics

Halftone shader

Unread postby andras » Wed May 18, 2022 4:48 pm

Hi guys

I am new to Clarisse.
I am looking for a halftone shader or how to create one in the material editor.
I watched the tutorial with the robot/mech (using a panoramic camera to get the occlusion and reveal the "dot" procedural in the shadow areas). But the dots diameter is the same across the entire shadow part of the robot (probably because the occlusion result is either white or black).
But for a real halftone shader the dots diameter would need to get smaller the darker the shadow is (white area = large dots, mid grey = medium dots, black = small dots). I am sure you guys know what I am talking about.
Thank you in advance for any tips.

Andras
andras
 
Posts: 13
Joined: Wed Dec 26, 2018 11:34 pm

Re: Halftone shader

Unread postby sam » Wed May 18, 2022 6:42 pm

yeah that's right. The video is more of an example to get you started playing with textures to create NPR look. As you noticed, Clarisse doesn't have native Halftone or NPR materials. Actually it's possible to create one with the textures but it requires some work. You'll need to simulate the shading using a dot product with your "lights" and using a quantize to make flat shades which then would drive the size of the dots. Then again you won't get perfect poisson spaced like dots.

Really the best solution is actually to write a shader in C++ that does that.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1827
Joined: Fri Jan 25, 2013 11:33 pm

Re: Halftone shader

Unread postby andras » Wed May 18, 2022 10:34 pm

Thank you Sam.
I will see if we can code our own shader.

Thanks
Andras
http://www.checkpointvfx.com
andras
 
Posts: 13
Joined: Wed Dec 26, 2018 11:34 pm

Re: Halftone shader

Unread postby esmith » Wed May 18, 2022 11:51 pm

Ok here is a solution based on emulating the same setup as in the Blender video you shared with me privately. what you must know, is that Blender and Clarisse work differently in terms of how you access already rendered data. In our case, you must render an image, and then you can use the resulting image to affect something else.

Here is the full setup
HalftoneShader_Setup.zip
(172.75 KiB) Downloaded 29 times

It is pretty simple.
We use a camera space based 2d dot pattern on all our geos

We render one image to get us our color and value data

We use that to drive the border ammount, through a gradient you can adjust to manupulate the dots location
for a given value

Capture2.PNG


Capture3.PNG


This is actually a nice setup, because it's using image layers to do things instead of the shader
opening up new possibilities.
Attachments
Capture.PNG
User avatar
esmith
 
Posts: 203
Joined: Mon May 22, 2017 4:11 pm

Re: Halftone shader

Unread postby andras » Thu May 19, 2022 12:35 am

Awesome Eric...Awesome. ;)

Thank you
Andras
http://www.checkpointvfx.com
andras
 
Posts: 13
Joined: Wed Dec 26, 2018 11:34 pm

Re: Halftone shader

Unread postby esmith » Thu May 19, 2022 10:07 pm

So I had another look at this, after a chat this morning. And I've uploaded a better version. as well as a demo scene and video to go along with it.
Have fun and share your results.
Cheers.
Attachments
HalftoneShader_Setup.zip
(264.53 MiB) Downloaded 31 times
User avatar
esmith
 
Posts: 203
Joined: Mon May 22, 2017 4:11 pm


Return to General Discussion
cron