Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Assets Screen Space Displacement Mapping (No Tesselation) - Progress

Discussion in 'Works In Progress - Archive' started by winning11123, Jan 12, 2019.

  1. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, Great minds think alike, I was pondering this last week myself)))). The final mesh is present in world space with Unity's DrawProcedural, so I think it could be possible if procedural meshes are included in what I assume is a batch process to contribute to the scene. I think I would have to cull the extrusions (as like stencil shadow mesh projection in a way) but would be cool if could work.Thanks for the recommendation))...green is my favorite color so nVidia here i am lol)))), I think taking this technique to a lower level with the minds they have there could be really interesting.
     
    Ascensi likes this.
  2. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    That's very hopeful to hear! Also very important - multi display/player support.. would having two different camera views simultaneously currently work? I realize you don't have support for VR yet but maybe that's part of writing support for additional cameras? I have a holographic display I'd like to run at the same time which might be very tricky.. currently it has one camera but oddly captures 45 different angles and sends it to the display so I'd be very interested to know if this will work for it.

    Lastly I installed it into a project set to Vulkan, would you have to add support for Vulkan in your compute shader? currently I get the error:
    Shader requires a compute buffer to be bound but none provided, skipping draw.
    Attempting to draw with missing bindings. I do realize that when selecting a shader you do have it listed under DirectX11

    Update: I tried the demo with the holographic display. At first all the floating spheres show as black and can't tell if they are tessellated but when I used CTAA the scene was lit better and it definitely made the scene easier to look at.. edges were sharp etc. Thought it might help give you some clues what to tweek. In this video example first I used CTAA for anti-aliasing and it added sharpness and better lighting the next video is with it off.
     
    Last edited: Feb 2, 2019
    winning11123 likes this.
  3. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, thanks for bringing up any issues you might have or features you might need so I can improve if possible as this is very helpful to me. Also very cool display)) I saw a youtube video on this and thought was really cool! You could try but as the screen mesh is pushed into the world from its cameras position and orientation, viewing from the sides may not be ideal as you would most likley see either extrusion or the cuttoff angle(no faces), in VR/AR this is difference because you only have two vantage points and one screen worth of pixels.

    At the moment a single screen worth of meshes is I think all my gtx970 could cope with and leave room for around 2 million more triangles for low poly meshes. With VR it should be ok because it is still just one screen worth of a mesh split into two. I still have to work more on this and will take up that challenge after the terrain and megatexture support is in. Also with VR I have to see how best to integrate with single pass if possible and multi-pass - it may be one or the other, I hoping for single pass.

    Although not intended for multi camera setup right now I just did a test (fps about 160 in editor - look solid in build 1920x1080), if wanting to experiment you could duplicate the SSDM Camera and make sure Camera depth is less than Main Camera (Depth -3 ) add another layer called SSDM2 and then set the meshes to that layer you want to show in that camera. change the script attached to the main camera to this....
    Code (CSharp):
    1. public class Main_Camera_SSDM_Draw : MonoBehaviour
    2. {
    3.     //******************************************************
    4.     //classes
    5.     public SSDM_Camera _SSDM;
    6.     public SSDM_Camera _SSDM_2;
    7.     //******************************************************
    8.     //declarations
    9.     //******************************************************
    10.     //START
    11.     //******************************************************
    12.     void Start ()
    13.     {
    14.         //--------------------------------------------------
    15.         //--------------------------------------------------
    16.     }
    17.     //******************************************************
    18.     //ON POST RENDER
    19.     //******************************************************
    20.     void OnPostRender()
    21.     {
    22.         //--------------------------------------------------
    23.         _SSDM._iOnRenderObject();
    24.         _SSDM_2._iOnRenderObject();
    25.         //--------------------------------------------------
    26.     }
    27. }
    and attached the duplicated SSDM Camera.

    however with that being said...the mesh is draw prom the perspective of the camera that renders it. and both would be in the same main camera as draw from each camera so you would either see extrusion or no back faces if camera are not at same position and orientation as it's main camera counterpart.

    I will have to have a look if anything special is needed for Vulkan. I did see an Unity Issue Tracker error report for compute shader to vulkan error so there may be a few that have not been fully compatible. However I will see if there is anything I can do, it may be simple thing. Also try 2018.3 if not updated yet, as I had to use that to get Sparse textures to work.

    I noticed that this darkness is I believe caused by difference in Linear of Gamma color scheme, switching between these should solve the darkness, however I am uncertain exactly why. When using AA, post process is best to use and hardware AA generates random speckle artifacts around the edges for some reason. I will look into this further, thanks for the video!

    I will keep this all in mind check it off the list as I progress when I can look into deeper, thanks again really helpful to see more potential usage cases! But right now for most standard uses it is a good solid base for the technique, but I will try and cover all bases as I can.
     
    Last edited: Feb 3, 2019
    Ascensi likes this.
  4. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @winning11123

    Thanks! I was using linear differed and switched to forward but forgot about switching Gamma also as I normally don't use it. About the Holographic display like your asset it only two cameras one disabled. I think overall it's best to wait until you have sorted out SPR/ VR then try to trouble shoot the display. I think like your asset with one cam set to -1 and the other set to -2 and two FOV cam settings I think the shader it uses takes all the angles between and creates the multi angled view - just a guess. Vulkan support would be amazing.. I'm running VR and the Holoplay device and need to dedicate a video card to each and need as much speed as possible (multi GPU & multi core cpu & gpu support)

    I'm glad you're able to test multi cam, I really appreciate it! I will probably try experimenting with two displays for now.
    Also you might want to add a Dynamic mesh disabling & or scene unloading with Occlusion Culling script but keep collisions active so the GPU has less objects to look for that way you can either handle more geometry within your camera view and more GPU power or have less geometry and even more power etc. Maybe you've already tried this.
     
    winning11123 likes this.
  5. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, no problem, it is all interesting to me. Yes, I think I will stick to my current work flow for now, with working on the terrain and mega textures as I believe that will be most useful to start with. After that I will tackle these extensions. The main thing is to keep all as easy to use for all and myself in moving forward with an aim of no work for non coders. As more interest grows it will become easier to expand the project I think. There are many things to experiment with for sure, and when I get further along with a full amazing demo to really show this off, I think it will reveal most helpful things to add in moving forward, especially with helpful feedback like you are providing.
     
  6. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Hi everyone,

    Just letting you know version 1.0.0.5 is now available. I will upload a video tomorrow with overview and usage of new feature.

    In this release Sparse Texture (Mega Texture) Support has been added. It is very easy to use, so when you see video you will be able to get straight into use. It is really cool addition. 3 Sparse Textures are created (color,normal,PBR) and this gives you either the following (12x4096(6 mip levels), 48x2048(5 mip levels), 192x1024(4 mip levels), 768x512(3 mip levels), 3072x256 (2 mip levels)).

    Next Update will be that of a Mask and mesh painting with the mega textures and another shader for this purpose. The mask will give you access to all textures available on the mega texture and will control Texture Tile, Tilling and Displacement settings.

    I will leave the sale on for another week, so if interested in where this is going good time to get it!
     
    Ascensi and mfleurent like this.
  7. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @winning11123 with your new system will you be able to store painted data in its own splat file? One of the main reasons why I was hoping for Megasplat integration is that I have a massive project setup with Voxeland but Voxeland the way it's currently set up doesn't allow wetness or puddle/steams to be painted.. every time Voxeland gets refreshed it only keeps texture data/position but no flow maps. Procedural it would be good to have rules for specific textures to only show at a specific mesh Normal angle for overhangs but also the ability to paint maybe as a different layer. Lastly Voxeland has Megasplat support but not SSDM. I'm sure many Megasplat customers would love a boost to their frame rate :D but adding support for it automatically gets it working with Voxeland via Megasplat integration.

    About testing with Raytracing, there is a free version of Octane render for Unity on the asset store if you'd like to try it some time.

    Thanks for the latest update! looks good.
     
    winning11123 likes this.
  8. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, yes, the next step be painting the mesh with the mega texture as the color pallet. It will have a four channel mask to control which tile on the sparse texture is used, how many times it is tiled, and 2 displacement params. This means you can have paint a mesh with literally every tile on the mega texture no matter the count. and make your own brushes of course. The mask is saved and used with a new shader that uses that megatexture.

    I will take note about feature to allow for runtime changes of this mask (great idea!), but initially with it's first release it will be something done in editor to paint the mask runtime for things like terrain and structures where haveing access to many tiled textures would be a benefit.

    Currently any integration with other plugins would have to be done by authors. It is much simpler for them to add support than for me, maybe if more interest happens or they can see it's potential expanded integration could happen, but right now with the resources I have, I just have to make my own system, which gives more freedom for me anyway.

    This is cool, I have a raytracer I wrote in Unity running in the compute shader, but I will have a look when I can change gears at that version of Octane, thanks for the recommendation! my current one is good but needs more features as is rather simple.

    Thanks! I am still holding off on showing the RD-Textures because I think I will only have one chance to blow anyone away with this, so I want to make it look amazing like Christoph's scenes).
     
    Ascensi likes this.
  9. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Just checking in for an update on VR SRP and a preview with Christoph's textures.
    Any new developments?

    I didn't understand the Mega texture video at first but now I understand. I hope you can make a batch converter that will create all the texture tiles under the 4k, 2k, 1k folder etc. You would state the metal channel & normal map channel and the user should be able to add their own prefix like _metal, _NM or _metal_ _nm_ and your converter just assigns them. I have many texture libraries I'd like to convert and they would take days manually.

    I have some photo real models that I'd like to put on the asset store and make recommendations to use your asset for performance. Ideally these models would be intended for VR so I'm hoping you've found a solution for SRP and seeing angles.

    Because displacement is often used for more realistic graphics -AAA games, I'd definitely like to see ray tracing work since many of the engines are now trying to use realtime ray tracing as the preferred realistic lighting & rendering engine.
     
    Last edited: May 6, 2019
    winning11123 likes this.
  10. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, Sorry for late reply, been busy with the real world :p. Currently I have just build a terrain system based on these excellent tutorials -
    . And in the next couple of days will be merging it with SSDM and will be added as a package to product. so can be added if needed. After that will be the water plane ripples and displacement. Then another version of the terrain where it will have full access to all slots on the mega texture rather than in the current implementation, which will only have as many mega texture tiles as height slots used in terrain. So a demo with this showing off Christoph's legendary RD-Textures on a terrain environment will be this week too)).

    As for VR that will be after the above is completed. I would appreciate if you would like to test the VR when time comes before release because I only have DK2, so thanks in advance if possible).

    Actually that is a great idea for a batch converter, and actually probably a must have as the situation you describe, so will add that to the list too. Yes it was not easy to convey the mega texture details in the video, but I tried to just run through as simply as I could. Figuring out how to use them myself felt like some kind of voodoo but I finally understood)).

    As to raytracing, It should be possible but is going to take some time. There are some things that need to be considered as really it is like one giant surface mesh pushed from the screen into the 3d world, so for example ray-traced reflections for objects reflecting objects infront of them would be black, as the back faces would not exist and I think shadows would have issues too. not to say there are not ways it could be done. but needs a bit more deep thought. I would love realistic lighting myself, actually I have been chasing this for long time as I think there is many new atmospheres that could be created with it.

    anyway that is where i am with this. so there should be an update and demo sometime in the next few days).
     
    Ascensi likes this.
  11. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    No problem to test with VR using my Vives. Looking forward to the demo!
     
    winning11123 likes this.
  12. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
    Nice tech.
    I have following error. Do you have an idea to run it with Unity default or should i try to change AutoLight.cginc.

    Unity 2019.1.2f1
    SSDM_Basic.scene
    in
    \Unity\SSDM\SSDM\ScreenSpaceDisplacementMapping


    Error.JPG

    Code (CSharp):
    1. Shader error in 'DX11/UBER_SSDM': unable to unroll loop, loop does not appear to terminate in a timely manner (30 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number at /Unity2019_1_2f1/Editor/Data/CGIncludes/AutoLight.cginc(247) (on d3d11)
    2.  
    3. Compiling Fragment program with UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    5.  
    I really interrested in the water demo of your project.
    Keep on computeshadering.
     
    winning11123 likes this.
  13. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @4sascha Thanks! looking into it now...
     
  14. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @4sascha,

    I just created a new project in 2019.1.2f1
    added layer called SSDM
    assets->Import Packacge->custom package (select ScreenSpaceDisplacementMapping.unitypackage)
    select basic scene and all is good

    I think the problem is first release of SSDM I also included the project built with an older version of Unity and those shaders did not include the [unroll()) semantic in parts of the shaders. So I believe if you import the SSDM as the included unity package all should be good. I will remove version 1 a later date, as all is included in 1.0.0.51 .unitypackage.

    thanks if you can confirm, but all looks good here. Thanks for bringing to my attention!

    Best Wishes and don't hesitate to ask if need more assistance.

    Edit: Unity 2019 may not update the script SSDM_Camera.cs (line 243) automatically, so change
    from Graphics.DrawProcedural(MeshTopology.Triangles, MaxBufferSize);
    to Graphics.DrawProceduralNow(MeshTopology.Triangles, MaxBufferSize);
    if Unity does not do this. Will be taken care of in next release.

    Edit: hopefully only be another week or two on the water (mainly due to time), just getting the infinite procedural terrain finalized, glad you are looking forward to it, thanks))
     
    Last edited: May 15, 2019
  15. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
    2019-05-15 16_21_18_error.jpg
    i followed your post

    new Unity Project 2019.1.2f1
    created Layer SSDM
    import Package
    \SSDM_1_0_0_51\Package\ScreenSpaceDisplacementMapping.unitypackage

    line 243 is updatet to
    SSDM_Camera.cs
    Graphics.DrawProceduralNow(MeshTopology.Triangles, MaxBufferSize);

    results in same Shader Error

    Shader error in 'DX11/UBER_SSDM': unable to unroll loop, loop does not appear to terminate in a timely manner (30 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number at /Unity2019_1_2f1/Editor/Data/CGIncludes/AutoLight.cginc(247) (on d3d11)

    Compiling Fragment program with UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
     
    winning11123 likes this.
  16. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @4sascha, hmm well this is troublesome because the error does not appear on my system.

    -what happens when you double click on the error in the console. does it take you to the error location in code? ( I looked at the line in AutoLight but seems ok)
    - does this happen with the other SSDM_Basic_Sparse_Texture scene?
    - possible to press play at all or error prevents play?

    could you try change in the file ../Assets/SSDM/Renderer/Shaders/UBER_SSDM.shader (in my visual studio 2017 line 366)

    change

    [unroll]
    for (int j = 0;j < PL_ActiveLightCount;j++)
    {

    to

    [unroll(4)]
    for (int j = 0;j < PL_ActiveLightCount;j++)
    {

    then save and let Unity compile scripts.

    - On your system being a shader error and complaining about at unroll loop. I have a gtx 970 what video card do you have? maybe driver need update, I would assume card has shader model 5 support so probably not the issue. But strange that I do not receive this error.

    - I am using unity HUB and opening project with same version you use (but all is ok on my system). Is it possible for to open the project in an older version of Unity and see if same error happens.

    That is somethings to help me narrow it down a little, I will check back tomorrow and see if any of that helped or not, or if anything new comes to mind. seems very strange to me as it does not occur on my system, but we keep trying to find it as would be good to understand why this is happening on your system. talk soon.
     
    Last edited: May 15, 2019
  17. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
    yes. Opens a wormhole to line 247 in SSDM_Camera.cs

    SSDM_Basic_Sparse_Texture has same error.
    It is possible to play the scene but there is no renderouput from camera.


    same error after changing line 366 to [unroll(4)]


    Error2.JPG



    I also tried same procedure in Unity 2018.3.12. Same error.
    I check another GPU tomorrow. I use an GTX 1080.
     

    Attached Files:

    Last edited: May 15, 2019
    winning11123 likes this.
  18. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @4sascha, hmm this i really cannot explain. does the demo works for you though?

    if you like i can refund your money, i think either something wrong with Unity Install (as one of the first 2018 versions of unity would erase compute shaders when upgraded projects to it, possible an issue there somewhere) or graphics driver error but a 1080 should have no problem.

    so just let me know if you want a refund, i just have no idea when, even error goes no where and i cannot replicate from a clean install. Thanks for brining to my attention but just not much i can do at this stage.
     
  19. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
    Think i must say sorry.
    I recreate project at home in Unity 2019.1.2f1 and there is only one error.
    No refund. I like this method and played with it 10 years ago. Happy that you brought it to Unity.
    There is lots of potential for a lot of strange use cases.

    Assets\SSDM\Renderer\Scripts\SSDM_Camera.cs(243,13): error CS0619: 'Graphics.DrawProcedural(MeshTopology, int, int)' is obsolete: 'Method DrawProcedural has been deprecated. Use Graphics.DrawProceduralNow instead. (UnityUpgradable) -> DrawProceduralNow(*)'

    so i replaced
    line 243
    in
    SSDM_Camera.cs

    Graphics.DrawProcedural(MeshTopology.Triangles, MaxBufferSize);
    with
    Graphics.DrawProceduralNow(MeshTopology.Triangles, MaxBufferSize);

    Everything is working now.

    At work we are behind an proxy and firewall so that newest Unity HUB is not working for now.
    No PackageManager and AssetStore.
    That seems to have an influence on recompiling API´s and makes difference in project generation or something like that.
     
    winning11123 likes this.
  20. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @4sascha, that is great new that you got it working! That was my first instinct, so glad that it was just setup error, not obvious to either of us)), but had me worried because did not solve.

    Oh this is cool, actually I found a few videos on YouTube about the technique from about 10 years ago, any would be yours? After I build this I did a search and found I was not inventor, but cool to have same idea as others and done in a new way)) so thanks for the support!
     
  21. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    You might want turn volume down a little)) but just a video on the progress of the procedural terrain working with sparse textures and SSDM. Demo and package update should be up on Monday all goes as planned. Thanks again for those who have supported and last week at 75% off sale, so after that will be a 50% off sale until water is added and some additional terrain features. Have a great weekend!

     
    Ascensi and Flurgle like this.
  22. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Another video update. Lots of improvements for version 2 but still very simple to use. Actual release of package update and new Demo should only be a few more days. Thanks for patience and support!
     
  23. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Looks awesome. Would be interesting too see that with Jason Booth's Stochastic height sampling
     
    winning11123 likes this.
  24. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Thanks! Yes, that looks like really cool technique for removing tiling in a texture. will have to read more about it, but for now I'll just have to add more content)). great find thanks for mentioning!
     
    Flurgle likes this.
  25. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Great detail is going on here and a perfect show off scenario for your technique.
    I think by adding adding some realtime displacement for footsteps, tiremarks and water interaction will further show of great benefits your method can bring.

    For your example. Polybrush is pretty nice and as a preview already in unity package manager.
    With it it should be easy possible to paint splatmaps (there are several shaders ad examples included).

    A short further short question because i read you are very into point clouds. I did some test last week by combining some geometry shader foliage projects i found around and the performance and visual results made me stunning.

    So its all about generating points to spawn the foliage or little rocks who should cover the screenspace displacement and therefore the points should be generated on your displaced position.

    Do you thinks such point generation is possible.
    I will do some screenshots when i am back on eletric for better illustration.
     
    winning11123 likes this.
  26. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Thanks so much! Yes I agree, and will look into polybrush more. I had planned to just make my own, but might be good to start with some inspiration there.

    Yes, this is correct. It will be possible to generate points based on the final displaced position. there will be an additional editor mode to allow this, as internally I can just output final position to a screen texture and sample the 3d point+normals from there, without the need for going through any mesh buffers etc... I did want to just generate some evenly spaced random points at different height levels for the basic terrain pass. but I think just flying around and painting would be a much better approach.

    There is a delay on the terrain release at the moment. Because I found that the tutorial I followed to build the terrain only hides meshes after being out of range and does not do the clean up or free the memory. So I have to implement this before I can make available.

    But good news, I will be release the fluid surface package today (standalone), and by monday it will be release and included in the SSDM version 2.0.0.0. Mainly just some improvements and advancement. So the procedural terrain will be released probably in a couple of weeks as I might as well add the addition splat map support etc... while I am refactoring the terrain low level stuff.

    That would be cool, look forward the screenshots!

    Thanks again for the interest and support!
     
  27. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Good news.
    I will use it mainly on a mesh based workflow for photoreal roads and tracks.

    Here a shot from the grass i need to add over SSDM.
    This will be fun. (DirectX11Grass) Asset.
    DX11Grass_Test001.JPG


    For inspiration.
    The painting tools from this asset made me spechless today. Works on mesh and terrain like it should for density, color , height and soon maps..
    https://assetstore.unity.com/packages/vfx/shaders/directx-11/grassflow-142736
    Have a look on the third video.
     
    Last edited: Jun 1, 2019
    winning11123 and Flurgle like this.
  28. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    wow, really nice on both accounts! Added to my list for shopping day). I agree very nice painting tools and very inspiring, thanks for the recommendation ,really helps to know what direction to go in.
     
  29. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    some thought after first tests

    - incredible for closeups with scanned textures 8k and above

    - big chance for easy implementation of realtime ground diplacement interaction for tire tracks, foot steps and water layer interaction.

    - perfect and lot potential for ground stuff

    - for e.g bark of trees i think its harder to get right.

    - great potential for mesh based terrain workflows
    (i never managed terrains for an valuable non destructive workflow.)
    Unity Terrain is also under heavy development at the moment.

    - for casting shadows. mhmm. could be really tricky from first tests.
    but it could be somehow work with something like ngss contact shadows. (see store). i would ask the developer if he sees any possibility.
    Also there is an option for ground bias plane... for normal directional light shadows. I think it could solve your shadow flicker from preview video. not sure about that.
    only a feeling.

    - my biggest question is how transition from ground to sky is working with sky assets like e.g overcloud.( another tip because of world class dynamic sky) still testing this but first results gave high quality dynamic day even in forward rendering.

    my target
    - mesh based terrrain , dynamic day, msaa, taa in forward rendering with nice realtime displacment interaction.

    I would really would get rid of msaa but for foliage and car geometry its a must for now and there is no replacement.
    Do you think there is a way to solve this on long term?

    biggest question from my side

    - do you plan and is it possible to support mesh based terrains similar to your terrain implementation?
     
    Last edited: Jun 1, 2019
    winning11123 likes this.
  30. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @keeponshading, Thanks for your questions. In version 2.0 there have been some improvements in many areas, but most concerns are addressed.

    -MSAA is now fine, it turned out I just had to add a background mesh to the SSDM layer to consume all pixels. now there is no random speckling with or without MSAA.

    -transition from ground to sky should be fine. especially if the sky is not part of the SSDM layer. The only artifacts left is basically the 90 degree cutoff when the camera cannot see the surface, so cannot displace pixels, which is no different to standard normal mapping. Also now there is also no stretching when two SSDM meshes are close together, as I removed the line edging, which would pin pixels and cause this effect. However in some cases with large displacement values, you will have to play with the hieghtscale and height adjustment values when close to a 90 degree cutoff case. but this is expected with this technique and can be solved easily with adding assets to cover this if cannot remove completely while wanting to maintain a look.

    -Yes, after I finish with the procedural terrain, I wanted to do a mesh based version. I was going to just get the user to feed in a bunch of height maps and it would generate the terrain mesh from that, and then edit and paint as with procedural version. Time and user support will define how long that will take to be implemented. But I work on it when I have free time. So I think supplying the meshes in the same way as height maps should be possible too.

    -Thanks for the tip on the shadow issue in the video I mentioned, will see if that can help. The SSDM meshes have no problem receiving shadows along the displacement, but of course casting shadows is based on the original low poly mesh. In most cases this is not a problem, especially as with soft shadows. For key assets you could just include a higher detail shadow caster for cases this would not suit. but also a maybe a screen space shadow effect, as you mentioned, would be good for self shadowing. When I have time I want to explore this much further.

    -
     
  31. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    MSAA made my day.

    Here are some nice textures i can play around with in 2 weeks.
    Up to 56k.)
    https://www.friendlyshade.com/product/road-asphalt-02/

    For little realtime visualisations. Think of car on a gas station with this detail on the ground would be amazing.

    I also try to understand which depth on e.g an impact from a tiny meteoroid on such and an detailed road could be displaced. I saw your shoot with the boxes and cones.
    That is a lot.

    A last question for better understanding.
    I have a screenspace displaced road and above i would like to have an water layer and car wheels are dispacing the surface by drive through. Do yo think this layering or mixing of 2 displacements is easy possible?

    Another brian F***...
    I have some nice fluid sim compute shaders who are working fine on heightmaps and are filling and flooding areas under a given height. I think it could be easy possible that water searchs the way alone through your screenpaces displacement on ground with this.

    In 2 weeks i have some time to make a deep dive.

    An Asset Store Version could probably raise visibility.

    When you have time to post the names from the mud and ground leaf RD texture set would be cool. Tried to find them to purchase.
     
    Last edited: Jun 1, 2019
    winning11123 likes this.
  32. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    It's so great that such resources are available, as making nice textures in general can be so complex. Really nice, actually I agree with placement and scene.

    Technically you could displace as far as you want to, the test I did was on a quad and the spikes where about 1 meter in depth. but it really comes down to placement and camera angle for such effects - as you have to take into account the 90 degree cutt off on a plane surface. also screen resolution is key for quality. so in editor might not look so great but at 1920x1080 looks really nice.

    With a custom shader the effect could be achieved. if the water layer was a mesh that is pushed below the ground plane it would reveal the surface. if both are a ssdm, some sort of alpha clip should be used to expose the surface. definetly possible, so I will add this to the list off effects to demostrate and include around the time i release the terrain demo.

    very cool and interesting effect you describe and would be awesome to see!

    Right now I like self publishing and having also weekly payouts with basically the exchange rate taking care of all cost(as I am in Australia). Unity Asset store is a great resource for sure, but for the volume of expected sales, it is just right now more cost efficient and convenient to do it myself. I think anyone looking for an edge to make their game stand out will find it in time. I know I cannot wait to use it))).

    Yes, the RD-Textures is the FOREST-FLOOR-11 through to 16, the mud was from Collection-one called TIREMARKS-02 (has wet and dry variants). The rest where from collections one - six and just selected what I would need for the scene I had in mind. So great to work with though, thanks again Christoph!
     
  33. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Thanks again for the support guys! Version 2.0 will be available by the end of the day, so just expect an email for the update then).

    Version 2.0.0.1 of SSDM has just been released. Everyone should recieve their updates soon! Thanks again!
     
    Last edited: Jun 4, 2019
    spinaLcord likes this.
  34. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    OMG. The new exaples, especially the fluid ones are fantastic.


    For your potential future showcase.

    Here are some nice tileable procedural noise shaders in blender licensed under CCO for free use.
    I try on weekend to bake some highres displacements.


    https://www.blendernation.com/2019/03/27/free-procedural-noise-pack-for-blender-2-8/
    https://gumroad.com/l/NOISE-P


    Blendernation.jpg



    and here some impressive tileable substance ones from Ben Q Wilson. Not free.
    Displacment generation is here only one click.

    The wooden ones i tested already in SSDM. Looks great.

    When you get some screenspace shadows in place it will be absolut amazing.


    ben-wilson-beauty-2-combo.jpg
    ben-wilson-beauty-01-combo.jpg

    ben-wilson-decay-1-combo.jpg
    see

    https://benwilson.artstation.com/projects/w8y989
    https://benwilson.artstation.com/projects/A9g60q
    https://benwilson.artstation.com/projects/oO8ymW
     
    winning11123 likes this.
  35. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi.
    Is it somehow easy possible to remove the reflection or water there where the sphere is. So that when you move the "sphere" the water filling up the area it was before.

    Tried with current parameters but i did not found a way
     
    winning11123 likes this.
  36. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Thanks glad you like them)

    wow, really great find thanks for the heads up! definitely a valuable resource, really nice texture samples.

    I will look today into the fluid and see if it can be done easily, most likely will just have to use the seed map to clip the mesh. so will add a shader and material and sample scene today if simple enough to implement.
     
    Last edited: Jun 8, 2019
  37. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    I this what you had in mind? If so I will add to package).

     
    Lars-Steenhoff likes this.
  38. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    It not a prio.

    Here some some real world references ....
    I will go this direction.

    https://www.videoblocks.com/video/rainy-day-wet-road-and-car-light-reflection-n_tybciilil0tgqma

    https://www.videoblocks.com/video/wet-road-surface-car-moving-slowly-rh5dzdq5gjfciqm7f


    https://www.videoblocks.com/video/c...tial-yard-dirty-environment-bxokk5xmnjr6pj659

    https://www.videoblocks.com/video/p...ncept-idea-close-up-inside-szwbldrw0mjoq3j4an

    https://www.videoblocks.com/video/c...reflected-in-spring-puddles-rbsvli45mjf5y00ir

    i also try to understand how to solve the seams between meshes i have.
    e.g
    * Road, Mesh with SSDM and Water overlay
    * left and right from road mesh with side walk or racing red/white area SSDM s
    * then mesh with gras or ground SSDM

    like on this references

    images (35).jpeg race-track-overview-stock-image_csp21058562 (1).jpg

    because all tileable screen space displaced meshes who are connected need on the seems an painted splat map that brings displacement down to 0 that they fit together.

    Do you think such an extra texture sampler or a single channel would do it and makes sense and is possible.
    e.g pure white is displacement 0. then i would paint a ramp to white on mesh seems splat map what is easy.

    Could solve all mesh based connections.
     
  39. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    yay. thanks thats perfect because water is removed on e.g wheel contact.
     
    winning11123 likes this.
  40. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    winning11123 likes this.
  41. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    no problem, just sent out the version 2.0.0.2

    Added seed map clip as alpha to fluid surface shaders. Just remember to remove OI_FS_SEED layer from main camera culling mask (layers) and reflection probe or refraction camera culling mask (layers) if want to see through it.

    Thanks again for the support!

     
  42. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
  43. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Yes, I think that could work. I think would required multiple uvs so the secondary untiled splat/ramp texture could clamp the displacement height and height adjust params.
     
  44. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Yes, choosing a second UV for splat/mask texture is good.
    It s also possible to take same UV for splat/mask and smaller tilling for the other textures.

    But would be cool to choose.
    By design i already have manual lightmap uv sets for every geometry in correct layout.

    so choosing between
    1) UV0 other textures tilling e.g 0.05 UV0 splat/mask tilling 1,

    2) UV0 other textures tilling e.g 0.05 UV(second) splat/mask tilling 1,

    3) UV0 other textures tilling e.g 0.05 UV(Unity manual lightmap UV import channel)

    would give max freedom.


    Here a proof that i have some fun.....
    There is some really nice interaction from every rock with the liquid surface.)
    It is still the old version.When it should be easy possible to remove the water completly from whipped area at the end, i will use it too for an advanced car window.)



    By playing around with this and because i can do the rolling friction physics against an signed distance field too, here i use normal mesh collider, the absolut killer implementation could be to calculate an sdf from the dispacment. So everything could interact on accurate mm level with the sreen space displaced ground, too.
     
    Last edited: Jun 9, 2019
    winning11123 likes this.
  45. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    Thanks for the information very helpful! I am so jealous, because you get to play with it all already lol))). The mind goes in to overload when thinking of possibilities, very cool to see in action and get inspiration).
     
  46. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi.
    Probably simmilar approach of nice screen space tricking is useful for you too to handle smooth out reflections far from cam.
    When not. Sorry.)

    starting from 27:00
     
  47. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @winning11123 I've got in contact with 3DFlow (photo scanning software) since they have a new beta for displacement texture export.. I requested the possibility of having Vector Displacement export and Bob (owner) said this would be easy to add. Next I'm trying to request vector displacement support for 3DCoat's smart material so that photo-scanned textures with vector displacement could be painted in real-time on a model (waiting for a response) Lastly I have no doubt that it should be possible for vector Displacement to work with Screen Space displacement and if this Pipeline works I think it could be the next biggest thing in graphics. I understand that once compatibility is made, if your asset has painting tools that it could be just painted directly in Unity but maybe more suitable for Voxel based terrains.

    Anyway I'd be interested in seeing a screenshot of Vector displacement even if it barely works at this time. I know you were saying it basically needs more real estate - can the shader be tricked? maybe virtually generate what it needs.
    Pipeline summery: 3DFlow (photo scan) --->3DCoat (vector displacement painting) ----> Unity ---- Screen Space Displacement Mapping and or painting.

    Maybe to bypass the 90 degree issue procedural mesh generation may resolve this. In the presentation below bending the mesh or changing it dynamically for more real estate maybe desired?
     
    Last edited: Jun 29, 2019
    winning11123 and Flurgle like this.
  48. winning11123

    winning11123

    Joined:
    Apr 29, 2014
    Posts:
    72
    @Ascensi, I think that vector displacement would be possible with a different approach, however it would be on a per object basis, yet having a similar global buffer of verts and utilising mip maps for lod. with a vector map I do not think it would work with the current SSDM, however I am sure a modified approach could do this for sure. even all the vector maps on a texture atlas could be an interesting approach however these are just thoughts that came to me now. Maybe in future I could play with this, but kind of in a pinch with reality at the moment so even my site is down, so have to focus on work at the moment. But next time I have free time to explore this would be really interesting challenge. I agree with you on it's potential.
     
  49. Radivarig

    Radivarig

    Joined:
    May 15, 2013
    Posts:
    120
    What happened to this asset?
     
    magnetica likes this.