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

► Beast ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Feb 3, 2017.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Currently can not test myself, but do not see the reseaon why it should not.



    VacuumShaders - Facebook Twitter YouTube
     
    Tethys likes this.
  2. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I was wondering the same. Were building a VR game right now(using Vive) with Procedural voxel terrains and have been making the rounds with the various shaders on the asset store. Of course would have to wait for a triplanar version before we could test.
     
  3. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    404
    I have a VR project as well. Would love be to use this shader if it won't give any weird artifacts and performs well.

    Can it be used for VR and do you have any metrics regarding VR?
     
  4. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    163
    @Arkhivrag Thanks, in some cases it's fine to just use one smoothing group, but certainly shouldn't most of the time. I appreciate the solution nonetheless.

    I was tinkering around with it today a lot more, and I'm a bit confused about some things. First of all, I'm not sure if I'm doing something wrong or what, but I can't really see a difference between Beast and the UBER tessellation variants - for the test I'm using 4k maps, the meshes are tessellated like there is no tomorrow in both shaders but putting them side by side and I can't spot a single difference between them[the one on the left is Beast, the on the right is UBER].
    2017.03.16-21.00.png
    Is this expected or I'm missing something? Even tho I was using some really high quality textures I couldn't seem to reproduce the level of visual quality you had on the pictures - what's the secret of those?

    Also I didn't investigated this thoroughly, but something seems off when the GI is baked - currently I don't have the time to set up a proper scene, but based on these debug shots I'm not sure if it would work correctly
    2017.03.16-22.20.png 2017.03.16-22.22.png
     
    buttmatrix and ftejada like this.
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,382
    Isn't recalculating the normals/tangents on interpolated/displaced vertices mathematically incorrect?

    Imagine that we're casting a high res mesh vs. a plane to create our normal map. The normal map contains the difference in light reflection vector (normal) vs. the original plane (points up), with the height map containing the difference in height. The theory is that via tessellation/displacement and the normal map, we are reconstructing this surface on the GPU.

    So, in the shader, we tessellate and displace the vertices; this moved them to the place they were in a high resolution mesh. Now our vertex is in the right place, but it's normal/tangent still points up.

    But after we apply our normal map, our normal/tangent now point in the correct direction they did in the high res mesh producing the correct result, because those angles are stored vs. an up vector.

    Now lets consider this new technique, where you recalculate the normal/tangent for the interpolated/displaced vertex. You take a couple of samples from the height map and generate your new normal/tangent or use the ddx/ddy to generate a new normal, then perturb it by your vertex normal. In this case, the resulting normal used for lighting is NOT a reconstruction of the high res mesh, but something totally different. I would expect this, at best, to produce a kind of contrast effect on the lighting (which could also be done cheaper in the lighting equation).

    So, IMO, this seems like more of something you would do with bump mapping- not normal mapping. Now, keep in mind that many games use bump maps and pass them off as normal maps; but if you are working with a high quality quixel/substance/PBR style workflow, I would expect this to mostly produce a minor distortion to your lighting normals which would exaggerate the lighting.

    Now, if you're NOT using normal maps, then this makes a lot of sense, because you want to interpolate the normal in that case. Or if your normal maps are not used as part of a surface reconstruction (ie: bump maps).
     
    buttmatrix likes this.
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Currently can not test myself, but do not see the reseaon why it should not work or have any problems.



    VacuumShaders - Facebook Twitter YouTube
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    I do not have UBER ,can not compare, but those images look very similar.
    As for Beast promo images quality, I was using these textures collection. Includes all PBS textures. No secrets, just Beast and everything on max quality.
    GI is fixed in v2017.4 Just download new version.



    VacuumShaders - Facebook Twitter YouTube
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Similar question here #78



    VacuumShaders - Facebook Twitter YouTube
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,382
    Not trying to be mean about it, but this is totally incorrect.

    You're showing screenshots without normal maps; of course they are going to look better. You're technique only makes sense if you're working with non-normal mapped geometry, but who does that with tessellation?

    With a proper normal map, the tangents and normals should NOT be recalculated per displaced vertex, because the normal is already encoding the correct lighting vector vs. the original plane- so adjusting those normals/tangents is producing a wrong result, because you're no longer applying this against the original normal it was cast from. Now, you can always argue that you like the way something looks, and that can be fine in graphics, but it's not correct, and the shader pays a hefty price tag for it (2 extra samples and a bunch of math).

    You may have to do this in your curved world shader because you are changing the basis onto which the normal mapping is applied; what was once flat is now curved, so you want the lighting normals to be curved as well, as you need that flat plane to wrap around until it meets itself again.

    But it makes absolutely no sense to do this for a standard tessellation shader. Essentially, beast is just Unity's standard shader w/ tessellation, with a much more expensive tessellation stage who's only benefit is to make the lighting incorrect. With the effect being very minor, to boot. I would suggest at least turning this into a shader_feature so users can turn it off, since it's rather expensive.

    I downloaded your shader this morning to see if I was missing anything; here's a comparison shot of the same texture using standard Unity tessellation and beast:




    Also of note:

    - You need to set the target to 4.6 to make it run on OSX platforms.
    - You have a precision issue somewhere in your pipeline causing that 'triangle' look in the shading on your example scene. You should be able to remove this, though I haven't looked enough to figure out where it's coming from. Maybe from those un-normalized/skewed normal/tangents you munge as "tangentCoef/normalCoef"?
     
    antoripa, buttmatrix, Flurgle and 4 others like this.
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    - Yes, making tangent calculation optional makes sense. Will be added int the next update.
    - Compilation target can be easily changed just from one file CompilationTargetLevel.cginc (at my side I need it to be 5.0)



    VacuumShaders - Facebook Twitter YouTube
     
  11. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    709
    Hi Arkhivrag, are you considering add some crack free solution?
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
  13. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    709
    Thanks, I already saw the post ... i hope in a more robust solution.
    Could make the difference versus other tessellation shaders.
     
  14. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    @Arkhivrag dont use ddx, ddy with tessellation. It's not very stable and might produce artifacts in VR.

    Use:
    Code (CSharp):
    1. float me = tex2D(_HeightMap,IN.uv_MainTex).x;
    2.                 float n = tex2D(_HeightMap,float2(IN.uv_MainTex.x,IN.uv_MainTex.y+1.0/_HeightmapDimY)).x;
    3.                 float s = tex2D(_HeightMap,float2(IN.uv_MainTex.x,IN.uv_MainTex.y-1.0/_HeightmapDimY)).x;
    4.                 float e = tex2D(_HeightMap,float2(IN.uv_MainTex.x-1.0/_HeightmapDimX,IN.uv_MainTex.y)).x;
    5.                 float w = tex2D(_HeightMap,float2(IN.uv_MainTex.x+1.0/_HeightmapDimX,IN.uv_MainTex.y)).x;
    6. // ....
    7.                 float3 normalOffset = -_HeightmapStrength * ( ( (n-me) - (s-me) ) * perp1 + ( ( e - me ) - ( w - me ) ) * perp2 );
    instead ;)
     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Beast does not use any derivatives (ddx, ddy, fwidth and things like that).
    Thanks for code, but Beast uses more optimized method ;)



    VacuumShaders - Facebook Twitter YouTube
     
    antoripa likes this.
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    pixelsteam and local306 like this.
  17. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    hey,

    i am getting error using the script (unity 5.4.1f1):

    Assets/smoothy.cs(10,17): error CS0246: The type or namespace name `Dictionary`2' could not be found. Are you missing a using directive or an assembly reference?
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    On the very first line of the script file add:
    Code (CSharp):
    1. using System.Collections.Generic;


    VacuumShaders - Facebook Twitter YouTube
     
  19. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    thanks :)
    i knew i was missing a namespace thingy, but not being a coder, i wasn't sure wich one.
     
  20. Kazuya-Chang

    Kazuya-Chang

    Joined:
    Feb 1, 2016
    Posts:
    2
    Does this shader support Unity terrain?
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Currently no.



    VacuumShaders - Facebook Twitter YouTube
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Found unreleased video of the Beast. This video was captured before the snow scene and then I forgot about it. unfortunately not in 4K.




    VacuumShaders - Facebook Twitter YouTube
     
    Tethys and sjm-tech like this.
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    Am I missing something or did jbooth recently show that Beast isn't any different than Unity Standard Tessellation except that Beast is doing some things incorrectly?
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Just unnecessary tangent reconstruction in some situations. In the latest version it is optional.



    VacuumShaders - Facebook Twitter YouTube
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    OK, but in the comparison shot shown by jbooth, the results are virtually identical. So what does Beast do that you can't get with Unity's shader? What's your selling point? Thus far I don't see one.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Beast is built above Unity free tessellation shader and offers several major improvements:
    • Normal/Tangent recalculation inside domain stage (tessellation shader pass). Giving better light interaction after displace effect (especially if using no bumpmap).
    • Integration into Unity Standard shader with fully usage of physically based shading.
    • Supports lightmapping and global illumination.
    • Faster shadow caster pass with controllable tessellation LOD.
    • Fully compatible with all type of Image Effects.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 9, 2017
    sjm-tech likes this.
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    Thanks for the clarification.
     
  29. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    812
    Hello Arkhivrag,

    I am interested in your asset, since I am working on a game for Xbox One but I was wondering if your asset would work on Xbox One. Right now I am using the Unity tessellation shader and it works well, specifically the one based on distance. But your asset seems to have depth and shadows.

    Regards,
    Carlos
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    If Unity free shaders work on Xbox One, Beast should work as well.



    VacuumShaders - Facebook Twitter YouTube
     
  31. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    279
    What about performance? any chance to use it for VR with decent fps(small scenes)?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Depends on tessellation strength, but mostly performance will be excellent.



    VacuumShaders - Facebook Twitter YouTube
     
  33. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Yes, it works very well in VR ... (baked lighting):

    Capture2.JPG

    but the cracks at corners and UV shells are kind of a gotcha ...

    Capture.JPG
     
    Last edited: Apr 7, 2017
  34. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    [EDIT]
    Next update will include editor solution for generating 'crack-free' tessellation mesh.

    If this is handled well (cracks and UV shell edges) I will be sold. I was messing with Beast at a friend's house and we were getting really nice results with baked lighting + normal maps - and up close in VR it looks pretty amazing (in the limited tests I did) but the cracks are the killer for my current project. If this gets fixed (and I know it can be because there are other shaders that have fixed it) I will be on board :)
     
  35. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    812
    Hi guys,

    Just in case that you are not aware of it, the cracks are very easy to fix if you have the UVs of the texture and photoshop or any other image editor software. All you have to do is to paint a line around the edges of the shells(uvs shells) with a grey color(128 for all RGB channels) in the height texture, and done. That will totally remove the cracks of any tessellation shader.

    Regards,
    Carlos
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Next update will include solution for generating mesh with smoothed normals for reducing cracks on edges. It is not 100% crack-free.



    VacuumShaders - Facebook Twitter YouTube
     
  37. Wappenull

    Wappenull

    Joined:
    Oct 29, 2013
    Posts:
    11
    Just tried your asset today. Nice! It does the job but there is some point that I have to comment, correct me if I'm wrong.
    1. It is quite disappoint that you did not include more sample scenes, maybe at least the one that you used in your screenshot slide show. The snow and rock screenshot was incredible, but it is nothing if we cannot try or see it in Unity. Or are they closed-source or proprietary?
    upload_2017-4-12_18-40-21.png

    2. The height multiplier input is quite small, it took me some time to figure it out that it was here.
    upload_2017-4-12_18-29-38.png
     
    Flurgle and Shodan0101 like this.
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Textures used in pormo video and posters are here.
    Makes sense to change Displace Strength parameter position inside material editor.



    VacuumShaders - Facebook Twitter YouTube
     
    Shodan0101 likes this.
  39. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    709
    HI Arkhivrag,
    I'm testing the new update on the unity cube and with the new crack reduction and seems very promising.
    Are you still working on an 100% free?
    Max

    Crack reduction Off (crack 100%)

    Crack reduction On (crack 50%)
     

    Attached Files:

  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Currently that is all.
    In tessellation there is only one method that can generate crack free displace completely inside shader called PN-AEN. (have some difficulties to implement it in Unity)
    For now, to get rid off cracks on edges you will have to manually adjusts displace texture (using PhotoShop) or provide mesh with smoothed UVs (saved inside UV1).



    VacuumShaders - Facebook Twitter YouTube
     
    sjm-tech likes this.
  41. Wappenull

    Wappenull

    Joined:
    Oct 29, 2013
    Posts:
    11
    I see, €124.17, it is quite the price there.
    But the pack looks very good.
     
  42. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    177
    Hey @Arkhivrag
    I saw requests for tri-planar shaders, any plans for implementing splat maps or other ways to reduce tiling? (I would assume right now that the shader will tile over large distances correct?)
    Cheers,
    Colton
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
  44. Swearsoft

    Swearsoft

    Joined:
    Mar 19, 2009
    Posts:
    1,626
    Hey man,

    we faced this issue with your shader
    https://forum.unity3d.com/threads/tessellation-problem.452026/

    Scaling affects how the tessellation works and it ends up being screwed up.
    The script in the thread fixes it.

    There is a solution in the thread, check it out, it might be something you can address, implement or add as an option
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    Do Unity tessellation shaders do the same? Or only Beast?
    For me it seems to be Unity Engine bug.



    VacuumShaders - Facebook Twitter YouTube
     
  46. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    110
    HI Davit, does it work with unity 2018.1 mac and ios metal ?
     
    Lars-Steenhoff likes this.
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    2018.1 will be supported after it is officially released.
    As for iOS metal, if Unity built-in Standard shader and Unity tessellation shaders works on your device then Beast will work too.



    VacuumShaders - Facebook Twitter YouTube
     
  48. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,743
    Shader error in 'Standard (Tesselation)': invalid subscript 'instanceID' 'UnitySetupInstanceID': no matching 1 parameter function at line 166 (on metal)

    StandardTesselated

    2018.1 beta2 with Mac on metal
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,454
    2018.1 will be supported after it is officially released.



    VacuumShaders - Facebook Twitter YouTube
     
  50. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,743
    allright, thought I would test that standard tesselation shader already ;)
     
unityunity