Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Will future versions of Unity ever include an official decal system?

Discussion in 'General Discussion' started by AwesomeX, Oct 27, 2014.

  1. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
    Hey folks.

    This may have been asked before and with good reason.

    I've been using Unity for some time now, and I really do like how it works, its an amazing piece of software, but for a while now, I've noticed there's never been a decent way to implement decals into a project, weather it be blood, bullet holes, paint splatters, explosion marks, tire tracks, or any other number of things.

    I'm well aware there's assets on the store that somewhat accomplish this, but isn't it a bit odd that we're nearing Unity 5, and there's still no built in way to apply decals?

    I'm liking the improvements coming in future releases. But I'd love to see something related to decals getting in eventually.

    Keep up the good work though Unity devs.
     
    Gekigengar, Ony, kaiyum and 2 others like this.
  2. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
    I'm a bit surprised no one has put there opinions on here.

    I'd love to hear what you folks think.
     
  3. bluescr

    bluescr

    Joined:
    Sep 7, 2014
    Posts:
    21
    The thing with decals is that they're quite a game-specific problem.

    Do you want simple quads? proper (clipped geometry) decals projected over uneven surfaces? deferred decals, for less CPU cost (at the expense of GPU, and of course unsuitable for mobile)?

    Do you need highly dynamic decals (machine gun bulletholes, footprints from many characters, etc), or are you mostly looking to paint static decals on to a scene to add detail?

    Do your collision meshes match your render meshes? - or are you using simplified collision meshes? Do you want anything more complex, maybe wound decals on skinned meshes?

    Do you need to animate/fade decals? How do you want to deal with limiting the decal count/removing old decals - fade them out, or wait until they're off-screen?

    Do you need to light them? - with proper lights, or light probes?

    Yes, decals are something that in some cases could benefit a fair bit from the performance of native code - but I'm not sure a 'one size fits all' solution is very feasible?
     
  4. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    It seem unlikely. Mostly because there are a wide variety of approaches depending on needs, from simple to complex. One solution would be too expensive in some cases or limited in others. Really it is a game specific feature, and should be built/implemented to fit the needs of the game. Also, it a relatively simple thing to do, it seems way overkill to implement it on a engine level. It is a perfect fit for asset store solutions if you don't have the ability to write it yourself.
     
    ogike and Deon-Cadme like this.
  5. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Yes, that's the problem they need to solve. Just like most people didn't think a engine to suite all would work.
     
    AwesomeX likes this.
  6. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
    Pretty much this.

    It doesn't matter if it CAN be achieved through either scripting, or an Asset Store asset.
    In my opinion its something Unity SHOULD have by default.
    Engines that are ages old have proper *decal systems* and I'll give a few examples.

    Source Engine (Almost 10 years old if my memory is correct)
    GoldSource Engine (15+ years old)
    Doom Engine (20+ years old)

    Not to mention Unity's competition, UDK, UE4, Cry Engine, and a few others I won't mention right now.
    They all have support for either texture/decal on model *magic* or other means of placing decals, such as blood, explosion marks, and other things.

    I'm in no means an expert on Unity, and I have indeed made up my own sort of *decal* system in the past, but there were a lot of things I didn't like about it.
     
    hippocoder likes this.
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,937
  8. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
  9. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Clarification on the above tweet: we aren't working on built-in decals (just yet).

    For Unity 5.0 I'm working on making the "rendering pipeline" much more extensible (via something called "Command Buffers"). One thing that it does allow to be built, is "deferred decals" (see this presentation). And a lot of other things.

    We should make out-of-the-box decals too at some point, just so far everyone has been busy doing something else.
     
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,782
    Isn't that you already have something working on that tweet?? maybe release it as experimental? :p
     
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The major issue preventing our use of them is that they're not rendered where there's shadow unless another light is shining on them - which leads to some pretty unworkable situations in games with varying lighting or time of day.

    Is there a way to fix this? We don't mind using normals only or albedo only...
     
    Woodlauncher likes this.
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Right, after a chat with smarter people than I am, well it turns out you *can't* do deferred decals in Unity.

    The deferred AO implementation prevents it. I understand it's done because need to support 21 platforms but I guess we will have to find other old fashioned ways of adding blood, scorch marks etc on the fly. The blog demo is not useful in changing lighting conditions.
     
    Woodlauncher and wccrawford like this.
  13. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
  14. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    "Will future versions of Unity ever include an official decal system?"
    Yes. Of course yes.