Search Unity

CFTD [4] HDRP

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

  1. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    CFTD [4] HDRP
    Production-Grade, Performant Crack-Free Tessellation Displacement Shader for Unity 's HDRP

    cftd_4_screencube_01.jpg

    The only crack-free tessellation displacement solution for Unity's HDRP (as of mid 2020)

    Asset Store Link


    CFTD [4] HDRP is here. Again, re-written from the ground up!
    CFTD 4.0 HDRP (Jun 2020)
    * CFTD supports HDPR 7.3.1 +
    * Lit Variant support only.
    * Tested on DirectX 11 / 12.



    CFTD

    Crack-Free Tessellation Displacement for the Unity Standard Rendering Path


    cftd_screenshot_01.jpg


    The only crack-free tessellation displacement solution for Unity. Current version: 2.2​

    Asset Store Link
    Documentation (Standard RP)

    Demo Scene (Outdated, Demo Scene was made with CFTD 1.x)



    NEW VERSION: CFTD 2.0 has been re-written from the ground up!
    New in CFTD 2.2 (Jun 2020)
    * CFTD now supports Vulkan.
    * Improved mesh swimming reduction (displacement miplod).
    * Better support for baked displacement maps.
    New in CFTD 2.1 (Jul 2018):
    * OpenGL 4.5 support (the shader might possibly support other platforms as well, such as GLES 3 in Unity 2018); Please note, only OpenGL 4.5 on Windows has been tested.
    * Further performance improvements.

    New in CFTD 2.0:
    * Supports PN-AEN Tessellation (adds geometric detail and smooths meshes, while persevering hard edges).
    * Supports GPU Instancing (helps with reducing batches).
    * Full support for Unity's PBR workflow.
    * Better shader performance.
    * AAA, industry-grade reduction of adaptive tessellation artifacts (an issue known as 'mesh swimming').

    What exactly is CFTD?
    Crack-Free Tessellation Displacement (CFTD) is a set of tessellation shaders designed to patch 'cracks' that occur when displacement is applied to a model with UV discontinuities. I.e., if your model's texture does not tile perfectly, this will result in displacement cracks on the edges where the tiling breaks. That's because the displacement values at the neighboring texels would be different. Fixing this issue requires extra calculations and an extra buffer to store all the data. Luckily, CFTD does exactly that.

    Limitations:
    * CFTD does not support skinned meshes(you can apply the shader, but it will not be crack-free).
    * DirectX 11 /12 PC, OpenGl, Vulkan tested only (Metal has not been tested).
    * Cracks are gone at runtime only.
    * No static / dynamic batching.
    * Tessellation is a somewhat slow technique.

    Features and generally good stuff:
    * Unity's first (and only) crack-free tessellation shader. Patches edges at UV discontinuities.
    * Smooths normals on the edges between smoothing groups (hard edges) in a very neat and unique way (Distance Based).
    * FOV-dependent (Edge Length). I.e. supports camera zooming-in.
    * Shadow caster LOD (as of 2.0 in Deferred Rendering only). You can optimize tessellation on the real time shadow caster.
    * Works with your existing assets.
    * Casts and receives full shadows & Supports Unity's GI..
    * CFTD includes a static subdivider to imrpove tesselation on very low-poly meshes.


    CFTD comes in tow variants (each with or without PN_AEN): Edge Length & Distance Based.

    Distance Based:
    * Smooth fading of tessellation and displacement with distance. No popping and strange stuff when far, looks good up close.
    * Smooths normals on the patched edges. This feature is pretty unique. Haven't seen any other shader do that, even in UE4.


    Edge Length (notice the hard edges) / Distance Based (smooth between different smoothing groups)

    Edge Length:
    * Tessellate tris based on desired pixel size. Improves "mesh swimming".
    * Uses its own tessellator. While the technique is close to Unity's own, it's a bit faster and incorporates the tessellation culling that the original Unity Edge Length tessellator did not.
    * FOV - dependent: When you zoom in with the camera, tessellation is a applied normally.

    Here is an example of the FOV dependence of Distance Based. In this example, the camera is way far from the mesh and has a FOV of 3 (almost orthographic projection).


    Distance Based (tessellation and displacement are gone!) / Edge Length (all works fine!)​


    Please leave a rating and/or a review.
    Thank you for viewing! :)
     
    Last edited: Jul 4, 2020
  2. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Roadmap for CFTD [4] HDRP:

    * add support for Vulkan
    * bug fixes
    * support for layered lit (not planned but might be good to have).
     
    Last edited: Jul 4, 2020
  3. B1BHO

    B1BHO

    Joined:
    Feb 10, 2016
    Posts:
    2
    Hi, I've purchased your package "Crack Free Tassellation Displacement shader".it works fine on simple meshes, but on complex meshes I can see my texture stretching alot near the UV seams of my mesh and where your script fills the meshe's cracks, can you help me to fix it?
     
  4. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Indeed on some meshes this may become an issue with the current version of the shader. I've already made some improvements on this but it will take a while before the new version is finished. A temoprary fix would be to lower the uv seam stretching in the shader code to something like 0.05 or lower.
     
  5. B1BHO

    B1BHO

    Joined:
    Feb 10, 2016
    Posts:
    2
    Can you please indicate where in the shader code we should modify this seam streching?
     
  6. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Right. Sorry about the delay. In order to do that, you would need to open the .shader in monodevelop or other editor. Then simply replace:

    v.texcoord.xy = lerp(dispCoords, v.texcoord.xy, 1.0 - (_Displacement * 0.2));

    with

    v.texcoord.xy = lerp(dispCoords, v.texcoord.xy, 1.0 - (_Displacement * 0.05));

    There are all together 5 occurrences; simply replace all. Currently the shader just linearly interpolates between the uv islands for the diffuse (and normal) maps. If the uv islands are far apart, the interpolation becomes more noticeable. Like I said, I'm working on better solutions than the one currently incorporated. It's just that this looked good on most situations where it was tested.
     
  7. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    looks great! does/can it support a detail map? I use allot of 1:1 scans with a detail pass for fine normal deets.
    Thanks
     
  8. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Detail maps are not implemented (although very much possible). Quite frankly though, that's a really good idea.. Didn't really think of that.

    Anyhow, I'm working on a game right now, once it gets done, the CFTD shader would be the first to get some TLC. Detail maps would be good to have; and pretty easy to do.
     
    DrewMedina likes this.
  9. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Alright, I think it's finally time to update this shader. First things first, it needs better stretching on the edges. This is done by some mumbo-jumbo math in the shader itself and it still needs to be tested.

    Here are the results:



    Obviously, there is still stretching. Unfortunately, and please trust me on this one, there isn't much to be done on the issue. The shader will not do any magic. Actually, the test assets only show that the shader works as intended, it shouldn't really be used under such extreme settings.




    Finally here is a test of the same brick wall model with flat tessellation & crack free displacement under UE4. It's somewhat close to the new approach. I'd imagine it would look similar in CE.

     
  10. TLMultimedia

    TLMultimedia

    Joined:
    Feb 19, 2014
    Posts:
    61
    Hi. I have tried your free version and like the Phong/Smooth version.
    However it does indeed crack at UV seams.

    Does this pack offer the equivalent without cracking?
    I can't see phong/smooth listed in the file listing but I'm hoping one of the listed shaders will do it.

    Thanks
    TL
     
  11. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    EDIT: As of CFTD 2.0, it does!

    No, CFTD does not currently offer an equivalent.
    A crack free smoothing needs PN-AEN tessellation (Point-Normal Triangles using Adjacent Edge Normals); phong still results in cracks. I'm planing on doing it some day, but really, I cannot give any estimates when PN-AEN is coming to CFTD..
     
    Last edited: Nov 23, 2017
  12. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic Hi I just bought your crack free tessellation shader today. I'm using /Unity 5.4 pro The free version displaces fine in the editor but the crack free shader doesn't even tessellate/displace (I understand the cracks only disappear at runtime. but normal displacement doesn't work. I tried contacting you on your website but your captcha code doesn't display an image so I can't send you a message there. Please include optimal texture settings if different from the free version.
     
  13. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    In the paid version (CFTD), displacement texture must be added to the alpha channel of the Albedo (Diffuse) texture. There is no separate input for displacement texture, in order to save tex resources, since displacement is just grayscale.


    If, however, the shader is not tessellating (i.e. you change the tessellation settings, but it does not add triangles), that would be a different issue. You can check this by simply selecting an object in order to see the wireframe (if there are more triangles, it is tessellating, but it is not getting the displacement texture properly).

    I am afraid I'm on a holiday right now and will be back mid-next week and I would not be fully able to test the issue on my machine and/or rewrite the shader. CFTD is using it's own tessellator, so there is a chance it might have broken somewhere; especially if you use other custom shaders. For support it's usually better to straight- use the support email address on the publisher's assetstore page :) The 'support website' in our case is just the old 3d scan store we had.
     
    Ascensi likes this.
  14. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic thanks for the info! I did manage to get it working although I had to add the normal color texture to the secondary Albedo x2 and do some tweeking to get proper color to show through. I'm still working on setting it up with multiple models so I haven't seen the crackless results yet.. I'm sure it will work. Enjoy your holidays! :)
     
  15. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Thanks! There is a slider called 'diffuse burn/ao' that affects your color quite a bit if turned up. The shader does need some tweaking and time to get used to. Please note cracks close only if you add the crack free cs script to an object.
    A current limitation of the shader is that you need to disable batching on objects that need to have cracks closed. The demo scene provides some more info. You can of course combine objects using some free (and paid) scripts, if you have to, but it has been tested with hundreds of separate objects and performs quite decently. GPU instancing 5.4 has not been tested yet, but should it work, that would improve things quite a bit.
     
  16. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    So just a quick note: I used the RDT (Real Displacement Textures) from the Allegorithmic's webstore


     
  17. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Well, I tested it with their free cobble stone sample and it works out of the box. Here are the results:






    Now, as far as files, you only the Color, Depth and Normal maps from their assets. Workflow for me was: insert Depth texture as an alpha in the Color map > save as TGA and import in Unity (no tweaks to the texture / advanced stuff) > then import Normal map as a normal map and add them to the material.

    As far as CFTD goes, it always works better with detail maps. In fact, it is better to use smaller main maps (i.e. 4k is just an overkill) and use very small, super- tiling detail maps.

    CFTD pimps the material based on the Depth map, it does not need Gloss, Spec, Roughness or AO maps; it creates those values automatically based on the slider settings.
     
  18. KenneyWings

    KenneyWings

    Joined:
    Sep 29, 2016
    Posts:
    32
    I've tried the two included materials but whenever I select a different texture there's no displacement, is there a way to select the displacement map or should textures be prepared for use with the shader? Not sure what's going wrong, the readme file doesn't include instructions on how to do this.
     
  19. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    The way it works currently, your height (displacement) map needs to be the alpha channel of the albedo (your diffuse map). New version will have a texture combining plugin, among other things, but for now the only way to combine these is manually in an image editing app.
     
  20. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    Hi, I bought your asset and am trying it out right now. Is there a way to adjust tesselation so that if a mesh is not a square shape that it wouldn't tesselate more in the other direction than in the other. The example brick wall you have is nicely squarish shape, but when I try to apply it to a tall block, it looks something like attached. The shorter the distance, the more it tesselates.

    Even manual controls for adjusting it x y z would work well enough.
     

    Attached Files:

  21. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89

    Unfortunately, gpu tessellation does't quite work that way. It puts the new vertices at a position on each mesh edge that is, more or less, divider dependent.



    This means if we have a triangle (think a polygon) that is very far off from being equilateral, the resulting tessellation is just... well what you have already. The only way to bypass this is to subdivide the mesh before sending it to be tessellated.
    Now, I know this will sound like I'm just promising stuff, but I've already included a script that subdivides meshes before scene startup, which will help with this very issue a little bit. But the new version of cftd is not ready yet, and as it looks I'll only have time to work on it over the Christmas holidays.
    In any case, even that script will not fully fix the issue you have, because it subdivides in a similar way to what I've already described. If you, however, take a look at the brick wall mesh in the demo, you'll notice it was subdivided in an external modelling app before being even imported. It was done with 3ds max's 'subdivide' modifier which actually tries to make equilateral triangles.
     
  22. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579

    If one was to use a runtime subdivision tool would your no gpu displacement shader avoid cracking? I'd pay for a runtime subdivision system that can use displacement without cracking and even better if it was to work on all platforms.
     
  23. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    Ah, thanks for the info, very helpful.

    It would be fantastic to have a tool/script that would subdivide equally based on the physical size of the object - lets say once per n centimeters. And you could even perhaps set l, m and n for x, y and z.

    Perhaps it's not technically called subdivision in that case, more like ... grid geometry add or whatever. I know I'm simplifying the problem somewhat, you still would need to deal with the original vertexes somehow.

    Anyway, I think I can do this myself manually, but it sure would be cool if your script could do this on the fly. :)
     
  24. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Possibly; if the shader were made to do so. However that subd script divides at scene startup, not during play. Although I haven't checked, I suspect it would be too slow to subdivide on the cpu on the fly like gpu tessellation does.
    In other words, to get the same level of detail, you would have to pre-subdivide a given mesh so many times, it would clog the gpu with tons of vertices that will always be there. It would not fully have the benefit of tessellating on the fly based on distance.
    The only scenario where this would all work, would be if you want to add just a bunch of vertices on, say, a floor or a street in order to make some variation on the surface and not have it looking completely flat and unnatural.
    All this said, tessellation works on opengl core Unity supported platforms; even on mobile. The free shaders should work. CFTD however requires the dx buffers and for now (and possibly forever) only works under directx.


    Delaunay triangulation; that's what modeling apps usually use to divide and subdivides somewhat equally. Although a grid slicing method is a really good idea. I'll have to tap into these at some point.
     
  25. HR0THVITNIR

    HR0THVITNIR

    Joined:
    Nov 21, 2013
    Posts:
    24
    Still working on this? No posts or updates in a while.
    Any news on PN-AEN for those needing smoothing?
     
  26. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic error in Unity pro 5.5.0f3 Assets/DX11_Tessellation/Crack_Free/ComputeCrackFreeBuffers.cs(310,17): error CS0165: Use of unassigned local variable `outEdgeR'
    I haven't even added any models to tessellate yet to the hierarchy in a new project and I'm getting this error.
     
  27. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Yes. Currently working on the official demo scene for the next update. Also CFTD can now compute buffers in real time (for those brave enough to try it with real time destruction plugins) and other neat stuff. Problem is I'm slow, and there are other projects on the queue. Sorry about all the wait.

    PS: Just as a proof that I'm not making stuff up, here is a screen from the demo scene ;) And yes, you can see based on the screen a while ago that it has been taking forever...


    OK, well now that's just disturbing .. not to mention embarrassing. Will have to look into this.
     
  28. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    When you have a fix for this can you pm it to me? I've been working with dev of CaronteFX's fragment & destruction asset to make it work with your crack free system but since he was able to show that it worked, I installed your system with his in a new project and haven't been able to test it.
     
    Last edited: Jan 15, 2017
  29. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Well, to be honest this is a complete BS error. I checked and it seems you could easily fix it by double-clicking (to open in mono or other editor) and replacing
    "Edge outEdge, outEdgeR, wantedEdge = null;" with "Edge outEdge = null, outEdgeR = null, wantedEdge = null;"

    I can still send a fixed CS buffer maker for the 1.5 version. This kind of error should not be appearing, but hey, I guess we should rather be getting used to a new Unity version literally breaking everything. And, unfortunately, 5.5 also breaks the demo scene..

    Furthermore, I have no idea how Emilio, the Caronte dev, got it to work, coz he ain't got the new version either. That guy knows stuff, I guess.
     
    Ascensi likes this.
  30. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Thanks you! I really appreciate the fix. I'm not a programmer myself.. these errors are over my head. I haven't got to test his fragmenting system yet but he sent me a screenshot so I hope it all works for all my mesh slicing and tessellating needs.
     
  31. Visualise

    Visualise

    Joined:
    Mar 3, 2015
    Posts:
    3
    @ginconic

    Hey, I'm getting this error but only in my own scene and not in the demo scenes (where it's working fine)? Any idea what's happening here? Thanks! Love the shader, by the way!
     
  32. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89

    That means there are duplicate vertices on the mesh. Technically though, this error should not be appearing (either). Would it be possible to send the mesh that you used?
     
  33. Visualise

    Visualise

    Joined:
    Mar 3, 2015
    Posts:
    3
    I tidied up the mesh a bit in Blender and it's working fine now! I believe splitting the non-planar faces on the model sorted it out. Thanks for responding so quickly.
     
  34. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    That's really cool, but it would be helpful to examine the mesh and see why exactly you got this behavior. :) If you could send the model (or just a part of it that doesn't work), I'll be able to test it out. Also/ or, if you could elaborate a bit on "splitting the non-planar faces". Chances are someone else might run into this issue.. :)
     
  35. Visualise

    Visualise

    Joined:
    Mar 3, 2015
    Posts:
    3
    Unfortunately I won't be able to send you the mesh, as it's for a client under NDA... but I'll try and explain what I did.

    I'm not experienced with Blender, so took me a bit of time to find out what to do. Basically, I was reading through some discussions online about this duplicate vertices thing and I found that if the faces of the model are distorted by the vertices (so the faces of the poly is twisted or something), then that can cause this issue. I then dug around Blender and found the split non-planar faces option and thought I'd give it a shot. It split the faces up into triangles and so there weren't any messed up polys and that did the trick!

    I hope this makes sense. As I say, I'm not a particularly experienced modeller and apologies for not being able to send the model. It was kind of a stab-in-the-dark solution.
     
  36. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    No problem; and don't worry about it, I can fully understand. I'll have to look into this issue myself; it's just I haven't encountered it by myself (yet). I am really grateful for posting your solution, and though I don't know much about blender myself, I'm sure it will be helpful if others do run into this problem.
     
  37. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Hey guys and gals, CFTD 1.6 is finally here!
    It includes some improvements, a scene manager, a static subdivider, a texture combining tool and a nice demo scene (the one from the screenshots). CFTD can now also compute buffers during runtime (although still not recommended as it is sloooow :) ~2 ms per object).

    Anyhow, I would really like to thank everyone for the patience! Also, I'd like to use this (shameless plug) to request a rating and a (honest) review from the kind people who have purchased the shader. :) It has been purchased more than a few times, but it's really demotivating to see it struggle. This goes for all the assets you guys purchase, btw ;)
     
    Flurgle likes this.
  38. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    @ginconic don't give up! Maybe its pricing, maybe you need some more cool screenshots / demos. You're doing a good job
     
  39. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    @Flurgle Don't really have time for screenshots, but will see what I can do ;)

    Someone emailed today with an issue about the offline subdivider producing incorrect shading on some meshes. And in fact, that statement appears to be correct (that's the subdivide tool, not the shader we're talking about). The problem is, however, Unity does not provide a way to recalculate tangents (we do have 'recalculate normals'). Bottom line, the subdivider seems to be a bit shaky, use it with caution. :)
     
    Last edited: Mar 17, 2017
  40. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    cftd.jpg

    Well, here is the screenshot form the twitter post. CFTD fully supports real time area lights (who knew). Currently trying to find a solution for the bug mentioned above. ;)
     
    Flurgle likes this.
  41. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    CFTD in now on sale!! :)

    Get the crack-free tessellation shader for Unity, at 30% off. It's the first time the asset has ever been on sale!

    AS Link: http://u3d.as/n5k
     
  42. EricVenn

    EricVenn

    Joined:
    Nov 10, 2016
    Posts:
    23
    Hi,

    I am working on a 3D animation series project, and I'm looking for a shader that could simulate the rendering look of Star Wars Rebels. We don't need a shader fully optimized for realtime, as we are going to render frame by frame cutscenes. We are using mid-poly characters, and the idea is to evaluate DX11 possibilities to increase visual quality by tesselation and faking/baking AO textures. Your shader seems interesting, do you think we could use it for that purpose ?
     

    Attached Files:

  43. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Hi there,
    No, I'm afraid the current version of CFTD will not suit your needs. That is because:
    1: It was not made to work on skinned meshes (yet) and
    2: You need a PN-AEN tessellation for that purpose. Let me explain a bit. The current CFTD uses what's known as flat-dicing. That means a triangle, after being tessellated, still remains flat. The shader adds more vertices, but they do not alter the shape of the mesh. If we can compare what's going on to 3ds max (as I'm only familiar with that one), you need 'mesh smooth', what CFTD does is actually the 'tessellate' modifier with a tension setting of 0.
    Flat dicing works well with stones, walls, streets... all sorts of structures. It was what CFTD was designed for. Hence the lack of skinned mesh support.


    I actually made a working prototype of PN-AEN, but as there was zero interest in it (aside from one guy who asked about such shader long time ago), I stopped working on the project. https://forum.unity3d.com/threads/pn-aenreal-time-mesh-smooth.462251/


    For your purpose, however, you can actually use a tessellation shader with a feature known as phong smoothing (not to be confused with the phong shader model). It's not as good as PN (Point-Normal triangles), but it might do. The difference is in the 'curve' or quality of the 'smoothed' mesh, PN being far superior.

    If you use displacement that is baked from high-poly meshes, you do not absolutely need a crack-free tessellation shader, such as PN-AEN (Point-Normal triangles with Adjacent Edge Normals). You need PN, or again, phong tessellation (which, again, is just lower quality). Since your displacement is baked the displacement map should already be perfect and you should have no discontinuities acrostic the model. Just don't compress your displacement map in Unity.
    Luckily, the free tessellation shader pack I have on the assetstore has a phong tessellation shader: https://www.assetstore.unity3d.com/en/#!/content/37322

    You will most likely want to modify surface shader code inside it to make it look closer to the visual style that you want. Feel free to try it out and let me know if that works for you.
     
    Last edited: Jul 28, 2017
  44. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic do you think you might be able to make a variant to work with Unity Trees or specifically forces/wind zones?
     
  45. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Could you please elaborate on what you mean exactly: a "toon" look where a tessellated tree crown (kinda like a sphere) responds to forces/ wind or: a realistic shader, where lots of leaves (i.e. directx instancing) respond to wind?
     
  46. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    a realistic shader that allows a tree trunk to bend with physical forces/wind zone and perhaps directx instancing. I could add Instantoc's scripts on the treed and parts for occlusion culling -in consideration on how dense trees populated close by may be.
     
  47. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Yes, its possible.
    And yes, it works. Here is an example. A rather ugly one, though, for which I am sorry:
    cftd-tree-1.jpg

    With some displacement we get this:
    cftd-tree-2.jpg

    It's mostly crack-free too, except there seems to be some seams.. Not my fault though (almost certain about it):
    cftd-tree-3.jpg

    Could be the way tree trunks are created in Unity. With some tweaks on the texture we get this:
    cftd-tree-4.jpg

    I am not quite sure what the benefit from all this would be though. Since I never found the time to finish the PN-AEN variant (you can read a few posts above) and there isn't much interest in it to begin with, the trees still have edgy branches, they do not become smooth:
    cftd-tree-5.jpg

    From a distance it looks OK (can't attach more screenshots though). With tree creator you don't really get much control though, in order to make a super awesome tree and have displacement form some twists and such. Or do you? As in seriously, can you actually make use of this?
     
    Ascensi likes this.
  48. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    Just wanted to say CFTD 2.0 is expected to hit the Cyber Monday Sale tomorrow. Get it while supplies last! :D
     
  49. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @ginconic must of missed your previous post about the tree, I wonder how it might work on a speed tree -perhaps no edgy branches. Do you have this shader variant added in your package that works with wind/forces? or Unity tree wind settings?
     
  50. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    I re-wrote pretty much the entire shader for v 2.0.
    However, the example with the tree was done with the older version. I tested it with the Unity trees and Unity's default wind. Actually, it worked OK; I can definitely see some potential. Also, during testing I was getting some Quantum Break-like effects, which were also kinda cool :)

    If you'd like to give it a try just let me know. I think I have the files somewhere. However, I'm not very savvy with speedtree (or Unity's trees, for that matter). This could be quite a beneficial solution for you (and others too), so as soon as I catch on I might be able to come up with something.

    Edit: I checked some of the speedtree models I have, so yeah, it could work with those too. One thing that worries me is that we still need to calculate buffers for pretty much every different tree.I.e. scene loading may become quite slow if there are a thousand trees or so.
     
    Last edited: Nov 29, 2017