Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

EYE ADVANCED - Realistic Eye Shader

Discussion in 'Assets and Asset Store' started by chingwa, Feb 21, 2015.

  1. Escope12

    Escope12

    Joined:
    Dec 27, 2017
    Posts:
    14
    I should’ve been more careful.
     
  2. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
  3. Escope12

    Escope12

    Joined:
    Dec 27, 2017
    Posts:
    14
    I bought the Eye Advanced Shader
     
  4. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    I was recently viewing a presentation by Activsion/Blizzard on their research into realistic eye shading, and this part caught my eye in particular (ouch pun).

    I think it would be fantastic if this could be supported.

    https://i.imgur.com/vLcPJTT.jpg
    https://i.imgur.com/hFHEtEb.jpg
    https://i.imgur.com/SsfJoRM.jpg
    https://i.imgur.com/p71EaPj.png

    being able to mask the reflection like this would up the realism. I know you have the shadow masks, but that's not quite the same thing, it darkens but doesn't really affect the reflection portion.
     
    OfficialHermie, Stormy102 and chingwa like this.
  5. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @CeeBee This should be doable. I could at the very least apply the shadow mask to reflections as well. Good idea, I will put this on my list for the next update.
     
    OfficialHermie, Stormy102 and ceebeee like this.
  6. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Nice find! It's very subtle but compared to these off and on images, it shows how much more realistic it actually makes it.

     
  7. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Yes, chingwa will be happy to know that just about every other trick for eyes that they demonstrate in their presentation, his shader already has. :) (with the exception of the moisture mesh, but that isn't really covered by the eye shader.)
     
    OfficialHermie, Stormy102 and chingwa like this.
  8. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    I would like to do something about moisture mesh, but it's kind of out of my hands since that has to be very specific to the character model.
     
    ceebeee likes this.
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,623
    Maybe a sample? And then a few pointers about how to customize?
     
  10. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Yeah I fudged something for the time being with a free "Puddle" shader I found on the Asset Store:





    But, I can't say I'm happy with the result. Will probably circle back to that later. But it's ok for now. :)

    Your eye however, looks great. Kudos!
     
    chingwa likes this.
  11. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Hi, I also wanted to report what appears to be a bug with the Sclera Size and the Sclera Shading.
    I was seeing some odd effects and finally figured it out. I turned the shading up high to make it more obvious:


    As you increase the Sclera Size, the Sclera Shading also scales along with the Sclera texture. You can only use the shading basically with a Sclera Size of 0.85 which is kind of limiting. Ideally, the Sclera Shading shouldn't scale with the Sclera Texture at all, it should stay the same scale regardless of the Sclera Size.
     
    hopeful likes this.
  12. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @CeeBee Thanks for the bug report! I will check it out this week and hopefully put together a shader fix.
     
    Last edited: Apr 17, 2018
  13. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @ceebeee I have a patch-fix available for the sclera shading issue you noted above. It also has a preliminary edit to remove reflections from the underedge of the eye, I added a new slider where you can control the reflection mask amount. Currently it is using the sclera mask texture, but I may add a new specific texture to control this before I release the next udpate.

    Send me a PM or an email at konnichiwa@tanukidigital.com and I'll send you the patch.
     
    ceebeee and hopeful like this.
  14. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    I tried the patch, It looks good. It resolves the Sclera scaling issue, and I think using the Sclera and Iris shadow masks as the reflection mask is a reasonable strategy. Thanks for your work on this :)
     
    chingwa likes this.
  15. Maskvp

    Maskvp

    Joined:
    Jul 9, 2015
    Posts:
    14
    Hello, I want to know that there is support for Unity2017.4.2f2 and deferred rendering and VR (Multi Pass) ^^"?
     
  16. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Unity 2017.4 == Unity 2017.3. Since it works for me, I can confirm it works for Unity 2017.4.
     
    chingwa likes this.
  17. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @Maskvp I support all Unity versions after 5.3.4, so 2017 is inlcuded, and official release versions of 2018 are included. Deferred rendering is supported as well. VR Multi Pass is untested... perhaps a VR customercan chime in here and give their input?
     
  18. The-Creature-Queen

    The-Creature-Queen

    Joined:
    Jan 19, 2017
    Posts:
    24
    I'm on the fence with the asset because Unity Web player doesn't work with firefox (or at least for the majority of us it doesnt.) Can you upload a quick video to the thread here maybe, or provide a windows player? I just wanna see it in action a bit. Thanks so much, this looks AWESOME! -proceeds to scan forums for any missed examples.-
     
  19. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
  20. The-Creature-Queen

    The-Creature-Queen

    Joined:
    Jan 19, 2017
    Posts:
    24
    Yeeesss thank you so much!! I can't wait to check this out; it's so exciting. And glancing through the thread, I saw someone mention extracting from demos (pertains to window builds, I would guess.) That is why I'd be okay with just video demos; if there is a risk for a piracy influx by providing more accessible demos, another solution should be presented.

    Edit: Wow. This blows everything else in the Unity store away! Best eyes available to date. And I can actually afford this one on an indie budget. (At 40 I probably wouldn't until the end of the game, coming back to replace all the placeholder textures. Weird what a 5 dollar difference makes.)

    I'm going to pick this up on next payday. Edit 2: Lawl caved and bought it now. Please keep working on this. :) Do what no one else is doing.
     
    Last edited: May 28, 2018
  21. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @Wolfride Thank you very much for your in depth review! I'm glad to hear you are enjoying the eyes :D Also I will take your suggestions into consideration for future updates.

    Just FYI, you CAN add a glow to the eyes by changing the "Glow Color" setting. Just make sure to adjust the color alpha channel as well. This will put a glow on the entire iris... perhaps in the future I can make it more detailed where you edit a texture channel for this.
     
  22. Maskvp

    Maskvp

    Joined:
    Jul 9, 2015
    Posts:
    14
    Stormy102 likes this.
  23. Retr028

    Retr028

    Joined:
    Mar 25, 2017
    Posts:
    3
    I definitely love this assets from the photos and Demo but I can't use it yet, I'm already using the High Definition Render Pipeline so this asset is at the moment useless for me, I will definitely look at this plugin and wait for support
     
  24. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,623
    In general, don't expect a lot of support from plugins for HDRP in 2018. That's because from what I've read Unity doesn't expect HDRP to be completed or stable till the final release of the year.
     
    chingwa and ceebeee like this.
  25. anomas

    anomas

    Joined:
    Jul 3, 2016
    Posts:
    47
    Hi guys, does this asset work with emission? e.g: Eyes showing in the dark or emit light on eyeglasses.
     
  26. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @anomas yes, the Pupil has the option for an emission glow color in the shader. It is black by default, but changing the color and raising the alpha channel will allow the pupil area to glow.
     
  27. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I have purchased your EyeAdvanced and I totally love it.
    Will you provide a version for HDRP, or do you think it should stay as it is?
    I don't know if the new shaders bring anything good for us in respect to EyeAdvanced.
     
  28. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I was thinking that using the HDRP shaders might be a good decision (once it's out of beta) because then nothing can get broken anymore with new Unity versions, right?
    I guess that you could utilize Lit shader.
    Can you please correct me if I'm wrong about any assumption?
     
  29. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    @OfficialHermie I don't have near-term plans to support HDRP. Just like many others I am waiting to see how the development of HDRP goes, and for Unity to release more stable and feature complete version. Eventually once the new SRP features are standardized I'll most certainly be doing some kind of HDRP update, but I have no idea when that will be.
    If only :D But yes I am waiting so that this type of issue is kept at the absolute minimum.
     
  30. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I'm using the HDRP pipeline, it's amazingly stable and looks amazing.
    When I try to use EyeAdvanced in the HDRP demo scene (Unity 2018.2.0f2), the material gets purple.
    I'm not sure what goes wrong here. Textures all look fine, I guess it's something internal?

    Can you provide a fix?
     

    Attached Files:

    Last edited: Jul 26, 2018
  31. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    ceebeee likes this.
  32. BoxxyPrime

    BoxxyPrime

    Joined:
    Jul 2, 2014
    Posts:
    10
    Absolutely loving this asset! Brought a lot of life into my characters!

    I got to thinking. Is there a way to have the eye shadows not actually move with the eye? Like, for example if your character looks down, the shadows move with the eye, and what you can still see of the iris is mostly shadowed.
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    Hi @BoxxyBrown glad to hear you're enjoying the eyes! :)
    There isn't currently a way to keep the eyeadvanced shading from rotating from within the shader itself, since everything is rendered in one pass on the same object.

    However
    you can get around this by duplicating the eyes and and using the shading texture on a new material on top of the EyeAdvanced eyes. Like so...



    To get the above I did the following...

    1. Duplicated the left and right eyes, and enlarged them to 1.1X the size as the original objects.
    2. Made a new Standard material for the new shading objects and set the mode to Fade.
    3. Edited the EyeAdvanced shading texture so the shading was in the alpha channel.
    4. Applied the new texture in the Albedo material slot, then rotated each new object to best fit the head/eye shape.
    5. Once I was happy with it all I separated the new objects from the original objects.

    I'm attaching the custom texture below. You can follow the image for the material settings I used. This now lets me rotate the eye separate from the shading
     

    Attached Files:

    OfficialHermie likes this.
  34. BoxxyPrime

    BoxxyPrime

    Joined:
    Jul 2, 2014
    Posts:
    10
    That actually works really well and looks a lot better with my random eye movements! Thanks so much :)
     
  35. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    does it support on HD Render Pipeline?
     
    OfficialHermie likes this.
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    The Shader is not written for Unity's preview HDRP system. More info is available a few posts up.
     
  37. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Great!! Thanks!! Finally, all my beloved assets get ready for HDRP!!

    Edit: DAMN!!!!!! I mis-read and I understood "The shader is NOW rewritten..."

    You should really do this now as most other "pro" assets have already done that.
     
    Last edited: Oct 5, 2018
  38. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    355
    HDRP is still in preview. Expecting publishers to chase preview/beta stuff for free isn't reasonable.
     
  39. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @MrG Yes, but many asset publishers already do it anyways.
     
  40. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Also, @chingwa is the master of eye shading.
    And since HDRP Shaders will also work for eyes (I haven't investigated yet in which way), he might contribute to the HDRP shaders with his knowlege.
     
  41. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    I just received an email about how dilation works in Eye Advanced, and thought I would share an example here. Dilation can be controlled on the shader itself using the Pupil Dilation setting or accessing it directly through code via the "_pupilSize" shader parameter. Also, there is an example component that performs auto-dilation depending on the amount of light the eye is receiving. :)

     
  42. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    705
    Sorry for the offtopic, but dang, may I know what skin shader did you use for this?

    Its brilliant!
     
  43. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
  44. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Aha I wish I had that skin shader - it was from the images in the presentation I'm afraid :(
     
  45. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    Anxiously awating the HDRP update :D

    You can already get decent looking skin in Unity , you just have to learn how to use its power :)
     

    Attached Files:

    Stormy102, chingwa and one_one like this.
  46. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    I don't really want to switch to HDRP at this stage tho :(
     
  47. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    I know, I was on the edge too but after seeing the Heretic demo there were no second thoughts.
    Not regretting it one second except for losing access to EYE ADVANCED for the moment.

     
  48. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    Any HDRP releases will be in addition to the standard unity rendering, at least for the forseeable future. Though eventually I assume Unity will deprecate the standard rendering and focuse exclusively on their render pipelines. Probably still have a couple years before that happens.
     
  49. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Yeah I think it looks really good but the graphics we have at the moment are pretty good - its not worth the time needed to transition and learn at this stage... maybe soon :)

    As long as you can offer Eye Advanced in HDRP I'll be happy :D
     
    OfficialHermie and ceebeee like this.
  50. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    I have no doubt chingwa will do so once HDRP is production-ready!
     
    OfficialHermie likes this.