Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Antonov Suit - Physically Based Shader - First Release

Discussion in 'Works In Progress - Archive' started by Charkes, Apr 24, 2013.

  1. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Nope still working with DX9. But cubemaps and convolution capture are a lot better in DX11.
     
  2. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi, this is a fantastic job :)
    The only issue is that i downloaded the examples pack (80 Mo) and it's mainly broken using Unity 4.6.
    The materials have no textures affected, i don't see any alpha and cutout examples , the skin shader example have only the diffuse and normal map texture, there is no cavity and others textures in the package.
    Could you upload a complete working level scene with all materials for each example like Lux example scene ?
     
  3. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Those samples are quit old now :/.

    I'm finishing a sample scene and you can see an example of it in the previous page.

    Despite the fact material are broken, textures are there but anyway it's old so I'll remove them :) until I update them.

    You can read the _README for infos about textures.

    Thanks !
     
  4. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Finally I figured out that I didn't do the Probes correctly from previous post and I change to use the "specular workflow/ specular" shader that seems working pretty well now.

    [Edit removed WebPlayer ]
    Antonov_Test2.jpg
    Note: The model is from Quixel
     
    Last edited: Dec 1, 2014
  5. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Really nice, like it a lot. Looks like your sky respond well with the shaders.

    I've added a very small update on GitHub.
     
  6. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Just tested your SSR, For Mac OSX I got a error of "function "tex2Dlod" not supported in this profile (maybe you want #pragma glsl?)"

    I fixed by added following code inside SSR shader at pass 0 and 1:
    Code (csharp):
    1. #ifdef SHADER_API_OPENGL
    2.     #pragma glsl
    3. #endif
    I was thinking your SSR will replace the cubemap that do real time diffuse and reflection cubemaps, Silly me..lol. I wish you can really do that, than my uSky day/night cycle will really make sense ;)
     

    Attached Files:

    Charkes likes this.
  7. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Thanks for pointing this out ! I'll add this to the GitHub asap !

    Well yeah SSR is not enough, it needs cubemaps as SSR will fail in some situations.

    However I'm thinking about something for Day/Night cycle and cubemaps, I think there's some place for investigation.

    There's some good inspiration out there like the Fox Engine who use captured cubemaps with Day/Night cycle.
     
  8. RUBILYN

    RUBILYN

    Joined:
    Jun 22, 2013
    Posts:
    54
    HELLO ! This Physical Based Framework is amazing ! Is like Having Unity 5 In 4 !!

    Dear @Charkes Can we request some features ?

    1) We Would like to use a extra ( Grunge Occlusion Dirt Layer on uv 2 ) if possible in Normal Alpha slot.

    2) We Also would like a Extra Optional On top vertex Occlusion Layer to use with free VextexDirt Extension :
    http://forum.unity3d.com/threads/released-vertexdirt-per-vertex-ao-baking-solution.267826/

    3) A Vertex Wind Wave Player Bend moving Shader for trees That could work with Unity and custom trees bushes grass ...
    https://www.assetstore.unity3d.com/en/#!/content/21079
    https://www.assetstore.unity3d.com/en/#!/content/3253

    4) Latter also some sort of Triplanar terrain / With Splat-map Shader That Could be used in Custom "Mesh terrains" ..

    The 1/2 Extra Vertex Occlusion And Dirt Grunge Layer in Uv2 Would be really needed sooner here ...
    Can you explain us how can we do it ? So its less work for you ...

    THANKS SO MUCH !
     
    Last edited: Oct 7, 2014
  9. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Skin Shader SSS Test (Color Space : Linear)
    uSky_Antonov_Head.jpg
     
    Last edited: Dec 1, 2014
    Baldinoboy, Charkes, Botanika and 2 others like this.
  10. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Amazing, I love the GGX shading Brdf. thanks for sharing Charkes.
     
    Charkes likes this.
  11. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Did some test my self with skin and uSky :)

     
    Botanika and MegsTan like this.
  12. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
  13. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    1 - Extra layer is possible but not in the normal alpha slot but in an other RGB texture.

    2 - Indeed that would be great to have I think, I just need to expose vertex color in a shader that's all.

    3, 4 - Currently I'm not working on terrain or foliage/tree but I put that on list.

    "The 1/2 Extra Vertex Occlusion And Dirt Grunge Layer in Uv2 Would be really needed sooner here ...
    Can you explain us how can we do it ? So its less work for you ..."
    See you in MP !

    Thanks for your interrest in Antonov Suit :).
     
    RUBILYN likes this.
  14. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Botanika likes this.
  15. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Damn, that skin looks amazing.
    I'm reporting some minor bugs I encountered, while testing Antonov Suit features


    1) I'm getting this errors when I try to bake a probe.

    I solved it by changing line 807 in antonovSuiteProbe.cs from "if (hasPro == false)" to "if (hasPro == true)"

    2 ) Single lightmaps don't seem to be working with box and sphere projection for me.


    I commented these two lines in AntonovSuitFrag.



    this seem to fix it for me, but I'm not sure if it's the correct way to go.


    3 ) as far as I know, AO should only occlude Ibl, not direct Lighting. but In my case AO map seems to occlude both Ibl and Direct Lights. I might be wrong about this though.


    The Albedo has no AO or any pre-baked lighting information at all, the ambient occlusion is from the blue channel of the _RGBTex.

    I'm on unity 4.5 , DX9, Windows 7.
     
  16. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hey,

    1- Yeah stupid lines of code I forgot to remove :/, it was forcing me to not use RenderToCubemap() but I forgot it for free user. I fixed it. So you are right it should be "if (hasPro == true)".

    2- Well I did that because I think that if you are using box projection or sphere you don't need to occlude by lightmap your cubemap as it contain correct information of projection so it should reflect correctly shadows etc.

    Also I can see that on the first shot reflection is anormally strong like if RGBM capture is not correct so I'm looking at it and see if something elsewhere is wrong.

    3- To be honest I always thought it should, but taking into account diffuse color (It was in AntonovSuit but I deactivated) to be more natural, but maybe I should remove it.

    Thanks for reporting those issues :) !
     
    Last edited: Oct 15, 2014
  17. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    The RGBM capture is working great, I just cranked up the specular exposure in that screenshot.
    lightmaps however look weird :

    as you can see, some parts are well lit, and others are completely dark.

    this is how it looks after, baking a probe, and setting the diffuse and specular exposure to 1.


    the baked shadows are lost, and the scene look dark.

    this is how the scene looks with standard diffuse shader applied.



    I can provide you with the scene if you want.
     
  18. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Ok, I'm doing some test with Unity Free right now, you can send me your scene via MP.
     
  19. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    I've uploaded an update to GitHub : https://github.com/cCharkes/AntonovSuit

    I've added a game object called Sky, this object needs to be in your scene all the time as now it feeds the shaders with correct LUT textures.

    Don't forget to read the _ReadMe and documentations

    v0.051

    Added dual lightmaps support, use #define DUALLIGHTMAP_ON to enable it, see _ReadMe
    Added sky tool, it is no more needed to feed shaders with LUT textures manually, spawn a probe from it and you can set ambient light with it and apply general diffuse and specular cubemap
    Added metallic option to the SSR

    Fixed single, directionnal lightmap issues
    Fixed error in G-Buffer for SSR

    Changed probe script code
    Changed SSR ray march code
    Changed SSR roughness behavior
    Changed diffuse convolution to be more powerfull (I may revert to the old one)

    Removed occlusion from direct diffuse lighting
     
    MegsTan likes this.
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    why the latest ssr give me a white screen???
     
  21. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Well I don't know as it is of course not intended :) !

    Are you running on MAC or PC ? DX9 or DX11 ?

    EDIT : new update on GitHub for the sky tool
     
    Last edited: Oct 19, 2014
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Ahh i have to run it on Dx11,
    btw the SSR is heavier than before...it give me a very big fps drop
     
  23. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228

    "Ahh i have to run it on Dx11"
    It's set to SM 3.0 that's weird.

    "btw the SSR is heavier than before...it give me a very big fps drop"
    Oups ok :) well I tried something different to generate my random points.

    What kind of computer do you have btw ?
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    that's depend...what do you want to know?? :D
    btw i can run your shader at 2000fps when it still using realtime importance sampling btw :p
     
  25. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    CPU,GPU and RAM :).
     
  26. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    not a fancy highend or something
    i5 4670
    GTX 660Ti OC
    8Gigs
     
  27. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    HI Charkes,

    Just a quick question, is Antonov suit going to support Unity 5 specifically Enlighten?


    Regards,
     
  28. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hey,

    Hard to say as I don't have any Unity 5 working version but I'll do my best to make it compatible if it is possilbe.

    Best,
     
  29. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Yay ! Great update. Everything is working properly for me. thanks man.
    Do you have any paper on how to use view dependent roughness, in order to get physically "accurate" results ?
     
  30. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Great ! I'm also doing an other update as I find a big performance hit with 30 probes...

    Not paper really but have a look to the FOX engine presentation at 43:47 :


    Lot of material have this behavior, I would suggest to look at the world and take photo reference.

    I use same implementation as fox engine I think but it's more artistic to me than physical correct.
     
  31. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Nice presentation, I find Pbr scary in a way that's easy to mess a value in the inputs to get a totally different material . I'm gonna grab my camera like you suggest.
    I think the performance is affected by the amount of code running in the update function, I suggest running the DoShaderUpdate() function once on awake, using materials Instances,it should run a lot faster, at the cost of more draw calls, but then we can doodle a probe streaming system to make it manageable.
     
    Charkes likes this.
  32. RUBILYN

    RUBILYN

    Joined:
    Jun 22, 2013
    Posts:
    54
    HELLO AGAIN !

    Dear Charles Can you please bring Paralax Oclusion Mapping with Sillhoete to Antonov Shaders SUite Prety please !

    There are already some shaders that do this in Dx9 in assets store ...

    https://www.assetstore.unity3d.com/en/#!/content/5705

    https://www.assetstore.unity3d.com/en/#!/content/5664

    But would be amazing to have it in a Phisical based Shader framework as Antonov !

    Some Examples :





    Some Further Readings :

    http://docs.cryengine.com/display/SDKDOC2/Parallax Occlusion Mapping

    http://www.cs.nthu.edu.tw/~chunfa/PG08_1258.pdf

    http://oliverm-h.blogspot.de/2013/09/udk-iterative-parallax-mapping.html

    http://http.developer.nvidia.com/GPUGems3/gpugems3_ch18.html

    http://www.cescg.org/CESCG-2006/papers/TUBudapest-Premecz-Matyas.pdf

    http://graphics.cs.williams.edu/papers/IndirectionI3D08/indirection08.pdf

    https://www.cs.purdue.edu/cgvlab/co...nces/DepthImagesForRenderingSurfaceDetail.pdf

    http://amd-dev.wpengine.netdna-cdn....chuk-ParallaxOcclusionMapping-FINAL_Print.pdf

    http://amd-dev.wpengine.netdna-cdn....huk-ParallaxOcclusionMapping-Sketch-print.pdf

    http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/I3D2006-Tatarchuk-POM.pdf

    http://amdstaging.wpengine.com/wordpress/media/2012/10/I3D2006-Tatarchuk-POM.pdf

    http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Tatarchuk-POM.pdf

    http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Course_26_SIGGRAPH_2006.pdf#page=86

    http://www.inf.ufrgs.br/~oliveira/RTM.html

    http://http.developer.nvidia.com/GPUGems3/gpugems3_ch04.html

    http://amd-dev.wpengine.netdna-cdn....th_Accurate_Silhouette_Generation(SI3D07).pdf

    http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html


    THANKS SO MUCH IN ADVANCE !
     
    Charkes and Botanika like this.
  33. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    I'm testing some planar reflection (Alien Isolation style) :

    Linear Lighting, HDR, Lightmap (Single Lightmap) and Cubemap only.





    Still experimental of course :) and applied on the floor only (not on the trim).
     
  34. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Nice scene :eek:. Please tell me these are Lagarde's Image proxies !:rolleyes:
     
    Charkes likes this.
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    F*ck yes...i want that......push to repo please, label it as experimental only :D
     
    Charkes likes this.
  36. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Thanks !

    Nope sorry, it's really planar reflection also known as mirror reflection, image/billlboard reflection is not yet on the way :).

    haha :)

    EDIT : I'm having some great fun with Quixel Suit btw.

    All textures except floor are from Quixel with not adjustement at all after export !
     
    Last edited: Oct 23, 2014
    Botanika likes this.
  37. RUBILYN

    RUBILYN

    Joined:
    Jun 22, 2013
    Posts:
    54
    DEAR CHARKES !

    Just Tested and We have Some Million Errors in Atonov Suite with latest Unity beta 4.6.0f2 .. lol ...

    https://unity3d.com/unity/beta/4.6

    This are the Bugguing Animals Plaguing us !


    SO HOW IS DEVELOPMENT OF THIS AMAZING SUITE GOING ?

    I have here some Questions & Ideas Bellow !
    @Everyone

    1) Do this suite works with Unity 5 ? Anyone have tried ?

    @Charkes


    1) Can we have full integration in Unity 5 please ?

    WOuld be awsome cool to a more like unreal Phisical Based Shaders FX Alternative in Unity 5 ! Expecialy because Unity 5 STandart Shader is So disruptive iN Speculars etc ... Would be cool to have fulL Unity 5 Sky & Enlighten baking Compatibility with Antonov ! REaaly !

    2) The Screen Space Reflections is a reaaly high candy !!! Thanks so much for adding it !!


    ( Would be reaaly cool if it actually works.. lol )
    We were not able to put io work of all errors above ...

    But hey ! What you think about this technique ?


    3) I sow you did a AWSOME Amazing UDK RAIN Shader Backthere !



    Can we please have it in ANTONOV as well ?


    PS: Sorry the so many wishes and requests ...

    But i have just a last one ...

    And this is very important !


    4) PLEASE ! Can we have a BEtter Advanced Screen Space Ambient Oclusion in ANTONOV Suite please !?

    As we have SSR Something like HBAO Would be very cool to have In this suite Also ...

    Here are some SOurce code !
    https://github.com/scanberg/hbao

    And some more :
    https://github.com/search?utf8=✓&q=HBAO occlusion&type=Code&ref=searchresults


    Also Some other links for AO Techniques ...
    http://devlog-martinsh.blogspot.pt/2011/10/nicer-ssao.html

    http://dl.dropbox.com/u/11542084/ssao_nohalo_1.0
    http://nickporcino.com/meshula-net-archive/posts/post145.html
    http://developer.download.nvidia.com/presentations/2008/SIGGRAPH/HBAO_SIG08b.pdf
    http://developer.download.nvidia.co...GRAPH/Bavoil_MultiLayerDualResolutionSSAO.pdf
    http://www.gamedev.net/page/communi...resolution-screen-space-ambient-occlusion-r93
    http://www.iquilezles.org/www/articles/multiresaocc/multiresaocc.htm
    http://pt.slideshare.net/ozlael/mssao-presentation

    5) Dont know if been asked But ...

    Im a Co Developer In a new Online Venture ...

    And ! Can we please include the Antonov SHaders Suite in a Asset Store Models Package on our own ?

    - We will Advertise your Suite logo as "Powered by Antonov Suite" ..

    - And if You want some financial support ( for continuying this suite Features development and keep it updated and add the terrain folliage relief & others extra features ) we can Gladly Ask our Customers like 5$ Extra in Every Asset Store Sale That we Will Gladly Donate towards you !

    6) This Suite SHOULD Have its own Official Webpage !

    If you want After we have our products Ready We can Make a Oficial nov Suite Page at our oficial Products site ( when is ready ) Advertising the GitHub And your Portfolio / And showcasing the usage of ANTONOV Suite in our AssetsStore Packages !

    I think You Should have a Paypall DOnations method also !

    Ps: Ho .. one last thing xD​

    6) We usually do many Shaderforge Shaders .. and shaderforge will be ported to Unity5 Phisical Based Shading next weeks ...

    But we would love to have Antonov Methods Also Available in our Custom Shaders ...

    Do You thing is possible somehow Integrate The Antonov Cginc Methods in a Shaderforge Shader ? SO we can build Custom Shaders with "ANTONOV" Features integration ?

    Can we trow you Some Custom SHaders we did for you to explain us how can be converted to ANTONOV?

    Shaderforge Integration would be reaaly nice ...


    @ EVERYONE !

    7) ANTONOV SUITE SHOUDL HAVE SOME TUTTORIALS & YOUTUBE VIDEOS
    FOR PEOPLE KNOW HOW TO WORK WITH !!! Sory to say ..lol ..

    Some users here ( including us ) We Should try to Help more This Amazing Development not to die In Oblivion Like LUX And others That are not getting reaaly any new Updates ... mostly because Unity 5 Phisical Based Shading its Eclipsing All other Phisical Based Frameworks ...

    But Actually ANTONOV Have better Looks / and its more phisical based / and doesnt breack Visual results as UNITY 5 Phisical Based Shaders do ! Reaaly !

    Ok ...

    I think thats it for this week !

    ^^

    Ho Waith ! ... there is one last cool thing to mention !
    0) Dear Ckarkes ! We Have QUixel SUite profile ...
    But Have you ever tt of Including your Shader as .glslfx for Substance Designer Viewport?

    That way we could author SUbstances with Antonov Specific features directly in Designer ...

    Alloy Shader does this .. and this how they do it :

    They have a 3 files code That is Partially something like this :

    alloy.glslfx

    Then 2 other files That are Partialy like this ..

    fs.glsl

    And vs.glsl


    This above are Just Examples Not the full code for the Obvious reasons ...

    But Are just 3 files you might Get it how to ... convert ANTONOV to that Glsl format ...

    Anyway ...


    THANK YOU !!

    Please ! Keep Pumping this Suite !
    Would be amazing to Have it working with latest Unity 5 Reaaly !


    Thanks so much listen !


    K.
     
    Charkes and MegsTan like this.
  38. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    It's been a while since I didn't made update.

    I was in vacation then I got cold :).

    So I just put an update on GitHub, no major update just few things here and there.

    https://github.com/cCharkes/AntonovSuit

    I would suggest to remove any other build.

    Don't forget to check the _ChangeLog !!!

    I'll also upload today a sample scene.
     
  39. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    I haven't tested the 4.6 beta yet, is it going to official soon ?

    1) Can we have full integration in Unity 5 please ?

    Definitely yes but can't say when exactly.


    2) The Screen Space Reflections is a reaaly high candy !!! Thanks so much for adding it !!
    But hey ! What you think about this technique ?


    I saw this long ago but I think it works only for single object not an entire scene, also the author never shared any source or pseudo code of its implementation sadly.

    3) I sow you did a AWSOME Amazing UDK RAIN Shader Backthere !

    Thanks, yes rain support will be added.

    4) PLEASE ! Can we have a BEtter Advanced Screen Space Ambient Oclusion in ANTONOV Suite please !?

    Currently not on my ToDoList() at the moment.

    5) Dont know if been asked But ...


    Well Antonov Suit is open source (MIT license) so you can use it as it pleased to you.

    6) This Suite SHOULD Have its own Official Webpage !

    Yeah and it is on the way :).

    6) We usually do many Shaderforge Shaders .. and shaderforge will be ported to Unity5 Phisical Based Shading next weeks ...

    If it is possible I'll do it.

    07) ANTONOV SUITE SHOUDL HAVE SOME TUTTORIALS & YOUTUBE VIDEOS

    FOR PEOPLE KNOW HOW TO WORK WITH !!! Sory to say ..lol .

    I thought about this too, I think it's a good idea.

    10) Dear Ckarkes ! We Have QUixel SUite profile ...
    But Have you ever tt of Including your Shader as .glslfx for Substance Designer Viewport?


    I'll look into this.

    Thanks
     
  40. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
  41. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    MegsTan likes this.
  42. moure

    moure

    Joined:
    Aug 18, 2013
    Posts:
    184
    Hey there, i imported the sample package to a new unity project with antonovSuit latest version inside, but when i open the Io scene all the scripts and shaders seem to miss. I guess the samplescene unity package didnt keep the references. Could you repack the whole project of the sample scene?
     
  43. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Must be because I don't include meta files ont GitHub.

    Try this package instead : https://dl.dropboxusercontent.com/u/1812933/AntonovSuit/AntonovSuit_v0.055.unitypackage

    Let me know if that works.

    Sorry for the trouble.
     
  44. moure

    moure

    Joined:
    Aug 18, 2013
    Posts:
    184
    Charkes likes this.
  45. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    Quick post on my work on Antonov Suit.

    First of all I've decided to use Burley model for diffuse lighting instead of Lambert.

    You can see the comparaison here :

    .

    Burley brings a lot with rough material as you can see on the left and it is energy conserving.

    I've also decided to switch to GGX for skin aswell, but I kept the same formula to keep the strong fresnel at grazing angles :

    Code (CSharp):
    1. specularDirect = max(D * G * F / dot(h, h), 0);
    It doesn't make sense to setup a particular probe just for skin ( skin was using Beckman distribution and cubemap was convolved that way ) so now it's same for everyone.

    As experimentation I tried to bring photometric unit light to Antonov Suit and it worked well even more with proper tonemapper based on real camera value (Aperture, Shutter and ISO).

    I don't know if I don't do this correctly but it looks like it is impossible to get light radius from builtin value so I made an extension script to access it, and this allowed me to have proper inverse square attenuation along with photometric unit.

    But it works for one point light/spot only. To send my value I'm using Shader.SetGlobal.
    I could have use array I think but that mean remade lot of things that Unity already have.

    Maybe there's an other way, please let me know.

    EDIT :

    And planar reflection :





    Which I'll include soon.
     
    Last edited: Dec 3, 2014
    RUBILYN and Reanimate_L like this.
  46. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    it's still unity4 right? light radius are in the internal-PrePassLighting shader if i'm not mistaken this line
    Code (CSharp):
    1. float att = dot(tolight, tolight) * _LightPos.w;
    or _LightPos.w it seems
     
  47. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Yeah I tried _LightPos.w but didn't work in forward for me.
     
  48. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    So I've been doing more experiment and this time it was color banding.

    Some of you may have noticed horrible color banding with low exposure with IBL lighting. It's because our screen don't have enough precision to display perfect gradient and our eyes are very sensitive to those lack of precision in low range.

    A work around exist for quit a long time, it's called dithering : http://en.wikipedia.org/wiki/Dither

    I've decided to give a quick try on my tonemapper and here are the results :



    First try with uSky, as you can see it helps a lot but and I think it's my implementation, it darken a bit the color.



    And here with a HDR skybox encoded into RGBM.

    On both the banding is a lot compensated even if darkened a bit I really like the results so far.
     
  49. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Dithering definitely can remove the color banding artifact, especially on night sky.

    Hey Charkes, I found out something interesting of the calibration script files from Quixel Suit:

    Unity5.jsx
    // Exports maps for Unity 5 (PBR, Blinn-Phong Specular)
    // Stores Gloss in Specular alpha

    Unity5 (Metalness).jsx
    // Exports maps for Unity 5 (PBR, GGX Metalness)
    // Stores Smoothness in Metalness alpha

    So Unity 5 is using both model for different workflow? I'm confused.
     
  50. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Yeah and at first I tried direclty in your uSky shader and works pretty then I thought I should do it directly in the tone mapper.

    For Unity 5, I guess they switch to GGX for the Metalness workflow. I'm not quit sure.

    It's confusing :).