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

[RELEASED] WreckIt - environment deformation

Discussion in 'Assets and Asset Store' started by PerunCreative, Sep 26, 2016.

  1. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113


    What is WreckIt?

    Wreck It is a system that brings deformation into your environment with a low performance impact on your hardware. It gives you the possibility to push your game experience and visual to the next level with just a few clicks!

    Create snowdrift, leave
    snow trails and more! WreckIt is suitable for various types of environment. By adding a few textures you can turn your Winterfell into a muddy environment or Sahara desert!

    Features
    • Unity terrain support
    • Custom mesh supports
    • Precise deformation
    • Low performance impact
    • Count of interacting models is unlimited
    • Deformation computations done by GPU
    • High scalability

    Requirements

    Wreck It requires Directx11+, OpenGL 4.3+ or OpenGL ES 3.1+AEP

    Current limitations

    Terrain shader supports only 4 textures. Using more than 4 will result in weird behavior.

    Note: Car scene and the 3d character are not included

     
    Last edited: Oct 5, 2016
    EvilFox, zugsoft and theANMATOR2b like this.
  2. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Good news! OpenGL support was added so WreckIt now supports all hardware listed under the target 5.0 (DirectX11+, OpenGL 4.3+ and OpenGL ES 3.1+AEP). This version was uploaded to the asset store and it will be available in a few days :)
     
  3. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    great asset!!!
    I've a question: it changes the mesh or is made with some material? in dept: my scene is due by a mesh that is the road, with my custom shader to manage various effects to the road..
    can I add this or I need to remake my custom shader?
     
  4. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    It is using a custom shader for the terrain and meshes that will be used as surfaces so it would required few changes in your road shader, but this is required only for the surfaces. Objects that are affecting those surfaces (e.g car, humans,...) don't require specific shader.

    If you want, you can send me that road shader and I will implement those changes and then I will test it with the plugin.
     
  5. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    WreckIT with 3rd person character :)

     
    ftejada and punk like this.
  6. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Looks great, question what are the limits on this, say I have a very large snow level or a long dirt race track will this work or are you limited by texture size and having to have enough texture space to cover the whole game level or does the system somehow manage it so it just works?
     
  7. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    I like the jump off the end :)
     
    PerunCreative likes this.
  8. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Thanks :)

    It depends on what you mean by very large. Scenes which are in the first video are done with 0.25km^2 terrain size and it tooks only 4MB of additional vram on GPU. If you need bigger terrains like 4km^2 than it will take 16MB and 16km^2 will take around 100MB. However those values will give you the best visuals and extremly precise deformation, so if you don't need extremely precise deformation you can have 1km^2 sized terrain which uses only 4MB of vram and it will still look very good.

    You can also split the terrain in multiple parts and once the player is far enough from one of those parts than deformation stored for that part can be cleaned and used for some closer part. This approach is currently not available in the plugin, but it can be easily added.
     
    ftejada likes this.
  9. zaki-imtiaz

    zaki-imtiaz

    Joined:
    Jul 18, 2014
    Posts:
    4
    Hey, looks like a great asset. I have 2 question.

    1) Can we use it on mobile platform? anyone over here has experience in using it on mobile? How was the performance?

    2) We generally make our game environments in Maya, does it supports terrains outside Unity?
     
  10. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    1) This plugin requires compute shaders and only mobile platform that supports them in unity is android with OpenGL ES 3.1+AEP. Metal on IOS supports compute shaders, but they don't work in unity currently, so no ios yet. I haven't tested it on mobile because I don't have an android.

    2) It should work fine with your environment from Maya, but if your terrain is very low poly, than it could break the visuals and tearing would appear so it would require to add more polygons to avoid this.
     
  11. zaki-imtiaz

    zaki-imtiaz

    Joined:
    Jul 18, 2014
    Posts:
    4

    Thanks for replying.

    In that case I believe that would be risky for me to buy it. Would it be possible that you can test its performance on Android and let us know? It would be great to have insight that way.
     
  12. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    If you are targeting mobiles I would suggest you to wait until unity will add more stable vulkan support so that It could run on more devices and not just android.

    I will try to borrow one as soon as possible and I will test the performance on it :).
     
  13. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    you mentioned custom shader for terrain. I am currently using RTP terrain shader, will that work with yours?

    or does your shader provide functionally comparable to RTP?

    In addition let's say I want my tire tracks to fade over time, is it supported?

    Does your shader require changes to physics code?
     
    ftejada likes this.
  14. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hm.. hard to say, because I don't know how is the RTP shader implemented so I can't guarantee if it is possible to merge those two shaders without some complex digging in the RTP shader.

    Fading isn't there, but it is quite easy to implement this feature.

    You don't have to alter your physics code. The collider is untouched and on top of it there is a layer of snow/mud that is deformable and your objects are "standing" on that collider. If you want something like a resistance of the snow layer, so that you will stop let say in the middle between the collider and the upper part, than you would have to implement some additional physics code.
     
  15. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi

    I am very interested in your asset. But I have some doubts.

    1) I am very concerned about compatibility with the RTP asset. I use it in my projects and I need your asset to be compatible with RTP. Also, I guess most developers use RTP. So I think it would be a great idea to include compatibility as soon as possible.

    What plans do you have for this issue? How long would it take you to check or fix it?

    Is there a trial version of your asset? I have RTP and we could test if there is any incompatibility with your asset ...

    2) Is the documentation of your asset complete and detailed? Do you have video tutorials on how to use your full potential?

    3) How deep could you see the effects of your shader? I want it so that my player can dig in certain areas of the scene with a concrete material, such as sand beach ... Would it serve your asset for this or only serves to make signs or grooves of footprints when passing objects?

    4) What plans do you have to update and improve your asset? For example including some of the features mentioned above in the forum thread... for example

    regards
     
  16. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Since RTP supports tesselation, than it should be actualy quite easy to implement this, but I don't have RTP so I can't guarantee this on 100%, but I will look in to it.

    The setup of this asset is really easy and guide is also included.

    It was initially designed for footprints and grooves effects in the snow. So currently there is no direct digging support. Creating effect that simulates digging would be with few changes quite easy, but the problem would be with updating the collider of the terrain/mesh. I will try to come up with some solution.

    In the terms of future updates I am working on several features. I am working on more complex deformation where you will be able to set different stiffness for specific surface, so that wet mud and solid ground would deform differently. I am also working on automatic memory management for games where huge worlds are required and memory budget is low.
     
    julianr likes this.
  17. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    I am glad to hear that you are going to look at the compatibility with RTP and the issue of how to implement terrain excavation according to the material.

    How long do you think it can take you to check these two aspects and give an answer? I am really interested in your asset but I have some urgency and I do not know if to wait some time for you to implement these updates or buy the asset "Dynamic Terrain Objects"

    I'm waiting for your answer, cheers
     
  18. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Dont be like Kevin - dont buy this asset if you are a Mac user
     
  19. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    hi
    thank you for the advice Der_Kevin. But what is the problem in MAC? Could you give some information?

    I do not know if Vasica has any problems, but it's been almost 5 days since I sent my last post asking ...

    Bad impression to buy the asset, I think you have to be a little faster to answer, especially when I am interested in your asset.
    This type of things make doubt the support that can give later ...


    regards
     
  20. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    its just that OSX still on OpenGL 4.1 - this asset needs open GL 4.3
    i mean, its written there. but i thought OSX would be already on 4.3
     
    ftejada likes this.
  21. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    I am really sorry that I didn't answered before, but we were presenting latest build of our game on conference so I didn't have time to check the forum.

    Since we are getting close to the release of our game I can't give you any date when it will be done. If you are in a rush than you should rather go with that Dynamic Terrain Objects.

    Unity 5.6 ,which is currently in alpha, will bring compute shaders to metal and vulkan support, so basically all you will have to do is just to switch to one of those APIs and everything should work as on DirectX or OpenGL 4.3.
     
    Der_Kevin and ftejada like this.
  22. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Thanks for your reply. Okay, I'll think I do.

    Another question ... can you put a link to your new game to see some gameplay ??

    regards
     
  23. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Here is our 8 month old steam greenlight trailer. It's quite outdated. The visuals are now much better than in this trailer, but we don't have newer trailer out yet.

     
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Looking forward to these updates, then I'll grab it. Would be good to see what a radius explosion would do to the terrain.
     
  25. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    The idea seems original. I hope you are very lucky with your game.

    regards
     
    PerunCreative likes this.
  26. captainkirk_k

    captainkirk_k

    Joined:
    Aug 31, 2014
    Posts:
    1
    Can you add physics to this? IE if a ball rolls over a section thats all ready been rolled over and move the ball in to the all ready made path?
     
  27. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    I'm not sure what exactly do you want to achieve. Can you give me more details or some reference video?
     
  28. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hi, can you add this at run time? So for example you have a scene with snow accumilation I could increase a slider or value each time to create snow depth with wreckit.
     
  29. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Yes you can, there is value for that in the shader :)
     
    ftejada and julianr like this.
  30. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Awesome! thanks. I'll pick this up :)
     
  31. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    i installed now the latest 5.6 beta and set the API to metal (also for the editor) but it also wont work there. i get several error messages:
    RenderTexture.Create failed: format unsupported for random writes - 16.
    UnityEngine.RenderTexture:Create()
    ComputeDeformation:InitSurfaces() (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:133)
    ComputeDeformation:Start() (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:86)

    UnityException: SetTexture failed
    UnityEngine.ComputeShader.SetTexture (Int32 kernelIndex, System.String name, UnityEngine.Texture texture) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ComputeShaderBindings.gen.cs:83)
    ComputeDeformation.InitSurfaces () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:141)
    ComputeDeformation.Start () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:86)


    UnityException: SetTexture failed
    UnityEngine.ComputeShader.SetTexture (Int32 kernelIndex, System.String name, UnityEngine.Texture texture) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ComputeShaderBindings.gen.cs:83)
    ComputeDeformation.DeformMesh (UnityEngine.MeshFilter mf, UnityEngine.RenderTexture result) (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:236)
    ComputeDeformation.Update () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:176)
     
  32. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    try replacing RenderTextureFormat.R8 with RenderTextureFormat.ARGB32 on lines 111 and 132. You should also go to the ComputeDeformation in the WreckItManager and select the render texture which is under Camera Render Texture field in the script and change its type also to ARGB32. Let me know if it helped
     
  33. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    hey, i still get the same errors but i red it could be because iam still on OSX 10.11.12 (el capitain)
    gonna update to sierra now and will let you know how it turns out

    edit:
    updated to the newest macOS (10.12.3). now all errors are gone but shooting the balls on the terrain has no effect

    these are my settings:

    unitymetal.jpg
    (also ticking "auto graphics api for mac wont change anything)

    and, btw the OpenGL bool is false - if i set it manual to true i get these errors:

    NullReferenceException: Object reference not set to an instance of an object
    ComputeDeformation.InitSurfaces () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:121)
    ComputeDeformation.Start () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:89)

    and

    NullReferenceException: Object reference not set to an instance of an object
    ComputeDeformation.DeformTerrain () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:204)
    ComputeDeformation.Update () (at Assets/WreckIt/Assets/Scripts/ComputeDeformation.cs:176)
     
    Last edited: Feb 15, 2017
  34. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    In the awake function there is a part which checks your gpu api and then it picks compute shader for your api. When you set opengl manually to true, did you also assign the proper compute shader and where did you set it to true? Instead setting it manually try to alter the part which checks for opengl with this:
    Code (CSharp):
    1. if(SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore || SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Metal)
    If you are still getting the nullreferenceexception on the same spots, then debug that part if the variable computeshader on that line is not null or if the renderetexture which is being passed to that shader is not null.
     
  35. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    hey, so i did what you said above and at least now i wont got any errors anymore.

    also the render texture is changing when i let the ball hit the terrain - so i see some dots on the white texture.
    but in game nothing happens.
    i also reverted the ARGB32 back to R8 but that also did not had any effect.
     
  36. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Could you send me screenshot of the displacement texture in the terrain after shooting multiple objects on the terrain? When you switch to wireframe shading mode does the terrain looks like the left picture or the second one?



     
  37. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
  38. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
  39. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
  40. exploitedtaken

    exploitedtaken

    Joined:
    Feb 25, 2014
    Posts:
    19
    So we can't use with Relief Terrain Pack? too bad..
     
  41. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Well it depends. If the RTP supports tesselation or some other ways like POM for displaying height from texture you can use this plugin too. It should't be too difficult to alter RTP terrain shader to make it compatible with this, but I can't say for sure since I don't have RTP.

    Right now I'm working on better depth representation during deformation, but after that I would like to make LUX and RTP terrain shaders compatible with this.
     
  42. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    If you ask the RTP guy for a free RTP license, he will give you one, I guess. I would. RTP support is the most important one.
     
  43. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Ok, I will contact him
     
  44. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    I should talk to Jason of the MegaSplat asset. That is like RTP but supports 256 materials.
    I think your asset would be very good if you have support with MegaSplat
     
  45. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Yes please.
    If it will be compatible with megasplat i will buy too.
     
  46. Dave_LeDev

    Dave_LeDev

    Joined:
    Apr 14, 2015
    Posts:
    33
    I'm curious to see if this is still being developed upon or maintained. While I see activity in the forum, the asset was last updated in 2016. Is it functional with the latest iteration of Unity? Are there any new features being developed?
     
  47. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    the plugin works with the latest unity 5.6 just fine, but currently there isn't time on new features, because we have 1 month before release of our game
     
    Dave_LeDev likes this.
  48. MaazBaig

    MaazBaig

    Joined:
    May 17, 2013
    Posts:
    38
    Hey, So i just bought the asset but no matter how much i try to adjust the values.. the Capsule collider on my player is barely doing any deformation. Where as if i roll a ball, it creates the proper indentation.

    Is this not supposed to work without an object rolling on it?
     
  49. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    You mean the fps character in the included demo? The demo character doesn't have a mesh, that's why it is not doing anything
     
  50. MaazBaig

    MaazBaig

    Joined:
    May 17, 2013
    Posts:
    38
    Oh, sorry no i meant the my own character. After a lot of tweaking, i'd get like choppy trails.. Not sure why its not ending up smooth.