Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Glass,Chrome Reflective material shader assets pack

Discussion in 'Assets and Asset Store' started by brn, Feb 14, 2011.

  1. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    All versions at 1.14

    Hard Surface Shaders Pro is now on the Asset Store for $50 Click Here for Link
    Hard Surface Shaders Standard for $15 Click Here for Link
    Hard Surface Shaders Free Click Here for Link

    Thanks to every one on the Beta team for your help and feel free to keep posting suggestions or ask any questions.

    I hope you find the packages good value as well as a good solution.

    Look to the Video and attachments below for documentation (which I recommend you read if you are considering purchasing pro ).

    Kind Regards
    Brn


     

    Attached Files:

    Last edited: Jul 8, 2011
  2. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,792
    really interesting, as i'm not a technical artist it looks really interesting ( for an artist to have as many shaders as possible is the same as for a coder to have a keyboard with all its keys). Do you think it would be usefull for creating a spectral appearence or ghost ??? with this shader ... I'd love to have the right tools to make one and don't waste my time..
    Impressive thanks for your work.
     
  3. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Hi rosor thanks for your kind words.

    Yes I think it would handle a ghost quite well. If i were to apply it to a moving character, where there is a good chance of intersection and overlapping volumes I would do the following.

    1) First pass, Pre Prime the Zbuffer with the character. You can use the shader lab "colormask" function to do this.
    2) Draw the character with a version of the shader that doesn't draw the back faces, over the top of the Z primed version ( sometimes you may need a slight offset to avoid Z fighting.

    This way you wont get any artifacts with overlapping geometry from the same asset, and it will work properly with any depth based post effects you run after it.

    I think there is a tutorial on this type of technique in the unity forums somewhere. I'll add a link to this post if i can find it.

    Kind Regards,
    Bruno
     
  4. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,792
    @brn : thanks for your answer Bruno.
     
  5. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Your webplayer(in safari on Mac, Firefox as well) shows diffuse shaders on the objects...
     
    Last edited: Feb 15, 2011
  6. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    For games, what matters is; does it look good, and does it run well? ;)

    This is a winner. Do want. 10$ on Asset Store for what you already have, if you released it right now.
    IMO the extras would pump it to 15$.

    As for the ghost, I think there is something related in the wiki (2.6 version):
    http://www.unifycommunity.com/wiki/index.php?title=AlphaVertexLitZ
     
    Last edited: Feb 15, 2011
  7. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,277
    Where can i see the webplayer ?
     
  8. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    First post under the images...
     
  9. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,277
    Thank you garyhaus

    i downloaded it and look at it but i think this graphic card was not good enough, it is looking like realy simple objects with just one color, not transparent or something
    :(
     
  10. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Thanks for posting the feed back Guys. Screen capture of the refraction Pre Prime testbed attached. This version of the shader also handles the backfaces differently to the non refractive shader and will allow for complex shapes with intersecting geometry like characters.

    $Refraction_Ghost2.jpg



    @garyhaus M_Stolley. Ive been able to test the shaders on a low spec apple since you have posted. The shaders defaulted back to diffuse on that machine as well. At this point I don't have easy access to Mac based systems but i assure you it is my first priority to get them working on apple machines. After that I'll create some cut down versions and fall back versions.

    @garyhaus, Cool portfolio site you have there!, I really like your approach to lighting.

    @rosor. Ive just expanded the shader set to include multiple passes that pre prime the Zbuffer. It also does a grab pass with a simple refraction effect. This version will cover your ghost scenario. To my eye though refraction doesn't suit a ghost like character. Looks pretty cool as a glass statue though.

    @Werewraith I hope the web player worked for you at least. Are you on PC?
     
  11. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,792
    this looks cool ! would fits really well an octopus or a toad skin, a kind of something like ectoplasm, or jellyfish (like the first green ghost in " ghostbusters") but could you post a version of the same character you use in the picture, with the " ghost scenario" fixed. I don't know if you'll have many buyers, it's a usefull tool to my mind even in its current version but nobody could guess how many sales you'll get with this pretty feature. So maybe it'll be too expensive for the moment, depending on the price you expect to sell it.
    nice work.
     
  12. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    Yes, it worked perfectly fine. What I was trying to say is that even if they weren't mathematically correct, it isn't an issue at all since they are visually correct.

    One question though; do they work correctly on models regardless of UV mapping (or if there is no UV info at all)?
     
  13. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    They look great, no doubt about that, but not sure I'd pay for them when there's things on the wiki and around the forum that could be adapted to be the same pretty much, with a lot of effort that is. But that's because I'm currently very poor now.
     
  14. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,277
    @Frank Oz
    As always it is a time vs money vs skill question.
    I would pay for it if it is the right price because i have enough things to do/learn that are more importent to me then shaders.
     
  15. 2dfxman1

    2dfxman1

    Joined:
    Oct 6, 2010
    Posts:
    1,065
    Aww, I expected realtime reflections.
     
  16. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    @ Werewraith, The answer to your question is both yes and no. Im doing multiple versions of the shader and will format them to work like the standard unity packaged ones do. So if you want to use a normal map for extra surface detail or a diffuse and specular map, then you will have to select the variation of the shader that supports them. The simpler versions will not require any uv's. The Images I first posted dont use any UV data.


    @ 2dfxman1, I understand totally where you are coming from on this point. The tricky bit is how much of a performance cost are you willing to pay to achieve it? Because everyones answer will be different and specific to their own needs. I'm planning to implement some scripts that will set up some camera render textures, so you can assign them to the shader for real time reflections. This should be as simple as assigning a script to the object you want to uses as the origin for the reflection capture. This way you can choose how expensive and how often you want the update for the reflections, without impacting the shader side of things.

    At the moment the reflection texture is a cube map, which is a highly accurate and expensive way of representing reflected data ( in terms of capturing and storing the data). I'm thinking of providing the option of a hemispherical reflection map. This would have some major performance advantages in terms of capturing the scene, but with the disadvantage of not representing reflections on the back faces of the reflective surfaces.

    I personally dont think the lack of accuracy on the backfaces is an issue, because the realtime refraction Ive just implemented, more than makes up for it (Its a hemispherical approximation that uses the Grabpass functionality). What do you guys think of this solution. Is it flex-able enough for you?

    It may be possible to for me to only update the forward parts of a cube map with a single capture thats warped to fit, but again this would require scripts from my side and good scene management at your end. Its also worth thinking about how depth based post effects come into play. Right now with how the standard depth based Image effects are implemented, they don't play nicely with transparent assets. My shaders will solve most of the post effect issues but not all of them.

    .

    @Frank Oz, I agree there are some very good examples of reflective shaders about. If my shaders don't provide a solution thats more user friendly I wouldn't use them either. For me thats the key factor. In my experience as a developer Ive seen some really amazing technology never realize its potential because it was just too clumsy to use effectively in a working environment. The tech that was efficient and allowed artists to iterate rapidly while providing good visual feedback would result in a better looking game. I hope with some working examples I can convince you further.

    Lattest realtime refraction example.

    $Refraction_improved2.jpg $Refraction_improved.jpg

    Keep the questions and request coming guys its really helpful!

    Brn
     
  17. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    431
    Webplayer doesn't work for me either (MacBook Pro CoreI5, double ATI/NVDIA video card) but the screenshots look gorgeous. As soon as you have a working Mac version with refraction and caustics, I'll buy it. Also, realtime reflection is a very interesting option for certain scenes - like interactive product close-ups, for example.
     
    Last edited: Feb 20, 2011
  18. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    @Yann, Thanks for your feedback Yann. Your post has made me think a bit more about how the shader pack might be used. I think architectural and interactive product developers probably appreciate a few good Cube maps / Environments that would help make their products really shine. I'll render up a few and add them to the pack.

    @)Everyone, Ive been concerned at how the shader is getting quite big. The functionality being requested is definitely needed so i wont be cutting any of it out. Heres my proposed solution. An editor version of the shader and a Game version.

    The Editor version would have all the sliders, texture slots and variables exposed.
    So things like a Gloss slider that multiplys a Gloss map will be available, with sliders and individual maps for Specpower, Reflection masks ect.(As long as I don't run out of registers otherwise the masks will have to be supplied packed as well)

    For the Game version I will supply a script that parses over each individual map based on the Editors version of the shader and then bakes and packs all the data into a new textures and switches shaders on the material.

    This way you get all the functionality without the performance costs. With this sort of functionality and extra assets, I'm tempted to split the shaders into two packs. A Standard version and a Pro version. I'm even considering a free pack version as well so those on no budget can at least hit the ground with some basic shaders.

    I'll make sure that all versions of the shaders use the same properties so if you choose to upgrade, you can without having to do more than just point it at the new shader.

    Latest Update,
    More art than code today, a good bit of Zbrush action and spent some time get the scene lighting well.
    Added in the ability to supply textures for Diffuse color and Alpha and Spec/Gloss/reflection masks. The Skull uses these. Created the first of the sample testbeds for the pack, all assets shown will be part of the pack and free for you to use as you wish.

    Things the screen shots feature.
    • Internally lit Skull, with light scattering effect.
    • Asset that changes properties over its surface (Skull again)
    • Asset with internal modeled detail that self sorts and self refracts (glass egg).
    • Assets that are transparent and still work with depth based post effects.
    $Skull Refraction  Hand surface detail.jpg $Working with Unity depth of field.jpg $Skull_1.jpg $Glass Egg with Internal detail, self sorting and refracting.jpg
     
  19. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,792
    this looks really good, i'm really interested in those shaders. I'll need them in about 2 or 3 weeks to do some tests with my enemy characters. How much do you expect from this feature ? will it be available on the asset store ???
     
  20. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    431
    @brn : brilliant, in all aspects !
     
  21. JetSoap

    JetSoap

    Joined:
    Dec 29, 2010
    Posts:
    107
    Nice! Would this work as an overlayed material for a road, to get the look that it's been raining?

    Good work, Keep it up.
     
  22. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    that's cool stuff ! id buy it if it is available at an affordable price ! hope to see it soon for sale !
     
  23. kondrup

    kondrup

    Joined:
    Apr 23, 2009
    Posts:
    205
    Hi,
    Your shaders looks very nice!
    We would also be interested in buying them from the asset store - any plans on when they will be online?
     
  24. simone007

    simone007

    Joined:
    Oct 30, 2008
    Posts:
    221
    C'mon sell it! I need it
     
  25. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Thanks for you interest guys, I'm sorry i havent updated you all on whats been happening but Ive been working out a solution for realtime scene based reflections. I've settled on a screen space technique as I believe it to be the best compromise between performance and visuals for a general purpose effect.

    Rendering to a cube map is just way too slow to be used for anything but a single asset or two, which you can do if you choose to.

    Im starting on optimizing and refining the shaders from here on. wont be long before its releasable.

    Here are some vids of the WIP. I'll have fixed the tearing of the reflections near screen boarders shortly. I should be able to reuse the same fix i used on the refractions.


     
    Last edited: Mar 2, 2011
  26. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,792
    that's great !!!! I was upset for you ... No news for one week ... I believed you had a car crash ... Fortunately for you it's not the case. Really nice. I saw you're working on optimizing the shader, hope you'll succeed in the best way. Nice work !!!
     
  27. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    That's just just ..jaw dropping ! Amazing work ! I hope I can afford it when it is available and I hope we don't need unity pro for this since I can't afford pro
     
  28. robocognito

    robocognito

    Joined:
    Sep 25, 2010
    Posts:
    23
    That's excellent looking! Before I could consider purchasing an extension like this, knowing how it performs on a variety of systems and how it handles at load are important - so some benchmarking would be appreciated after you wrap things up.

    Any word on which versions of Unity this will support?
     
  29. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Hi guys thanks for the questions.

    @ JetSoap, Even though its technically possible to use the shaders from my pack to achieve what you are after, I would recommend against it. A road surface is a special case that deserves its own shader to achieve the best results from both a performance and visual standpoint. Because a road takes up at least 1/3 of a screen in most driving games it is good practice to use a solution that is optimal and takes advantage of some of the shortcuts you can take when dealing with a very specific application. For instance most road surface shaders allow for multiple surface types and variations like potholes cracks, and dirt patches and you would want the wet surface shader to be aware of all these variations as well. To do that best you would want to do the road and wet surface within the one shader even if it needs to do multiple passes. Another option would be to do the Wet layer via a post effect using the stored deferred buffer info. But this would make it difficult to distinguish between areas you want and don't want to be wet.

    @ rosor, Im glad I'm still alive too :) . Thanks rosor and you have been doing some nice work yourself I see on some of the other threads!

    @Ullukai, Thanks Ullukai. For the Screen-spaced reflections and refractions you will need Pro. Only features that require capturing or rendering to a texture wont be available on the Standard version.

    @ robcognito, I couldn't agree more about being open and straight forward about performance, And I will put together a table of benchmarked statistics for you. As it is now, un optimized, Im getting between 400 to 440 fps or 2.3ms on my machine (AMD dual 3800+ X2 Dual core with an ATI radeon 5870 @ 1920 x 1066 ) for the skull scene with 4 reflecting refracting objects plus 1 refracting only object. The frame rate above also includes the overhead for deferred and 3 lights, one with soft shadows. It ran only marginally slower (350 to 380 fps) on the same system with a Nvidia 8800 gts (only tested at 1024 x 768 but i don't think fill is the bottle neck at the moment). At the moment I'm only developing for Mac and PC, as i cant justify purchasing the licenses for the other platforms.I see no reason why it wouldn't run on an Xbox and the lesser versions on some of the portable devices. I can always send you a compiled version privately for you to test if you needed to.

    Thanks for the questions
    kind regards
    brn
     
  30. jmsosullivan

    jmsosullivan

    Joined:
    Aug 16, 2010
    Posts:
    18
    This looks amazing. Is it possible to buy yet?
     
  31. Aron

    Aron

    Joined:
    Oct 6, 2010
    Posts:
    54
    These look great! Do any of your shaders work on mobile at all? Just like a basic transparent, cubemapped shader.
     
    Last edited: Mar 25, 2011
  32. nikko

    nikko

    Joined:
    Mar 20, 2009
    Posts:
    436
    Awesome pictures. But in the web player demo why I cannot see the reflections of each balls in themselves? (I think I know the answer)
     
  33. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    General Update

    Ive been working at on the shader when I can and have been able to improve a few things.

    New Web player uploaded (With realtime reflection refraction update)

    View attachment $WebPlayer.zip

    Best news being that the shaders will now work on any mac that supports shader model 3.
    The whole shader package is now completely written within the Shader lab Surface shader framework.
    All functions are now in .cginc files to help you integrate or create extensions of the shaders if you choose to.
    General improvement in performance, Still some possibility's to check here.
    Added opaque versions of the shader that work nicely for things like car paint ext.

    Here ares some screen shots of my latest testbeds.


    $Chev.jpg $GlassBowl.jpg


    I'm pretty happy with how things are coming along and I feel the shader suite will be an great option for most applications
    From my testing here are some things that I think will be helpful to know about what the shader suite. In regards to what it will and wont do, without extra effort with scene management at your end.

    The good ( on top of all the Fresnel, Metallics, Light transfer ect....)

    • shader suite features over 16 shader variations all interchangeable and compatible to each other.
    • All opaque geometry will reflect each other
    • All Transparent Geometry will reflect opaque geometry or transparent geometry drawn before it.
    • The closest back face in an object will be visible through the front faces if transparent.
    • Works very well on curved geometry like characters cars, statues and furniture.
    • Internal refraction of geometry
    • no draw order issues within the one mesh. ( Just model it how you like and the shader will sort out all intersecting geometry and polygon order issues)
    • exceptionally fast compared to render to texture techniques. A realtime cube map update requires at least 5 and often 6 scene renders. If the scene from the attached web player were done using render to texture techniques, it could require up to 60 render to texture calls and would only reflect or refract the objects that were redrawn for each render texture.

    The Bad

    • Transparent geometry drawn latter in the render que wont be reflected in geometry drawn before it.
    • Only the closest back face will be visible in transparent geometry.
    • Large flat surfaces wont always reflect as expected. For un-distorted floor reflections I recommend you use another technique.
    • Features that utilize texture LODing have been disabled on Mac platforms. ( Im sorry but this limitation is a Unity/Mac issue)
    • Can only reflect objects that are visible to the camera.


    Currently working on one last feature to help minimize issues on large flat surfaces. Then its Tutorials and Sample art time.

    @ Aron, Thanks Aron. Im usure of how the shaders will work on mobile plaforms , if the platform is shader model 3 compatible then i suspect it will work. If you would like to test a compiled pre- release sample shader send me a private message.

    @ jmsosullivan, Thankyou, Very soon I hope in around a weeks time.

    @ nikko, Im glad you like the screen shots. The latest webplayer has the real-time reflection and refraction included. Latest webplayer has a freecam so you can get a close look at whats happening.
     
  34. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    535
    Really Cool! Any idea when it's ready for sales?
     
  35. jmsosullivan

    jmsosullivan

    Joined:
    Aug 16, 2010
    Posts:
    18
    Still not ready for sale?
     
  36. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    I want it, need it got to have it ! great stuff! please release it..............
     
  37. Majatek

    Majatek

    Joined:
    Apr 17, 2011
    Posts:
    19
    Actually, there's quite a few shaders that Unity3D's Indie license allows you to mess with to create the effect you're looking for.

    I was messing around with the shaders one day, and made the effect. I have since forgotten how to duplicate that "mistake" though - So you're on your own in that area.
     
  38. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    i really need some glass shader with reflective cubemap but i cant find anyone that works in unity 3d 3.3
     
  39. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    469
    really nice shaders !
    i'll look for it later...
     
  40. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Prepare Earthlings!

    $PrepareEarthlings.jpg

    Happy to say Shader pack is currently being beta tested by various developers. Image is a Unity screenshot, robot is part of the asset pack.

    Cheers,
    Brn
     
  41. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    Brn been testing it and i must say its super.... I guess alot of people is going to buy it. Have you Made Any glass demo scen jet
     
    Last edited: May 12, 2011
  42. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Hi linusnorden,

    I'm glad you are liking the shaders. Demo Glass scene coming via Webtransfer for everyone on the beta group with a few more extras as well.
    Check your email latter in the day.
     
  43. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    is it on the store ?
     
  44. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Sorry Mrbdrm,

    It hasn't been released just yet on the Asset Store.
    If you need the shaders quickly send me a PM and we can sort something out.

    Cheers,
    Brn
     
  45. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    send you PM
     
  46. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    For those part of the Beta test group you should have received an email with a link to the latest update.
    Please notify me if you have missed out.

    Kind regards
    Bruno
     
  47. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    921
    Robot is really cool!!!
     
  48. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    431
    @Bruno : been testing for a few days on several Macs, no noticeable glitch so far. And I particularly like your toolset approach.

    In short : wow, what a great contribution !
     
  49. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    469
  50. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    318
    Hi everyone,

    Firstly Id just want to say a big thanks to the beta team for their feed back, Its been very helpful and your suggestions have been added. I wont be taking on any more people for the beta team, because I'm currently submitting to the asset store.

    Ive attached a couple of images, the first is a breakdown of the feature sets that will ship with each pack. As for price only the free pack is going to be a certainty :). I can asure you though that the Standard and Pro packs will be priced to sell in volume.

    The second image is a collection of assets that I worked on to test the shaders with. They will all be part of the Standard and Pro packs. I hope you will also find them useful.

    Lastly Ive attached a PDF of the documentation that ships with the shaders. It covers every aspect of the shader pack I can think of and I recommend that you read it if you are interested in purchasing the packs.

    @ Yann, Im glad you like the shader pack, Ive put a lot of effort into making them as user friendly as I could.

    @ Blackant, Nice work on your bike. When the Free shader pack hits the asset store you will be able to ship them with your bike!

    @kenshin, The robot was quite fun to create, he's becoming a bit of a mascot for the shader pack, I'm glad you like him.

    Thanks again everyone.
    Last beta update will be sent tomorrow.

    Kind regards,
    Bruno
     

    Attached Files:

unityunity