Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

CFTD [4] HDRP

Discussion in 'Assets and Asset Store' started by ginconic, Dec 22, 2015.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,847
    sorry to crash in here.
    but this is a preview of the upcoming cti update which brings a first preview on crack free tessellated bark :)
     
    ginconic and Ascensi like this.
  2. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579

    I'm very interested! I've tried using many tessellated rounded cubes clone over 200 times yet each one has a container containing it's shape as fragments to be exploded as 150 smaller pieces! I had it play back fine in VR using the asset "InstantOC" to hide cubes and their inner fragments not seen by the camera. I was also using 4k textures. I think if the tessellation shader has distance mode built in to fade out beyond 30 feet or so it should be perfect.
     
  3. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Have you tried using the current cftd 2.0 with those cubes? I'm curious about the performance. If fps in 2.0 is fine with those, it should also work fine with forces and effects.
    I don't have a working version of that yet though. Just an alpha-version of the tree shader. I'll try to dig it up and send you a version. But if you have updated to 2.0 you'll need the old crac-free buffer creator.
     
  4. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    @larsbertram1 I just checked the video, that looks pretty cool! I'd be curious to know how you implemented the tessellation.

    However, now that we've got PN-AEN in cftd2.0, we can (potentially) solve some annoyances with trees a bit differently. I think this could also be more close to the issue @Ascensi was referring to. Let's have a look at the following example:

    Here I've got a speedtree model (one from the white oak package). It's actually pretty good, save for some real hard edges here and there which really stick out.
    cftd-no-pnaen-tree-edgy-1.jpg


    Using PN-AEN tessellation we 'smooth' the tree shape only, rather than really add a lot of micro-detail, so to speak. The result is much better, I think. It's also what has been used in many next-gen titles. Far Cry 4 already seems to have a similar implementation.

    cftd-pnaen-tree-smooth-1.jpg


    With PN_AEN we only touch the shape a little without trying to fiddle with it by adding a ton of detail like I was also doing in my first tree example. This can easily be seen in the wireframe view. Actually, the smooth tree barely has been subdivided! So we don't compromise performance.

    cftd-pnaen-tree-wire-1.jpg


    I.e. the difference here is several thousand new vertices (possibly a lot more). If we are to have a forest, it would make quite a difference. A few fully tessellated trees with micro detail nearby could really stall performance. Of course, PN-AEN may produce some funny behavior here and there, so it would require some type of user control and then, of course, bending and forces.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,847
    thanks. i do not know much about tessellation and the shader is a pure surface shader (...) but in case you are still interested just send me a pm.
     
  6. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic I haven't tried 2.0 yet but I'll share some photo-realism with these bark textures I'm after
    https://www.rd-textures.com/

    I think a regular material for an LOD setup will work fine, close up would contain the tessellated material and the distant/LOD2 one would have it disabled.. combine that with InstantOC and a shader (maybe Cftd?) that uses packed texture configurations would be decent. I also plan to eventually use a texture streamer & compressor like Amplify Texture or Graphine to use HD textures without any performance issues.

    I will also be using World Streamer and that can also increase performance through streaming meshes, terrains etc.
    I'm still working on my strategy at this point, I have most of these assets except for the texture streaming ones.
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,847
    that pn_aen tessellation looks pretty interesting, even if i doubt that far cry 4 uses something like this.
    actually their trees have up to 50.000 vertices on the highest LOD so tessellation more or less is not really needed here i guess :)
     
  8. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    @larsbertram1 yep! you can see my first test even though I had the crack-free buffers applied, I was still getting some cracks. so I'm curious.



    @Ascensi I sent you the tessellated tree bark. Please check your messages. Those textures do look really awesome. They aren't really cheap so to speak though.
    Please, if you've got some results with the tree bark shader or with cftd 2.0, it would be great if you could upload some visuals!
     
  9. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Far Cry 4 has a feature on the PC called 'Tree Relief'. However, that's indeed just a less-fancy-sounding-re-branding for dx11 tessellation. I think it's not PN-AEN though, but rather just PN tessellation. In any case the entire feature is quite an underdog, I doubt many people use (if any). It's only there to make your video card cry.. (far-cry).
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,847
    oh, i haven't seen nor tested that feature – so just from its name it sounds as if is was some kind of relief mapping technique. something like what is offered by the uber shader package.
    that would mean that it was all done by the pixel shader. but i might be totally wrong.
     
  11. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    The added detail is probably POM (i.e. relief). However, the only way to smooth the branches (to my knowledge that is) is PN. Just like with the speedtree example above, with a small tessellation factor the overhead is minimal.
     
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Now that tessellation is added for metal soon in unity 2018.1 will this shader work on Mac in unity 2018.1?

    https://unity3d.com/unity/roadmap
    ( see the 2018.1 section of the roadmap for tesselation on metal )
     
  13. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    There is a high chance it already works, even under opengl. However, only directx is explicitly allowed in the code for the crack-free part (others fall back to regular tessellation).

    That's because I can only test it on a PC. If you're up for some testing pm me and I'll get you a free code for it ;)
     
    Lars-Steenhoff likes this.
  14. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    CFTD 2.1 is up on the assetstore and finally brings OpenGL support (OpenGL 4.5 on Windows was tested). Unity 2018 might bring support for other platforms as well.
     
    Lars-Steenhoff likes this.
  15. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    I wonder if this crack free shader can be worked to work with megasplat.. it would be really cool if it did.
     
  16. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    I own many assets and we have more in the office, but I'm afraid megasplat is not among them. From the description it seems it already has its own tessellation. In any case I have no way of testing msplat or why it would need to be crack free.
     
  17. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    Megasplat has tessellation, but it is just "normal" tessellation like any other, which means it has the same problem as the other tessellation shader that this asset is trying to solve. Megasplat is mesh based and it can be used on normal meshes not just terrain looking meshes.
     
  18. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    512
    Hi, it looks like this is abandoned? Does it work with the new SRPs (either URP or HDRP) and how does it compare to Unity's own HDRP tessellation shader solution?
     
  19. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I've used it just fine with Voxeland, no cracks.
     
  20. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    For the time being, the shader mostly targets legacy versions of unity and LTS. We use a modified version of the lab, and a stray cftd integrated with that. At some point I'd like to to push those changes to the assetstore version, but as you can see that doesn't happen quite often. I haven't really used HDRP; don't think the shader supports it.
     
    Flurgle and Lars-Steenhoff like this.
  21. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    It appears that Unity decided not to include a seam / crack fix in their LitTessellation shader (for various reasons that make sense), so this asset is still relevant, would love to see an update!
     
  22. MartinOrtiz

    MartinOrtiz

    Joined:
    Apr 12, 2018
    Posts:
    122
    I am interested in product, does it also work in a HDRP Unity3D project?
     
  23. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    No. I'm afraid it doesn't.
     
  24. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Actually, I started working on a CFTD port for HDRP. Coming soon (ish),
    cftd_hdrp01.jpg
     
    Flurgle and Bartolomeus755 like this.
  25. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    CFTD [4] HDRP has been released!

    Currently, you can upgrade from the older CFTD for $1. Looking for people who can test on VR, Mac (Metal), and consoles PS4 / Xbox / Switch.