Home Unreal Engine

halftone shader

polycounter
Offline / Send Message
sprunghunt polycounter
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):

5177430382_f929a65484.jpg

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.

Replies

  • JordanW
    Options
    Offline / Send Message
    JordanW polycounter lvl 19
    nice! You should post a youtube video to show how moving a light or camera affects the look.
  • rasmus
    Options
    Offline / Send Message
    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
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    That's nice!
    I also want to see a video of it in action, preferably with a moving light :)
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Very cool. +1 for video
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Here is a video of the shader in game with a moving light

    [ame]http://www.youtube.com/watch?v=a0N85Bs95mc[/ame]
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    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
    Options
    Offline / Send Message
    Neox veteran polycounter
    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
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    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.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Hboybowen wrote: »
    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.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Hboybowen wrote: »
    ... 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
    Options
    Offline / Send Message
    FicWill polycounter lvl 17
    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.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    FicWill wrote: »
    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.
  • Lucas Annunziata
    Options
    Offline / Send Message
    Lucas Annunziata polycounter lvl 13
    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
    Options
    Offline / Send Message
    sprunghunt polycounter
    darbeenbo wrote: »
    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
    Options
    Offline / Send Message
    Ga2Z polycounter lvl 7
    hi, very nice shader...

    For the line halftone did you created a single line texture and tiled it with the uv modifier?
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Ga2Z wrote: »
    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
    Options
    Offline / Send Message
    Ga2Z polycounter lvl 7
    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
    Options
    Offline / Send Message
    sprunghunt polycounter
    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
    Options
    Offline / Send Message
    Ga2Z polycounter lvl 7
    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 =)

    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...

    cellshadehalftoneudk.png
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    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
    Options
    Offline / Send Message
    Ga2Z polycounter lvl 7
    hey thanks =)

    Maybe do you know a way to get this effect in a 3D Max material??
  • Ga2Z
    Options
    Offline / Send Message
    Ga2Z polycounter lvl 7
    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: halftest.jpg

    Somehow the lines go wherever they want haha
Sign In or Register to comment.