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

► Mesh Thickness Baker ◄

Discussion in 'Works In Progress' started by Arkhivrag, Oct 5, 2016.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Last edited: Mar 19, 2020
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Last edited: Mar 19, 2020
    Griffo and winning11123 like this.
  3. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    really cool!
     
  4. Kemonono

    Kemonono

    Joined:
    Nov 7, 2013
    Posts:
    303
    Can you tell a little more about it?
    Does it output a baked texture map? Does world scale influence it?
    And, have you thought about making a stand alone executable of it?
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    - Does it output a baked texture map?
    - Thickness is calculated per-vertex and saved inside mesh vertex color. No texture baking.

    - Does world scale influence it?
    - No

    - What about making a stand alone executable of it?
    - Not planed.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 19, 2020
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Last edited: Mar 19, 2020
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Last edited: Mar 19, 2020
    alexanderameye, iamthwee and hopeful like this.
  9. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    Still not 100% clear on what this does. From the looks of the GDC 2011 Colin Barre-Brisebois talk, it would seem this has something to do with subsurface scattering. However, with out some video showing it in action and slightly more in-depth explanation, its hard to determine what this actually does based from the short concise description and the photos.
     
    SpaceRay likes this.
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Tool calculates depth and bakes its grayscale value inside mesh vertex color. That's all tool does.
    How and where this data will be used is up to you, but mostly inside SSS and other shaders of course.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 19, 2020
    Inspeinre likes this.
  11. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    Thanks for the clarification, I would love to see an example of how this can be used with a SSS shader or other shader. Anything to help me get started in the right direction would be amazing. Thanks again Arkhivrag, your support is greatly appreciated.
     
    Inspeinre likes this.
  12. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    424
    Please I have some questions

    1 - What is different this mesh thickness baker from your own other subsurface scattering shader available in your store?

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

    What is the difference between this one, your other subsurface scattering, or other translucent or subsurface scattering shader available?

    2 - How is the influence of the light on this baked mesh created with this?
    I mean if the light is:
    .....2.1 inside the object
    .....2.2 outside the object but very close to it and could be seen the light through as backlit
    .....2.3 light from a far away object
    .....2.4 sun light or ambient light

    3 - Does the 3D model mesh that would be used with this mesh thickness baker need to have some specific requirements or be made in some special way? or it can be used any kind of 3D mesh model?

    4 - Does this have any limitation on what this baked mesh could be used?

    thanks for your help

    Perfect, Like it much, very well said, I totally agree with ethanwgross, the screenshots looks very cool and interesting, and I also share the same doubt, as I tried also to understand what really this does more clearly.

    Seeing the screenshots it seems that it would have some relation with subsurface scattering, and could convert a solid 3D object into an object similar to be made from a translucent stone (lighted from inside or backlit) ?

    I am sorry that with this explanation, I am still the same as before and still do not know what this can be used for.

    So please, can you help to explain it more in detail? I suposse that we both are not the only ones that do not know what this does exactly and how this could be used.

    If you want that people buy this, they should know what can be done with this

    If I understand correctly then:

    Does calculating the depth and bake its grayscale value inside mesh vertex color, would allow you to make something like the 6 examples below?

    1 - These translucent Jade stone bars?



    2 - This Jade translucent Jade skull?



    3 - This jelly like translucent shape with the torus being seen through



    4 - 3D illuminated cube lamps from a simple 3D cube?


    https://www.cgtrader.com/3d-models/architectural/decoration/illuminated-cubes

    5 - Or like this other illuminated objects

    https://www.cgtrader.com/3d-models/architectural/lighting/illuminated-decorative-light



    6 - Jelly with light inside



    7 - or make a cube like this one shown on youtube with a led light inside?




    thanks for your help
     
    Last edited: Mar 28, 2017
    alexanderameye likes this.
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    First of all - it is not a shader.

    Plugin generates mesh thickness and saves it (grayscale value) inside mesh.
    You can think about it as somekind of additional data inside mesh (like normal, tangent, uv) that can be used by shader.

    How shader will use that data is up to you (or who writes shader), I just provide you that kind of data that mesh mostly will never have by itself.

    hebe.gif
    Captured by Render Monster

    Better have mesh without holes, or algorithm will understand point as very (very very very) thick and will just bake as 0 (zero) black.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 19, 2020
  14. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    424
    So the main difference is that this is not a shader, and is a tool that generates thickness data inside mesh that can be used by a shader, ok understood this.

    But I am sorry that I still do not see the relation with this and what is shown in the video and 39 pages slides, that are about subsurface scattering and sorry that I still have not solved the main points:

    Please, Can you give more example and explain more how this can be used?

    what is this really for? I mean that is supposed that this is to give translucency to solid objects according to the video above, but what is different this from the subsurface scattering shader?

    Possible Examples How to use it? (I know you have told that it is up to the user but could give some example uses)

    What shaders can be used with this? What is compatible with thickness mesh data?

    Why would you like to use this instead of subsurface scattering shader?

    Thanks
     
    Last edited: Mar 31, 2017
    alexanderameye likes this.
  15. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    585
    I just bought this..On first try - Error trying to generate..anything.

    Windows 10 Unity 2017.2

    Generating failed :(
    Object reference not set to an instance of an object
    UnityEngine.Debug:LogError(Object)
    VacuumShaders.MeshThicknessBaker.MeshThicknessBaker_EditorWindow:Draw_GenerateButton()
    VacuumShaders.MeshThicknessBaker.MeshThicknessBaker_EditorWindow:OnGUI()
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Its your window..

    Run time works, even my mesh..
    I download Unity's FBX Exporter, and will try to export the runtime result that works., but our Editor window will not generate, with your example meshes.

    I will try an earlier version on unity..

    Patrick Force
     
    Last edited: Dec 10, 2017
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Fixed, download new version from the store.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 19, 2020
  17. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    585
    Thank you.
    p-
     
  18. DarKhar

    DarKhar

    Joined:
    Jun 8, 2017
    Posts:
    2
    Just bought, getting some errors as i'm trying to bake anything on unity 2018.3


    Generating failed :(
    UnityEngine.Object UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(UnityEngine.Object)
    UnityEngine.Debug:LogError(Object)
    VacuumShaders.MeshThicknessBaker.MeshThicknessBaker_EditorWindow:Draw_GenerateButton()
    VacuumShaders.MeshThicknessBaker.MeshThicknessBaker_EditorWindow:OnGUI()
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Works fine in 2018.2 though.
    Great asset
     
    Last edited: Feb 8, 2019
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Already fixed. Download new version v2019.1



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 19, 2020
  20. OldLegWig

    OldLegWig

    Joined:
    Mar 18, 2018
    Posts:
    95
    The occlusion method does not work. It just hangs forever and forces me to kill and restart Unity.
    I've only found parameters that output anything other than all black once - a splotchy pattern that wasn't useful - and when I ran it again, same settings same mesh, it output all black again. Running 2019.3. Thanks for your help.
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Just tested using Unity 2019.3.2f1 and found no problems.

    Contact me support@amazingassets.world with more detail info about your problem.
    1) Exact Unity version
    2) OS
    3) Build Target
    4) Render Pipeline
    5) Project Color Space
    6) Are there any other third party assets in the project? If yes, then can you try with new empty project?
    7) Does included example scenes and meshes have the similar problem?
    8) If problem is only with some specific mesh, can you send me that mesh too.
    9) I'll have to ask for asset purchase invoice.



    Amazing Assets - YouTube Facebook Twitter
     
  22. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    329
    I've rendered this out using the baker, but I cannot determine how to apply this to a SSS shader depth channel as the shader required a depth map texture and none is output.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,463
    Tool bakes Thickness data inside mesh vertex color. If you need this data inside shader, you have to add vertex color support to that shader and read it there.



    Amazing Assets - YouTube Facebook Twitter
     
unityunity