PDA

View Full Version : halftone shader


sprunghunt
11-15-2010, 06:17 PM
after seeing this thread:
http://www.polycount.com/forum/showthread.php?t=77268

I made this shader in unreal (click the image for larger version):

http://farm2.static.flickr.com/1269/5177430382_f929a65484.jpg (http://www.flickr.com/photos/sprunghunt/5177430382/)

It has a few extra instructions for locking the halftone to the viewport or using regular UV's. I found that using the viewport removes the moire effect but is a bit disorienting if you used it for a whole scene.

JordanW
11-15-2010, 07:05 PM
nice! You should post a youtube video to show how moving a light or camera affects the look.

rasmus
11-16-2010, 02:34 AM
Very cool, though I wonder if this sort of thing really works on moving characters etc or if it just turns into a noisy confusing mess :)

kodde
11-16-2010, 06:16 AM
That's nice!
I also want to see a video of it in action, preferably with a moving light :)

haiddasalami
11-16-2010, 04:50 PM
Very cool. +1 for video

Hugh
11-16-2010, 05:04 PM
OMG thanx for this remind me of the old comic strips

sprunghunt
11-18-2010, 09:37 PM
Here is a video of the shader in game with a moving light

http://www.youtube.com/watch?v=a0N85Bs95mc

pior
11-18-2010, 09:53 PM
Would you mind applying it to a less forgiving object ? Any 3D character would do, I'm really curious to see it!

Looking good!

Neox
11-19-2010, 05:45 AM
also its a super simple testcase, what happens when you acutally move and look around? my tests have mostly been very very hard on the eyes

Ryan Smith
11-19-2010, 09:44 AM
Ya i was going to say, this half tone shading is something typically works best if pre-rendered. RealTime applications always seem to be a bit... unappealing, however this looks pretty good in your tests.

Like Neox and the others said, i'd love to see this work on a character.

Hugh
11-19-2010, 04:17 PM
or post it up for download so we can post some test either way is awesome

haiddasalami
11-20-2010, 09:58 AM
or post it up for download so we can post some test either way is awesome

he has the network so you can easily make it :/ Man people nowadays. Gonna try this today as some of the tests I did to make a druer shader failed pretty big as soon as the camera turned too much from the object.

Hugh
11-20-2010, 03:25 PM
he has the network so you can easily make it :/ Man people nowadays. Gonna try this today as some of the tests I did to make a druer shader failed pretty big as soon as the camera turned too much from the object.

... yea thnx(insult wasnt needed). his texture is just the only thing that may be a slight issue. I wasnt being lazy just didnt want it to come out different but thnx for trying to understand where I was coming from

haiddasalami
11-20-2010, 04:21 PM
... yea thnx(insult wasnt needed). his texture is just the only thing that may be a slight issue. I wasnt being lazy just didnt want it to come out different but thnx for trying to understand where I was coming from

His texture isn't that hard to do, he has a sample texture to look at and all you really need to do, is just make it tiling. Also I wasn't insulting you just saying that in general. Reason why it would be better for you to do it would be you would ACTUALLY learn from it and experiment than just downloading his package and using it. Its those failures that push us to learn more. Not gonna rant on this more.

FicWill
11-23-2010, 03:40 PM
I duplicated the core portion of the shader setup, but collapsed a few of the functions down that I didn't think were expressly needed for the effect. It looks pretty cool.

Hugh
11-24-2010, 05:42 PM
I duplicated the core portion of the shader setup, but collapsed a few of the functions down that I didn't think were expressly needed for the effect. It looks pretty cool.

interesting thnx someone posted a test. seems like it could do what I thought it could be used for

sprunghunt
11-24-2010, 09:07 PM
I duplicated the core portion of the shader setup, but collapsed a few of the functions down that I didn't think were expressly needed for the effect. It looks pretty cool.

looks good. Now if only someone has a full head sculpt of benjamin franklin somewhere they'd be prepared to lend me.

Hugh
11-24-2010, 10:46 PM
looks good. Now if only someone has a full head sculpt of benjamin franklin somewhere they'd be prepared to lend me.

lol tryna recreate 100 dollar bill. sounds cool.

darbeenbo
12-12-2010, 11:15 PM
This is really cool! However, I'm having some trouble getting it working on an object in. I've tried duplicated both of the trees you guys have posted, but I must be doing something wrong, because the objects are just black. Is there a setting you have to check on the object for custom lighting to take effect?

sprunghunt
12-13-2010, 05:13 PM
This is really cool! However, I'm having some trouble getting it working on an object in. I've tried duplicated both of the trees you guys have posted, but I must be doing something wrong, because the objects are just black. Is there a setting you have to check on the object for custom lighting to take effect?

You need to set the lighting Model to MLM_custom. It's in the main shader settings. Otherwise the custom lighting input does nothing.

Ga2Z
01-11-2011, 04:10 PM
hi, very nice shader...

For the line halftone did you created a single line texture and tiled it with the uv modifier?

sprunghunt
01-12-2011, 11:13 AM
hi, very nice shader...

For the line halftone did you created a single line texture and tiled it with the uv modifier?

Both of the textures I made are created using 3d studio max.

The dots are an array of cones with a gradient map going away from the camera.
The lines are a series of wedges with the same gradient map.

You could create a single line in photoshop and increase the tiling. It would give the same effect.

Ga2Z
01-12-2011, 01:11 PM
nevermind about teh last post, somehow I got it now =)

But I have a question, I made a toon shader that is connected to the diffuse and the lighting model is prefered to be non_Directional, but to pull this halftone it needs to be custom lighting...

any recomendation to blend the two? I've been thinkign about masking so the white in the halftone lets me see my diffuse texture but I honestly don't have any idea on how to do this :s

Thanks in advance

sprunghunt
01-12-2011, 02:31 PM
There's no reason why you can't add an extra "shaded" pass to this shader. You can do shaded passes in customlighting. You could just multiply your diffuse with the shader near the end.

You could also integrate the same shader instructions into a diffuse pass. It won't have quite the same effect but will still work.

Ga2Z
01-12-2011, 06:28 PM
oks thank you sprunghunt, but I'm so noob that I barely understood what you just said hahahaha... but I've been working and trying to understand and got this tha resembles what I was looking for =)

http://img69.imageshack.us/img69/6728/cellshadehalftone.png

It has an outline made with the cellshade tut from Hourences and I connected the nodes as FicWill and tweaked them a little, I also duplicated the whole "expression"(?) in order to have wider lines as the shadow was darker, don't know if this was the best way to do it...

http://img14.imageshack.us/img14/9044/cellshadehalftoneudk.png

Hugh
01-12-2011, 06:56 PM
@ga2z very good turnout

sprunghunt
01-13-2011, 07:04 PM
Looks good Ga2z.

You could probably do a layered effect without even changing the original shader at all. If you give alternate stripes a different brightness in the source image it should achieve a similar effect to what you have.

Ga2Z
01-22-2011, 03:15 PM
hey thanks =)

Maybe do you know a way to get this effect in a 3D Max material??

Hugh
01-22-2011, 03:31 PM
I think there is a thread where someone did it do a search its around here though

Ga2Z
01-22-2011, 04:05 PM
Oks I will =) (don't know why there's always the impulse to ask first and search later :p)

But I was trying and got this: http://img375.imageshack.us/img375/1460/halftest.jpg

Somehow the lines go wherever they want haha