Search Unity

[RELEASED] Dynamic Decals

Discussion in 'Assets and Asset Store' started by Llockham-Industries, Jan 12, 2017.

  1. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @DDNA - Nice find, managed to recreate, working on a fix now.
     
  2. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @DDNA - Finally managed to track this one down. Thanks for the repro case, made it significantly easier. Essentially the modifiers where not being de-registered as they needed to be enabled to be deregistered, but the deregister call back was being called from onDisable() (ie. they were already disabled). The check made sense for the register callback, but shouldn't have been in place for the deregister callback. This actually caused a lot of performance issues in the goo scene, as fade modifiers would stack indefinitely. pretty big find, thank you!

    To fix open Modifiers.cs and change line 62 from -
    Code (CSharp):
    1. if (Application.isPlaying && gameObject.activeInHierarchy)
    to
    Code (CSharp):
    1. if (Application.isPlaying)
     
  3. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    I just bought this and on Mac with OpenGL it works fine. But when i try to build for Windows (DX11 and DX9) build fails with this error:
    Shader error in 'Projection/Decal/Specular/Forward': texlod not supported on this target at Assets/Dynamic Decals/Resources/Shaders/Cginc/Projections.cginc(374) (on d3d9)

    Any help?

    [edit] Never mind, found solution in previous pages. Forum search/google did not find it because error message were in screenshot :)
     
    Last edited: Nov 30, 2017
    Llockham-Industries likes this.
  4. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    Ok, another problem with Dynamic Decals. Something about them are causing lag on render, even when decals are not visible? Is this from Decals or do i have some other problem?

    [edit] I just confirmed that this is somehow related to Decals. When i turn Decals off, the game runs at 60fps. With decals, about 20fps.

    Weird part is that decals are not even visible, when they are created (blood splatters) rendertime goes thru the roof.
     

    Attached Files:

    Last edited: Nov 30, 2017
  5. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @teroojala - Could you show me your mask settings in the Dynamic Decals Settings window? I gather your using 2 of the layers, is the layer that contains your terrain apart of both of these?
     
    Last edited: Nov 30, 2017
  6. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    I'm new to Decals so i have not touched the layers at all. Here is the settings.
     

    Attached Files:

  7. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @teroojala - The system is essentially a screenspace effect. It uses shader replacement to build a view of the world in buffers, then uses these buffers in the main pass to reconstruct our decals.If there are active decals in the scene they will require this shader replacement, but this cost is independent of the number of decals. This is how we are able to generate and move decals at run-time so quickly, it's all done in the shader. Of course, the downside is you have to pay for the cost of drawing these buffers.

    Right now you're doing so three times though. Do you perhaps have multiple cameras? If so do you need to see decals in all of these cameras? Working on more efficient shader replacement options as we speak as well :).
     
  8. davidlannan

    davidlannan

    Joined:
    Jul 11, 2013
    Posts:
    45
    Hi, I love the decal system and generally works excellently. However Im running into some odd issues with shadows. It appears that shadows are not being rendered over the top of the decals? Is there a simple fix for this? (I have tried all the decal types with no luck).
    upload_2017-12-4_17-24-37.png
     
  9. skom01

    skom01

    Joined:
    Apr 15, 2013
    Posts:
    2
    Hi~ i'm using dynamic decal in VR environment(HTC Vive).

    I loaded your sample VR scene, and blood decal on bottom looks like screenshot.

    I applied dynamic decals on my own scene, similar result happened.

    How can I solve this problem? Thanks in advance :) dynamic decal screenshot.JPG
     
  10. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    778
    First time using release 2.x, just updated everything and had some questions about the new version. Noticed a difference with the old version 1.x - not sure if it's a bug or I'm just missing a configuration option somewhere: why are all decals now rendered on top of any alpha-tested shaders (e.g. a tree 50 meters in front of a albedo/normal decal is ignored and decal is rendered on top of it).

    Also, it looks like ambient lighting not applied on any decals not in "Force Forward" mode - any shadows are pure black, in contrast with forward mode, which is correctly lit by ambient. This was the same on 1.x after I moved to Unity 2017, though - only Unity 5.6 had correct ambient contribution on your deferred decals. Might be some sneaky shader macro change you'll have to account for.
     
    Last edited: Dec 5, 2017
  11. davidlannan

    davidlannan

    Joined:
    Jul 11, 2013
    Posts:
    45
    Im going to start digging into the shader to see if I can get the decal rendered before the shadow pass. Im hoping its just a sort order thing.
     
  12. TeemuMV

    TeemuMV

    Joined:
    Nov 10, 2017
    Posts:
    19
    Same here.

    Using latest Dynamic Decals in Unity 2017.3.0f1 with Vive, happens in both Single- and Multi-Pass in the demo scene.

    It's very visible when moving the controller in front of the eyes, as if the geometry is offset.


     
    Last edited: Dec 5, 2017
  13. tagoth

    tagoth

    Joined:
    Jan 21, 2017
    Posts:
    2
    I'm also having these problems with VR.
     
  14. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @skom01 @TeemuMevea @tagoth - Sorry about the wait, took a little bit to track down. VR Issues can be fixed by opening DynamicDecals.cs and changing line 111 from :
    Code (CSharp):
    1. fireInCulling = true;
    to:
    Code (CSharp):
    1. fireInCulling = false;
    [edit - Switch to false, not to true, will already be on true]

    @davidlannan - It's not a matter of having the decals render before the shadows, it's a matter of having the decals account for the shadows when rendering to the fourth Gbuffer. I believe bac9-flcl is on the money, they might have changed something internally in the standard shader. As the standard shader variants of this system reference those files heavily it's likely this is the cause, investigating now.

    @bac9-flcl - Sorry for the wait, investigating now.

    For those interested in reducing compile times or optimizing for Android devices, I have a new patch ready to test internally.

    This patch separates the system into different shader replacement methods for different subsets of devices (Standard, Mobile, VR). The shaders themselves have also been separated into different shaderLab files for each method. You can now specify which method you wish to use, then remove the irrelevant shaders for methods not in use. This, combined with removing the shaders for the projection types you aren't using should reduce the number of shader variants at least tenfold, reducing build times dramatically. I'll be writing a guide for new users, expect it in the next patch.

    I've also added the option to disable masking. This, combined with the mobile shader replacement method, allows the system to run purely on Unity's inbuilt low-precision packed depth-normal shader replacement. As this is built into the rendering pipeline, it runs much faster than anything we can author ourselves (Until SRP's land).

    Email is at (Support@LlockhamIndustries.com) if you're interested.
     
    Last edited: Dec 11, 2017
  15. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    778
    We're definitely interested in disabling masking and using standard depth/normal data for performance gains, that's a great idea!
     
    recon0303 and hippocoder like this.
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,357
    Particularly if it's possible to set it up so there's a specific order. For us it's:

    - draw level geo
    - draw decals here
    - draw all other rendering

    That should be feasible without masking right? I mean really, it's absolutely the most common use case. Dynamic objects like debris can always be pushed to just before decals if we need to on a per case basis...
     
  17. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    I'm still struggling with HUGE performance drop with Dynamic Decals.

    If i draw one decal, FPS drops from 84fps to 25fps. And there is one decal and one camera that renders it.

    I have minimap-camera that seems to be the problem, blood-decals are on "Decals" layer and Minimap-culling mask ignores that layer. So minimap does not even render decals, but anyway when i disable minimap-camera the fps goes back to 84fps.

    Any advise on this? For now Dynamic Decals are not usable in my project.
     

    Attached Files:

  18. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,595

    agreed.
     
  19. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,595
    Great news. Yes I been needing to ..for my Android game I'm about to release.
     
  20. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @hippocoder - You could use draw order in these scenarios as a substitute for masking. All you would have to do is set the objects you didn't want to be drawn on to be apart of a sorting layer higher than the default. Actually a really good idea.

    @bac9-flcl @recon0303 - Send me an email if you want an early copy. Do keep in mind though that this is only recommended for mobile devices. I wrote high precision custom shader replacement. Unfortunately, using Unity's default shader replacement does result in artifacts. On mobile devices, these will hardly be noticeable, but on PC or VR, you will need the high-precision shader replacement. That said, eventually, if everything goes to plan and I get stop getting side-tracked writing tutorials/ shader optimizations/ fixes etc. The custom shader replacement should become as efficient as Unity's, and it will give us masking for free as well.

    @teroojala - Could you send me an email (Support@LlockhamInductries.com) with profiler screenshots? (Deep profile if possible) and the debug information? (Window > Decals > Settings, while the game is playing) I have a build I'd like you to test out for me. I expect a small cost for the shader replacement, but 30ms is insane, and your draw-calls aren't increasing substantially, something unusual is definitely happening.
     
  21. spacemarine

    spacemarine

    Joined:
    Mar 28, 2013
    Posts:
    13
    I'm also having same VR issue that not match with exact decal projection position.

    I changed DynamicDecal.cs code as mentioned but had no effect.
    ( In fact fireInCulling = true; is already true in my source. )

    Help please~.~;;
     
  22. Fabi88

    Fabi88

    Joined:
    May 26, 2017
    Posts:
    4
    Hi, i have these few errors

    Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs(693,74): error CS0117: `CameraType' does not contain a definition for `SceneView'
    Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs(706,70): error CS0117: `CameraType' does not contain a definition for `SceneView'
    Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs(1148,49): error CS0117: `CameraType' does not contain a definition for `SceneView'
    Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs(1161,49): error CS0117: `CameraType' does not contain a definition for `SceneView'

    pls help...
    Thank You :)
     
  23. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @Fabi88 - Which version of Unity are you using? It seems they've stripped the enum, or possibly renamed one of the values. I can work off the name of the camera instead, it shouldn't be an issue. Send me an email (Support@LLockhamIndustries.com) and I'll send you a fix :).
     
  24. Fabi88

    Fabi88

    Joined:
    May 26, 2017
    Posts:
    4
    Llockham-Industries likes this.
  25. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Hello, We are using Lux shader with snow, is there any way to show decals over the diffuse texture but under the snow, Dor now everything is showing over the snow, and if we need some decals that are covered by snow there is a problem. Can you help us with that?
     
  26. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @kubaskia - This might be possible, but it would definitely be very tricky. I'm guessing, by looking at it, the lux shaders simply draw the snow in the same pass as everything else. If we could split that off and draw it after the decals have been drawn, in an additional additive pass/material it might be possible?

    The alternative would be to change how the shader renders into shader replacement mask layer with a unique render tag, but the problem with this approach is that the mask buffer is binary, while I'm guessing you would like the snow to fade in over the top of the decals softly; and this approach would also break it for other shader replacement applications ie. post-processing effects.

    If you can split the snow into a separate pass I might be able to help you.
     
  27. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Ok thank youfor help! Lux has his own deffered decal system, so I think it should be possible to make it work with your system too. https://forum.unity.com/attachments/08_lux_decals-jpg.184948/ Thee is special decal shader in lux shader pack so maybe you could in some way make your decal system work with that?
     
    Last edited: Dec 21, 2017
  28. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Is there chance that you will help us a liitle with that? If your system would work with different materials than your basic settings then we could use just lux decal shader with your system.

    Will be there custom materials and shaders support? This is very important I think, in other way whole system has huge limitations.
     
    Last edited: Dec 24, 2017
  29. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    130
    Awesome asset but MORE docs please. Just changing Albedo color from script is complicated as the main class - ProjectionRenderer is not documented :/
     
  30. mneilly

    mneilly

    Joined:
    Feb 13, 2014
    Posts:
    6
    FWIW - this seems to work for me to change color and texture (using version 2.0.3):

    Code (csharp):
    1.  
    2. using LlockhamIndustries.Decals;
    3. ...
    4. public GameObject myDecalPrefab;
    5. public Texture2D t1;
    6. ...
    7. GameObject myDecal = Instantiate (myDecalPrefab);
    8. ProjectionRenderer pRend = myDecal.GetComponent<ProjectionRenderer> ();
    9. Specular specProjection = pRend.Projection as Specular;
    10. specProjection.albedo.Texture = t1;
    11. specProjection.albedo.Color = Color.blue;
    12. specProjection.Mark(true);
    13.  
     
    Last edited: Dec 29, 2017
    hopeful likes this.
  31. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    130
    I actually did it simpler way (afer looking int ProjectionRenderer code):

    Code (csharp):
    1.  
    2.         GetComponent<ProjectionRenderer>().SetColor(0, value);
    3.         GetComponent<ProjectionRenderer>().UpdateProperties();
    4.  
    not the point tho, those things should be documented
     
    hopeful likes this.
  32. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,281
    Hello, I am looking for a specific use case for this asset and was wondering if it's possible.

    I'm making an RTS game and want a "decal" or "selection circle" underneath my unit's feet when any particular unit is selected. The problem is the projector performance in Unity is really bad, as I was told each projector has to re-draw whatever surface it is projected on for each projector.

    In an RTS game, this can be hundreds of units, and if the selection decal/circle is projected on the ground (which is what I want it to be), it has to re-draw the ground hundreds of times......which is a terrible performance hit. Brings my game to unplayable framerates.

    So, I was hoping your system might be able to handle say 150 projected decals/circles at once, without a huge performance hit? Is this possible with your system?

    Thanks for any info.


    (There is a technique I read about but have no idea how to implement. It involves using a rendertexture, getting the positions of each of my units, plugging them into the rendertexture, and then using only ONE projector to render the decals/selection circles for all of the units. I don't know how to use this technique though, was hoping maybe you might).
     
    Last edited: Dec 31, 2017
    blitzvb likes this.
  33. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    Hey, sorry for the delay guys.

    @slimshader / @mneilly - Nice find, updating now. Edit - Projection Renderer Documentation

    @Velo222 - The selection decals can definitely be instanced using this system, you should be able to draw between 500 and a thousand in a single draw call. The cost of shader replacement would be bigger than all the decals being drawn, and this would sill easily be cheaper than your projection renderer method. I would only recommend my system if you're projecting onto an uneven surface though. If your game worlds flat you could easily achieve the same results using a quad and the standard shader.
     
    Last edited: Jan 5, 2018
    slimshader likes this.
  34. Mijail_Bitboys

    Mijail_Bitboys

    Joined:
    Apr 22, 2015
    Posts:
    146
    Hi! I´m getting this error in Unity 2017.3.

    GetPixels32 failed: insufficent pixel buffer size (1), must be at least 4 x 4
    UnityEngine.Camera:RenderWithShader(Shader, String)
    LlockhamIndustries.Decals.CameraData:DrawSplitPass(Camera, Camera, DynamicDecals, Shader, Boolean) (at Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs:1522)
    LlockhamIndustries.Decals.CameraData:RenderToTextures(Camera, Camera, DynamicDecals, RenderTexture, RenderTexture, RenderTexture) (at Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs:1485)
    LlockhamIndustries.Decals.CameraData:UpdateShaderReplacement(Camera, DynamicDecals) (at Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs:1425)
    LlockhamIndustries.Decals.CameraData:Update(Camera, DynamicDecals) (at Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs:1029)
    LlockhamIndustries.Decals.DynamicDecals:SuperLateUpdate(Camera) (at Assets/Dynamic Decals/Scripts/Core/DynamicDecals.cs:696)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  35. Triggiano

    Triggiano

    Joined:
    Sep 22, 2015
    Posts:
    10
    Would your decal system work good for trails? If so, would there be a way using your system to give trails a tag or collision so different speed properties could be attributed for players on said trails?

    Was thinking something like this: https://i.imgur.com/7ku3yzk.gifv
     
  36. wadewt

    wadewt

    Joined:
    Mar 17, 2013
    Posts:
    14
    Hello!

    I'm having a lot of trouble getting your decals to render behind transparent cutout materials made with Amplify Shader Editor. Using Unity's standard material with the rendering mode set to "Cutout" your decals appear where they are supposed to (behind and in front when appropriate). But for my tree shader made with ASE the decals exclusively render on top of the objects. In ASE I've just set the render type to transparent cutout. I'm using deferred rendering and materials and force forward is *not* checked for the decals.

    Sorry if this is more of an Amplify problem, it just seemed more appropriate to post here as I have no problems with the shaders otherwise.:)
     
  37. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @Mijail_Bitboys - I've been unable to recreate the issue in every version of 2017.3 available, beta or release. Could you shoot me an email (Support@LlockhamIndustries.com) with the rendering path, platform your building for, texture compression settings, and a screenshot of your camera's settings?

    @Triggiano - This would definitely be suitable, however, so would plain quads, and you could get better performance using plain quads. You should really only use this package if your painting on uneven surfaces. For your use-case, I would recommend simply raycasting down and instantiating quads, then giving your quads a variant of the standard shader that supports instancing. If you do plan on varying up your levels with ramps etc. like below :


    then I'd recommend switching to shader based decals, experimenting with a trail renderer or building a system that generates custom meshes on the fly (Would recommend if you know how). Keep in mind decals will only work with simple trails that can be broken into generic shapes and overlapped. A tire track, for example, would distort on turning when using a decal based approach (as decals are made up of square projections), while using a custom mesh or trail renderer would allow you to warp and bend your trail around corners.

    @wadewt - The system relies on shader replacement, which has very strict standards on how shaders need to be built to work with it. a RenderType tag must be present and all the properties of the shader must use standardized names (_MainTex, _Color, _Cutoff). Send me an email (Support@LlockhamIndustries.com) with your shader attached and I'll take a look at it for you :).
     
  38. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    130
    Hey adding Dynamic Decals to the project is causing very long build times, how to fix that?
     
  39. SentryGames

    SentryGames

    Joined:
    Jun 4, 2014
    Posts:
    15
    Hi,

    I recently bought your package Dynamic Decal. It works pretty well, good job :)

    But unfortunately, we need to use decals on a specific shapes and not just on a square or a circle. In fact, we generate custom collision shape with a specific editor that allows users to define their own shape from 3 to 10 points. All these shapes are convex.

    Once we have these shapes we would like to add your decals system on the entire surface of the shape without use any texture. For example, if we generate a triangle, we would like to have a triangle colored decal. As we could generate any type of shape from 3 to 10 points it is not possible to have the corresponding texture.

    So, we contact you to know if you could help us to modify a little bit your shader to take into account the shape of the gameobject? Or just send to the shader the point list of our shape to clip every point that are outside of the shape?

    P.S: i sent you mails but did not received any answers so I try with the forum :)
     
  40. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @slimshader - I have a working on a solution now, it will be in the next patch. Send me an email (Support@LlockhamIndustries.com) and I'll send you an early copy.

    @NarLoke - Couldn't find your first email, but got the one from your personal address, the reply should land any second :).
     
    Last edited: Jan 15, 2018
    slimshader likes this.
  41. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    130
    That's cool, will wait for update then. Btw. for example Beautify asset has settings page that allows for disabling unused shader stuff exactly for this purpose.
     
  42. SentryGames

    SentryGames

    Joined:
    Jun 4, 2014
    Posts:
    15
    Yep, thx for your quick answer :)
     
  43. DimeStudios_Dan

    DimeStudios_Dan

    Joined:
    May 4, 2015
    Posts:
    4
    Hey, love the plugin. Using it with a PS4 game atm and hopefully get around to XBone and switch, and I'd love to help out with making sure the plugin is at least working / building on those platforms.

    I did a test on PS4 thru Unity 2017 2.0p4, only big issue was shaders failing to compile due to ambiguity. LMK if you need the full logs.

    Basically, the problem was a lerp ambiguity in ForwardPass.cginc
    Ln:36 " c = lerp( 1 , c, fragment.occlusion); " should be " c = lerp( half3(1,1,1) , c, fragment.occlusion); "
    After making that change, I got it working on PS4.

    Other things to note is Reflection can be pretty expensive on different platforms. For the include behaviors functionality you have in the Pool system, I'd suggest just instantiating the Projection prefabs for the include behaviors part, and doing the new GameObject -> copy Projection settings if include behaviours is off.
    Also, as a headsup, you can't use Linq on some platforms, PS4 being one of them. Pretty sure the plugin's runtime is clean, but just in case.

    Again, love the plugin, and while I've adjusted the shader on my side, if you can incorporate it into future versions so anyone on PS4 doesn't have to change it, that would rock!! <3
     
    Llockham-Industries likes this.
  44. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Hello! Very much enjoying Dynamic Decals right now but having one issue with it. I'm using objects/materials in my scene that are GPU instanced and have per instance properties assigned via MaterialPropertyBlock. These objects are actually unrelated to my use of Dynamic Decals -- the decals I'm using are only projected to the Terrain layer, nothing else -- however when I use Dynamic Decals, I get a whole bunch of additional draw calls for these objects (on RenderForward.RenderLoopJob, despite that I'm using Deferred for everything else) coming from Dynamic Decals's DepthNormalMask_Packed shader. They don't get instanced, resulting in an additional batch and SetPass call for every single object. The decals themselves are still instanced properly and result in no additional unnecessary SetPass calls.

    @Llockham-Industries : I'll send you a small repro via PM. Would greatly appreciate any insights you might have. It's very possible I'm just missing something simple -- a toggle in a shader or decal setting that needs to be ticked.

    My scenes have a very large number of duplicated decals and other objects, and the decals themselves seem to be instancing and performing great, but it'll break my use of it if they cause my other objects to no longer benefit from instancing.

    Much thanks!

    [EDIT: By the way, this seems like it might be similar to the issue that @kotis21 reported a couple months ago, but I'm not sure if there was any definite resolution to that.
     
  45. JasonJohn1977

    JasonJohn1977

    Joined:
    Aug 12, 2013
    Posts:
    17
    Hello wondering if anyone else has encountered this issue? I've found that the decals don't appear on certain devices it can be a completely blank scene with just one default decal and it will appear fine on a Google Pixel and an iphone 7 but doesn't appear at all on an samsung s7 or s6 has anyone else encountered this / know why this might be happening? (Loving the asset despite this)
    Thanks.
     
  46. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    114
    Is there any news on a release date for an/the update? I am looking for faster build times as well.
    Currently my project takes upto around 5 minutes to build :(

    Thanks in advance!
     
  47. MakabreGaming

    MakabreGaming

    Joined:
    Mar 30, 2017
    Posts:
    37
    In new Unity versions from 2017.3 I guess you can split files of code that get compiled. Just put your files into bundle and compile them instead of all project files that has already been compiled and you don't change. But compile time matters, maybe the developer will reduce it, but it's hard to imagine how.
     
  48. Ripley_UK

    Ripley_UK

    Joined:
    Dec 4, 2014
    Posts:
    1
    Hey guys,

    This product is great, but I'm having issues when using it with VR.

    I'm seeing the same issues mentioned above posted by @skom01 @TeemuMevea, I've tried changing the fireInCulling = false; code, but the problem is still happening.

    I'm using VRTK, not sure if this could have something do with the issue.

    One other thing I've noticed, once a decal is projected and I rotate my head in VR while looking at it, the decal seems to move on it's own axis with the rotation from the headset. Seems very weird.

    Cheers
     
  49. PixelMind

    PixelMind

    Joined:
    Aug 16, 2013
    Posts:
    100
    Bought the asset yesterday and tried to get it to behave with no success. I'm getting tons of extra batches and at worst 5x more SetPass calls even when there's just a single decal somewhere in scene. It's pretty much completely unusable for me.

    Am I missing something obvious here or is this expected? I know the scene has tons of drawcalls even before adding any decals but more than doubling them just to draw a few decals doesn't seem right...

    Project is using deferred rendering and there are a few additional cameras (some of which are using forward) which I tried to disable and tried using the ProjectionBlocker -component which manual suggests. Didn't see any noticeable performance increase in either case.

    Below is a typical stats window of a scenario where almost batches jump from 7600 to 16000 and SetPass calls from about 1000 to 5000(!). First image is before Dynamic Decal and second one is after.


    And profiler from a similar case. IIRC the above screenshot had unitys occlusion culling enabled and below does not. Same scene / project otherwise. Dynamic Decals appears to spend about 70% of the total frametime re-rendering the scene. What is it doing there? Is this really necessary if in deferred you have the depth buffer already anyway?

    Tested on GeForce 1070 and AMD Ryzen 1400.
     
  50. Llockham-Industries

    Llockham-Industries

    Joined:
    Aug 4, 2013
    Posts:
    262
    @Dime_Dan - Thanks for the suggestions, included your shader tweak into the next build, looking into optimizing the current pooling. Possibly instantiating the first pass settings allowing users to pre-warm the pool.

    @PieterAlbers, @MakabreGaming - The new version has a solution to build times. Splitting up shaders into different groups of variants that are needed in the build. There's also a guide on how to remove the variants you don't need which should increase build times dramatically :). Also included a bunch of other new tutorials/guides/info. It's been submitted, email me (Support@LlockhamIndustries.com) for an early copy.

    @Ripley_UK - New build should fix this, it's been submitted, email me (Support@LlockhamIndustries.com) for an early copy.

    @deliberative, @PixelMind - Unfortunately these both look like more cases in which rendering shader replacement in forward rendering (Only option available) is breaking batching/instancing that would otherwise be suitable for deferred rendering. There isn't an easy solution to this problem. I'm still wrapping my head around SRP's, there is definitely hope there, as it should be possible to explicitly request something be rendered without lighting, allowing it to be batched, but as this is an entirely new rendering architecture, support for this is still a fair way off (SRP's also still considered experimental).

    Currently, if you have access to all your shaders, you could explicitly declare what you want need to be in shader replacement with custom render tags, then only draw what needs to be drawn on / occlude decals into shader-replacement. However in most cases, this will be everything anyway, and it's not really feasible to have you write custom shader tags into every shader you use to support the system. Alternatively, I can offer you a refund (Support@LlockhamIndustries.com) Sorry I can't be of more help.