Search Unity

► Vertex Ambient Occlusion Generator ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Sep 23, 2015.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Cover (2).jpg



    Editor and runtime tool for generating mesh ambient occlusion per-vertex and baking it inside vertex color.

    Editor tool supports all render pipelines.
    the runtime API currently supports only Built-in and Universal RP.

    Before purchasing check documentation for better understanding how tool works and what limitations it has and this editor tool, to try it on your mesh and check AO calculation speed.

    Screens_All.jpg



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Oct 19, 2022
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Last edited: Mar 3, 2020
    ZJP likes this.
  3. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Good new. Waiting for. :cool:
    What about the price?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Price: 15$



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  5. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Deal ...

    Edit :
    Can you post a picture with the 'Dirt Texture Option' activate?
     
    Last edited: Sep 29, 2015
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    dirt texture.png
    Mask With Alpha - Is a dirt texture strength measured by texture alpha.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  7. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Oh sorry, my bad : i mean a result picture (statue, teapot) with a Dirt Texture activated. :oops:
    Nevermind. I've faith in your product. :p
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Last edited: Mar 3, 2020
    ZJP likes this.
  9. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    Hi,
    You're mentioning this is also included with Mesh Materializer.
    But I can not find "Occlusion Render" option in Mesh Materializer.
    Is this feature only available on this asset or an update is coming to MM with "Occlusion Render" feature?
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Occlusion Render solver will be added to Mesh Materializer in coming update.
    Raycast solver is already there.

    Edit:
    Ambient occlusion and indirect lighting generator will be the same as in Mesh Materializer.
    All features added to this plugin will be added to Mesh Materializer too.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  11. Gozdek

    Gozdek

    Joined:
    Jun 21, 2015
    Posts:
    356
    Very nice.
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
  13. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Hurry up, price will increase on 1 of November.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  15. oceanq

    oceanq

    Joined:
    Apr 10, 2015
    Posts:
    22
    Hello, I just picked up your vertex AO baker, and have a problem. Say I have a bunch of copies of an object in the scene, like this:
    http://imgur.com/lDoA7n4

    And I bake AO on it - instead of every instance getting its own values, they all share the values of the first one:
    http://imgur.com/C4ms44T


    Which is obviously broken.

    I notice that if I combine them into a single mesh, then they work:
    http://imgur.com/HoRYCV6


    But I need them to be separate. Is this a bug? Is there a workaround?

    Thanks,
    Ocean
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It is not broken ;)
    In your case you need to change Mesh Asset Name property to some with (ID).
    For example: (meshName)_(ID).

    By default it's set to (AO)_(meshName) - it means that generated meshes (not main prefab asset) will have original mesh name with AO prefix.
    If in target selection are multiple meshes with same name - each one will overwrite previous inside save folder.
    Property with (ID) prefix/suffix will prevent it. As every object in Unity has unique ID, converted meshes will have also unique names and will not overwrite each other inside save folder.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  17. oceanq

    oceanq

    Joined:
    Apr 10, 2015
    Posts:
    22
    That works great! Thank you, it's an excellent tool!
     
  18. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,278
    Looks good, +1 for runtime support for procedural stuff. What will the new price be if I may ask?
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Price will be changed on 1st of November with 25$.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  20. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Deal at $15. Thanks. But $25 still a good price. :cool:
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    per-vertex-ambient-occlusion-Glass-Shutter.png

    Update v1.1 released.
    • For Occlusion Render solver Include Environment parameter is replaced with Layer Mask parameter.
    Layer mask defines scene objects that interact with Ambient Occlusion generator.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
    startleworks and theANMATOR2b like this.
  22. startleworks

    startleworks

    Joined:
    Jun 8, 2013
    Posts:
    34
    Hi Arkhivrag, I noticed you use a custom shader.
    What do I have to do to still use the asset but have a different shader?
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Custom shader is used only by Render Occlusion solver and if you change it final AO result of course is not predictable.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  24. startleworks

    startleworks

    Joined:
    Jun 8, 2013
    Posts:
    34
    I don't really understand.
    What I meant to say was, can I have the standard unity shader(PBR), that uses the GI etc AND add the AO data to it, somehow? I tried using 2 materials, with PBR underneath, but the AO shader doesn't have any transparency.
    Is this even possible?
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    OK, now I understand your question.
    All generated data is save inside mesh vertex color and to use it you need shader with vertex color support.
    Package contains only one such shader.

    To use mesh vertex color with other shaders and effects you have to manually modify them, or ask shader author (if purchased on Asset Store) to add mesh vertex color.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  26. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    And what about saving the 'AO result' as a texture?
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It needs uv layout per-pixel AO calculation, that is not purpose of this asset.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  28. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    :(
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Update v1.11
    • VacuumShaders assets synchronization. Required update for all VacuumShaders assets.
    • Added Vertex Color shaders: Unlit, One Directional Light, Legacy and Standard shaders.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
    startleworks likes this.
  30. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    Hi Davit. I have mesh Materializer and trying to just add AO to my mesh.

    But whenever I try, its always creates a faceted version in white. If I try to put the material into Default Material slot in your asset window, it then keeps the original mesh structure, but doesn't apply any AO? How do I get it to keep the original mesh and texture resolution but add AO to it.

    Using your demo scenes
     
    Last edited: Nov 26, 2015
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    So you are having problems with Mesh Materializer and not with this asset.
    Then why not use Mesh Materializer forum: http://forum.unity3d.com/threads/mesh-materializer.293796/
    Anyway, faceted version will not be created unless that option is selected.
    As for AO baking make sure you are using VertexColor/Unlit shaders, that shaders display only vertex color and help you find whether generated results are satisfied or not.
    Included Vertex Color shaders support texture and mesh vertex color using simultaneously.

    P.S.
    Not David, but Davit.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  32. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    Because its related to the AO which is the functionality i am having an issue with. Seeing as this is part of MM, does it really make a difference?

    Ok so made all those changes but still not the result im looking for. It needs to be the original mesh and texture but with AO baked on top of that. The one on the bottom right is the new created mesh, it firstly has a nulled down texture and not the original and also didnt receive the AO. I made it red so it would stand out, but nothing there.

    Thanks mm ao.jpg
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    OK, continuing discussing Mesh Materializer in Per-Vertex Ambient Occlusion forum.
    Can you generate only Ambient Occlusion to see if it works?

    Here is what I got
    Mesh_materializer.png


    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  34. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    hey man no need for your sarcasm, becoming very tedious very quickly.
    Secondly thats not what ive explained twice now. The second one doesnt retain the original material, i dont want flat shaded stuff. I want my original mesh and material but with AO baked in.
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    1. It is not sarcasm, just fact ;) forum messed up.

    2. Images I show you display data baked to vertex color, meshes there are not flat, but copy of original.

    3. As I wrote above included Vertex Color shaders support texture and mesh vertex color simultaneously.
    So when you bake AO for your mesh use any of included Vertex Color shaders. If using Unlit or One Directional Light shader check Texture using flag inside material editor.
    a1.png

    If you are using some third party or custom shader, then it must have mesh vertex color support.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  36. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    Thats it, but im stil not sure how you got there. I followed all instructions and have the default shader set to vertex/unit as per screenshot. Maybe a quick video or step by step screenshots.

    You cover all other functions on your youtube channel but nothing that gets to this stage, which is a very important part of using this asset. Thanks
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Yes, asset has improved so much comparing with the first release that tutorial videos are slightly oldish.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  38. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Have you considered adding DICE style transmission generation too? (Invert normals, bake AO, restore normals)
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Can not find much info about 'DICE style transmission' but here is quick results of - Invert normals, bake AO, restore normals

    Left one is ambient occlusion, right one what you asked for.
    DICE_2.png
    DICE.png



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  40. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
  41. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    So how did you make the blend with the original texture and AO?
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Thanks, will check.


    Ambient Occlusion is just saved inside mesh vertex color and then inside shader it is multiplied with sampled texture.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  43. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    Please show me using screenshots, i really dont know what you are refering to. thanks
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    After baking AO use any of provided VacuumShaders/Vertex Color shaders.
    If using Unlit or One Directional Light shaders enable texture flag inside material editor.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  45. oceanq

    oceanq

    Joined:
    Apr 10, 2015
    Posts:
    22
    I've got a bunch of data packed into vertex Alpha that I want to preserve, while still baking AO into RGB. Is there any way to bake RGB without also stomping on whatever's in the Alpha channel?

    Thanks
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Update v1.12
    • Fixed, losing some of sub-meshes when 'One Sub-Material' option is selected.
    • Fixed, losing some of sub-meshes when 'Combine Into One Mesh' is selected. Final combined mesh will have only one sub-mesh (itself).
    • Fixed original mesh vertex color blending with generated colors.
    • Inside editor generated data can only be save inside vertex RGB or Alpha channels.
    • Run-time script generator function changed. Removed 'SAVE_CHANNEL' enum option.
    • Added example scene for run-time blending mesh vertex and generated colors.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Yes,
    Inside editor generated results can be combined with original mesh vertex color.

    If blending inside RGB channel:
    finalColor.rgb = vertexColor.rgb * generatedColor.rgb
    finalColor.a = vertexColor.a

    If blending inside Alpha channel:
    finalColor.rgb = vertexColor.rgb
    finalColor.a = Grayscale(generatedColor)

    Inside run-time scripts it is up to you how mesh vertex color is blend with generated data.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
  48. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @Arkhivrag I'm trying to understand your plugin, is it at run-time or pre-computed (baked)?

    Also, could you tell me if it would meet my specific needs as mentioned below.

    I have a 3D FBX model of an airport that is split into 3 separate meshes inside Unity: the ceiling, the airport with all the details, and the outer wall. Due to the requirements of the project I'm working on the scene needs to be all white with Ambient Occlusion everywhere.

    I'm trying to weigh the cost of using a plugin tool vs having my artist bake the ambient occlusion and lighting into the textures of the models.

    I was wondering what are the benefits of using this tool vs having my artist do it? My artist mentioned that if they were going to bake the AO into the textures of the model, they would have to unwrap UVs on every part of the model first. Does your plugin automatically handle unwrapping UVs, or does it handle AO some other way?

    Thank you.
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Ambient Occlusion and/or Indirect Lighting is generated per-vertex and saved inside vertex color, no UV unwrapping is required and no UV unwrapping is done.
    Plugin works both in editor (generates mesh asset with baked AO into vertex color) and in builds using run-time API.
    Note, generated AO quality depends on mesh vertex count, if models are very lowpoly then better provide custom textured AO.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 3, 2020
    Ben-BearFish likes this.
  50. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Thanks for the info. Do you know if your tool has a demo version?