Search Unity

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
    Hey, did you after your bake, put the cubemap in the diffuse and specular slot in the probe ?

    If yes, is there something happening on screen ? and are you on Free or Pro ?

    Cubemap culling mask is fine because to convolve I use the GPU and a skybox to capture it with the camera.
     
  2. MegsTan

    MegsTan

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

    When I click on either Convolve Diffuse or Convolve Specular button, it start's to play the game however the game window is just black. Not sure what you mean by "after your bake". If it has conjunction with precomputing the cubemaps then yes I did. I'm using the pro version. :(
     
    Last edited: Sep 1, 2014
  3. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
  4. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
  5. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    You couldn't know as I didn't write it anywhere, sorry about that, this will be in the doc I'm finishing :).
     
  6. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Hahaha! you got me there... unaware of what I'm writing, guess I'm just excited to see what Antonov Suite can do :)
     
  7. MegsTan

    MegsTan

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

    The convolving seems to be working now however, I noticed something when doing a box projection. It seems that the reflection is not aligned with the actual object. Attached are the results:
     

    Attached Files:

  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Well it depend on where's the position of the cubemap probe when it bake
     
  9. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Hi Rea,

    Attached is an image of where the probe is and its dimension. Let me know if there is a better way to do it. Not sure if it's just me doing it wrong. :(
     

    Attached Files:

  10. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hey,

    Glad it's fixed now. Also I think I've found a bug with convolution so will fix that.

    About your image, with box projection you shouldn't include floating object as it will be projected as flat.

    Box projection is great for approximate reflection but when an object is between the probe and the farest objects to reflect it fail.

    Your sphere after being baked are no more 3d objects but 2d.

    That's why I'll introduce screen space reflection and image reflection soon to compensate this.

    Hope that helps.
     
    MegsTan likes this.
  11. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    I would also say, avoid mirror like reflection with object between the probe and walls but more rougher, that will be less noticeable.
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    What charkes said :).
    Btw charkes, your box gizmo are not using the probe rotation is it possible to add rotation support?
    since it bit confusing without any rotation indicator when rotating the cube probe
     
  13. MegsTan

    MegsTan

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

    Thank you so much for answering those dumb questions. Thanks to Rea too :) . I'll be looking forward to see this awesome tool progress. :)
     
  14. MegsTan

    MegsTan

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

    This is really amazing. I baked it with lightmap and it works pretty well :)
     

    Attached Files:

  15. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228

    Great, thanks !

    also I've added fix to GitHub : https://github.com/cCharkes/AntonovSuit

    rea : I've added gyzmo rotation.
     
  16. MegsTan

    MegsTan

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

    Not sure if I'm doing it wrong, I noticed a minor bug and this happens when the probe creates / convolves cubemap.
    It looks like it does not take self illumination into account. This happens when I use either the standard Unity self illumination or the Antonov self Illumination. Attached is the screenshot.
     

    Attached Files:

  17. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Is there a texture in the Illum slot ? Also can you try to push the Illum Strength to something like 8 ?
     
    Last edited: Sep 3, 2014
  18. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Sorry for the late reply. Yes there is a texture in the Illum slot and Should I use the antonov metal shader before baking the diffuse/specular probe or bake the diffuse/specular probe while in unity default diffuse shader when it's done then switch to antonov metal shader? Hope I am making sense, sorry for my bad english.
     
  19. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    I pushed the Illum Strength to 8 and baked it and this is what I got. Seems pretty good now :)
     

    Attached Files:

  20. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Wow really nice, and very well done!
     
  21. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Hi Eric2241,

    Thank you, I'm glad you appreciate it. This would not be possible if not for Charkes' Physical Based Shading
    framework :)
     
  22. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Cool I'll check that out!
     
  23. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Any chances of a demo scene in the package?
     
  24. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    MegsTan : No worries :). No just use Antonov Suit shaders. Glad it work for you.

    Illum needs to be high because of fresnel and convolution, some energy are lost after those step I think.

    Thanks for the kind words :) and good stuff.

    carking1996 : Yeah, I'm making a small simple sci-fi scene with textures ready to use with my shaders.

    Thanks
     
    MegsTan likes this.
  25. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hey there,

    Update : https://github.com/cCharkes/AntonovSuit

    Mainly I've concentred my effort to make the convolution faster and better looking in DX11 and Pro user.

    Now it use the RenderToCubemap() function during the convolution.
    It's way faster and better looking and it fixed lot of issues I had with edges and also a strange blurring effect moving top left.

    I've also added a readme to give some better guidelines on how to use the tool. Refactored some code etc.

    Don't forget to give stars on github if you liked the tool and thanks to the people who already done it.

    I'm finishing my textures and meshes for the sample scene.

    Thanks
     
    ALUNBRA, MegsTan and Reanimate_L like this.
  26. MegsTan

    MegsTan

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

    This is great! I just joined GitHub and gave it a star. :) Do you have any plans of releasing ssrr soon?
    What are the other features of Antonov Suit that we should look forward to?
     
  27. MegsTan

    MegsTan

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

    Attached is a screenshot of the Pre Integrated Skin shader which looks very shiny. This also happens with the example scene that comes with the package (I'm referring to the penner skin). In my case I'm guessing that this caused by too much diffuseIBL or specularIBL. I attached the textures that I am using for the arm just in case you want to see it. I also added the translucent texture but I don't know which slot should I place this in. I shrinked the file size to 512x512 on purpose.
     

    Attached Files:

  28. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Thanks ;).

    SSR is already implemented actually, I'm trying to make it less expensive. To make it work I'm making a specular and a normal pass which generate extra draw calls.

    You mean what are the next feature I'll work on or what are the new features since last update you want to look into ?

    Can I see also you material parameters ? I'm looking into your textures.
     
  29. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
  30. MegsTan

    MegsTan

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

    Yup I mean the next feature(s) that you'll work on, ;)
    With regard to the Pre Integrated Skin shader, I figured it out myself. The Env BRDF Lut should use either GGX_Smith_LUT or BLINN_SMITH_LUT not the SKIN_LUT hahaha. It's all working now :)
     

    Attached Files:

    Charkes likes this.
  31. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Ha yes for ENV_LUT it's one of theses two and it depends on the specular convolution you have chosen.

    Glad you fixed it and nice pictures :) !
     
    MegsTan likes this.
  32. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Thanks Charkes! I'll look into this, I love your amazing work! :)
     
    Charkes likes this.
  33. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    In fact I can't work on one thing at a time I always do lot of things simultaneously, so roughly :

    I would like to implement a cubemap blending system instead of the assigned object method, I think it's high priority. Then image reflection I think. These are the main thing I want to add plus the SSR.
     
    Last edited: Sep 15, 2014
    ALUNBRA and MegsTan like this.
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oohh.....just curious with the cubemap blending, is it mean we can blend multiple cubemap for one big object? or only for dynamic object?
     
  35. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Basically what I want to do is moving the reflection to a screen space effect ( like deferred and UE4 ) and mix it with SSR. So yeah this would allow more than one cubemap on a material.

    Or doing something like Largarde, one cubemap at a time applied to everything and blend when camera enter in the radius/box of influence.

    But I'm not a very good scripter ( still learning ) so it takes time.
     
    ALUNBRA likes this.
  36. MegsTan

    MegsTan

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

    Any idea whats wrong with screenshot1? And when I click on one of the error messages it brings me to screenshot2. This happens when convolving either diffuse / specular IBL.
     

    Attached Files:

  37. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Looks like there's a problem with convolution shaders. Can you try to do a reimport on the convolution folder "Assets\Antonov Suit\Shaders\Resources\Convolution" ?

    side note : For diffuse IBL Cosine is great ;).
     
    Last edited: Sep 15, 2014
  38. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55

    Hi Charkes,

    I tried that, I even tried reimporting Antonov Suit and it does the same thing. :(
     
  39. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Ok, any other errors and is the convolution shaders are compiled ?
     
  40. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Do you have a skybox in your scene or a script that add a skybox ?
     
  41. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    No other errors, yup it did compile
    Yes I do
     
  42. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Ok I'm pretty sure it's because of this, until I fix this I suggest to remove it before backing. My probe to convolve use a skybox. Sorry for the trouble !
     
  43. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Not sure if it has something to do with what it is looking for. Do you think it has something to do with what it is looking for? like this one "Hidden/Antonov Suit/Radiance/GGX"
     
  44. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55

    Ohhh I see, alright :)
     
  45. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    One more question from me, what the difference between Bake Probe and Bake Probe with IBL??
     
  46. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Bake Probe capture the scene without any cubemap while Bake Probe With IBL will capture existing cubemap in the scene.

    For a first capture I usually use Bake Probe then Bake Probe With IBL.

    Hope that helps.
     
    Last edited: Sep 16, 2014
  47. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Hey Charkes,

    Trying figure out how to use your PBS. :)
    Following image render that use no tone map sky, then use Image Effects tone map (I'm using my mac.)
    Antonov_Test.png
    Note: The model is from Quixel

    Bottom part of the sky will either too bright if ocean fog set to 0.1 , or too much blue if ocean fog set to 1. It is not about your shader, I need to redo the sky bottom.

    About the textures, because Quixel DDO Texture uses different term Specular and Gloss, your shader uses Metallic and Roughness. I don't know if i did it right ....

    Btw, are you going keep your Antonov Suit as open source, right?
     
    Last edited: Dec 1, 2014
  48. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hey,

    I've send you an MP.

    "Are you going keep your Antonov Suit as open source"

    Yeah currently still planned to be open source !

    EDIT : Looks like your sky and tonemapping do the job quit well :).
     
    Last edited: Oct 4, 2014
  49. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
  50. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788