MAKE YOUR LEVELS PRETTIER with Decals!

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • The best way to make bullet holes and more in Unity!
    Check out Skillshare! skl.sh/brackeys12
    Listen to Game Dev Unchained here: bit.ly/1TlHiz5
    ❤️ Donate: www.paypal.com...
    ····················································································
    ❤️ Donate: www.paypal.com...
    ● Website: brackeys.com/
    ● Twitter: / brackeystweet
    ● Instagram: / brackeysteam
    ········································­­·······································­·­····
    ► All content by Brackeys is 100% free. We believe that education should be available for everyone.
    ❤️ Donate: www.paypal.com...
    ········································­­·······································­·­····
    ♪ "ES_Brooklyn Flava 2 - Mattias Andreasson" by Epidemic Sound
    ♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound

КОМЕНТАРІ • 377

  • @Brackeys
    @Brackeys  4 роки тому +50

    Hey everyone!
    To those of you who can't find the package: Unity has moved the "Show Preview Packages".
    You can now find it under Edit -> Project Settings -> Package Manager -> Enable Preview Packages.
    If you check that box, you should see preview packages in the Package Manager! :-)
    Stay awesome!

    • @PdUnique
      @PdUnique 4 роки тому +6

      Sir, please mention the link on how to setup HDRP on an existing project...

    • @timepass8419
      @timepass8419 3 роки тому +2

      @@PdUnique im crying on same thing

    • @CraftingTableMC
      @CraftingTableMC 3 роки тому

      Thanks Brackeys!

    • @damiancoventry2078
      @damiancoventry2078 2 роки тому +3

      Regarding setting up HDRP on an existing project, try the following
      1. Back up non-HDRP project somewhere
      2. Open the non-HDRP project within Unity. Open the package manager.
      3. Locate "High Definition RP". As of this writing, it's "Version 12.1.7 - July 18, 2022".
      4. Select this package, then click the Install button.
      5. Unity shows a progress dialog (for just over 2 mins for me).
      6. Unity shows an "HDRP Wizard"
      7. Click the 'fix' buttons for all aspects you want fixed.
      8. This will result in more progress dialogs that install stuff. This step does the vital add an HD Render Pipeline Asset to the project, and selects it within the Edit -> Project Settings -> Graphics page.
      9. Use the various buttons within the "Project Migration Quick Links" to upgrade your assets
      10. In the background you'll see your scene view start to use the HD features as you use the fix/upgrade buttons.
      11. You can click the X button for the HDRP Wizard when you've completed all steps you care about.
      12. I suggest clicking Assets -> Reimport All. This took ~2 mins to complete for me.

  • @toxiccan175
    @toxiccan175 6 років тому +33

    Thank you for doing what you do. You are the go to person when someone asks me what Unity is. Keep up the good work!

  • @Jabrils
    @Jabrils 6 років тому +54

    This is brilliant & just what I needed. To hell with fiddling in shader coder. 😂

    • @jonsnow1092
      @jonsnow1092 6 років тому

      Hello, liked your training ai agent episodes good job!!

    • @guilleacq
      @guilleacq 6 років тому +1

      NOW WOULD YOU LOOK AT THATTTTTTTTTTTTT, two legends meet

    • @obalfaqih
      @obalfaqih 6 років тому +2

      It's time for an AI agent that paints walls using decals ;)

  • @someone-js6pg
    @someone-js6pg 6 років тому +48

    great vid didn't even know what decals were before the video know I *love* them
    Edit: especially because I didn't know how to make bullet holes

    • @gameexplorer4963
      @gameexplorer4963 6 років тому +3

      And that is exactly the kind of audience his videos are for. In a year or so, you will be surprised people were excited to find out about things like that. It's like finding out the names of the months, or the days of the week.

  • @EisenGlas
    @EisenGlas 6 років тому +3

    I love the quality of your tutorials! It's truly amazing. As soon as I have a better paying job I will support you on patreon, I promise! Thank you for this free content. It's much appreciated and so motivating.

  • @twisky3751
    @twisky3751 Рік тому +3

    if anybody is having issues with the decals facing the wrong way or clipping into the ground, change Vector3.up to vector3.forward and change the z pivot to something lower like 0.45

  • @sketch3436
    @sketch3436 6 років тому +2

    The available HDP features are so good, I remember back in the day when I created decals using quads with a material on fade XD

  • @mekniwassime2098
    @mekniwassime2098 6 років тому +325

    "Coding your own game is easier than you think, you know what..." skip

  • @zig8925
    @zig8925 6 років тому +169

    Udemy ad on the video, and skillshare ad *in* the video...so conflicting

    • @stuwustudio
      @stuwustudio 6 років тому +7

      ZiggyZeg 2005 Toxic Can Udemy is a very fishy business... Skillshare’s way better!

    • @supremespark2454
      @supremespark2454 6 років тому +1

      Very sketchy

    • @123okqq
      @123okqq 6 років тому +3

      coding your own games is easier than you think

    • @zig8925
      @zig8925 6 років тому

      I can't wait to see what you make with this!

    • @zig8925
      @zig8925 6 років тому

      @@stuwustudio but it sounds like unity...

  • @InnerTurbulencia
    @InnerTurbulencia 5 років тому +70

    HD render pipeline: "I'll make sure to have a link on how to do that in the description". Oh really?

  • @Oxmond
    @Oxmond 4 роки тому +1

    Nice bullet hole tutorial! Decals rocks! 👍🤓

  • @obalfaqih
    @obalfaqih 6 років тому

    Finally, Decals is out! It will save us a lot of time.
    Thanks!

  • @WonboShim
    @WonboShim 6 років тому +1

    omg finally a good tutorial on decals

  • @esmeemarch612
    @esmeemarch612 3 роки тому +1

    Thank you! Just fixed a bug!

  • @TheHowingFantods
    @TheHowingFantods 6 років тому

    Such a joy to watch these videos.

  • @niklasneuhold8606
    @niklasneuhold8606 6 років тому

    You are a Unity god, love it...

  • @Syntecoderyo
    @Syntecoderyo 2 роки тому

    Just learned about Decals and damn these are AMAZING

  • @aussieraver7182
    @aussieraver7182 5 років тому +2

    I've been trying to figure out for months on how to avoid using 2D planes for decals, it looks awkward when you shoot a character because of the complex geometry.
    Much appreciate Brackeys!

    • @Semaj0z
      @Semaj0z 4 роки тому

      I use 2d sprites, much better

  • @CodedXtreme
    @CodedXtreme 6 років тому +1

    Because of you I'm able to develop games accurately and everyday I watch your videos I learn something new, I'm truly grateful, thank you Brackeys for everything ❤️

  • @SkipToPlay
    @SkipToPlay 6 років тому +6

    Skip Ad: 1:34

  • @sylvainZa
    @sylvainZa 6 років тому

    Brackeys is bae

  • @VladEv1L
    @VladEv1L 3 роки тому +1

    Thanks!!!

  • @warrenroche8420
    @warrenroche8420 6 років тому

    Great shirt Brackeys

  • @pdjinne65
    @pdjinne65 6 років тому

    it really ties the room together.

  • @charlenekaczynski9023
    @charlenekaczynski9023 6 років тому

    Woah! Cool lighting!

  • @Haapavuo
    @Haapavuo 6 років тому +76

    And now make a video on how to render decals without HDRP. Thanks.

    • @GymCritical
      @GymCritical 4 роки тому +7

      Haapavuo ordering people doesn’t get you anywhere lol

    • @PdUnique
      @PdUnique 4 роки тому +3

      @Haapavuo You might consider being more polite

    • @GymCritical
      @GymCritical 4 роки тому +1

      @@PdUnique you're a sensible man.

  • @GuldorPhotography
    @GuldorPhotography 6 років тому

    Holy crap this effect is amazing! I did not know this was even an option, thanks!

  • @CouchFerretmakesGames
    @CouchFerretmakesGames 6 років тому +7

    If it doesn't work, *make sure to* check the *HDRP* asset and manually *enable the decal buffer!*

  • @christophersmit2219
    @christophersmit2219 6 років тому

    Been looking for a tutorial on this for ages! Thanks a lot!

  • @goga.games18
    @goga.games18 6 років тому

    this is exacly what i wanted thank u

  • @aquavitale3551
    @aquavitale3551 6 років тому +6

    How many decals can unity handle without significant slowing down? Can those things be "baked" into textures in runtime in a way lightmap is baked to reduce the number of instantiated projectors if, let's say, we want to keep those bullet holes in a scene forever?

    • @gameexplorer4963
      @gameexplorer4963 6 років тому +1

      That is a tough question. Maybe ask how to click a button in Unity. :D

    • @Uglynator
      @Uglynator 6 років тому +1

      That's what I've been wondering about too. The standard Unity projectors are notoriously slow, so I don't know how fast these will be, especially since they need the HDRP. I've found an asset on the store however, that appearently can bake decals into textures, called EasyDecal. I didn't try it myself as of yet however.

  • @purple_fox_arts
    @purple_fox_arts 4 роки тому

    Thank you, this is exactly what I searched for

  • @rezaka116
    @rezaka116 6 років тому +28

    _Coding your own games is easier than you think._

  • @bluegreninjagamer4443
    @bluegreninjagamer4443 6 років тому +1

    You are AMAZING!!!

  • @endihaxhi2460
    @endihaxhi2460 6 років тому +68

    What about default rendering pipeline? HDRP is so far away, it wont be here for a while.

    • @StigDesign
      @StigDesign 6 років тому +2

      Same for me i tried HDRP but every thing turned pink :( so i had to go back to default rendering and yes it took along time to fix every material and modell :(

    • @Splorange1
      @Splorange1 6 років тому +4

      StigDesign1 u have to convert all the materials to hdrp shader

    • @IndieMarkus
      @IndieMarkus 6 років тому +14

      Just google unity projector - you can use the existing projectors from the standard assets. They are usually used for cheap shadows but should work for bullet holes as well
      EDIT: Here's a link: docs.unity3d.com/Manual/class-Projector.html

    • @Lyserg1260
      @Lyserg1260 6 років тому +13

      There is official asset for decals in default pipeline, just download this pack: blogs.unity3d.com/2015/02/06/extending-unity-5-rendering-pipeline-command-buffers/

    • @StigDesign
      @StigDesign 6 років тому

      @YASTRON oh, i have tried that, but it stayed pink so. thank you :)

  • @Snipergen
    @Snipergen 6 років тому

    Aaaah! Should have just duplicated your bullethole texture and generated a normal map from greyscale, I really wanted to see it :P But great video again guys!

  • @philpa4830
    @philpa4830 5 років тому +2

    Hi Brackeys, is there a possibility to exclude some objects, so they don't get lit by the decal projector?

  • @SzarkaFox
    @SzarkaFox 3 роки тому +2

    For me the rotation is bad with the bullet holes. The decal is streched out because of this. Any idea why?

    • @SzarkaFox
      @SzarkaFox 3 роки тому

      The prefab's transformation is reset, the tiling is 1:1 and the material is set to HDRP/Decal.

  • @maltesvensen1635
    @maltesvensen1635 6 років тому +1

    i think you forgot to add the link on how to get the high defenition render pipe line in the descrpition like you said you would in the video :( been looking up on youtube how to get it but it seems like you need to create a new project for that, isnt there a way to add it on a existing project?

  • @galacticgaming5058
    @galacticgaming5058 6 років тому

    i love this channel!!!!

  • @TsetTsyung
    @TsetTsyung 6 років тому

    Thank you so much. This is another superb tutorial.

  • @KoldGeneration
    @KoldGeneration 6 років тому +1

    Hey Brackeys! Love your vids! Is there a way that you make more of 2Ds? Like a complete 2D TowerDefence, so we can have basics on how to have organized files and everything to be a good game dev? :D Thanks

  • @isaacgejames
    @isaacgejames 6 років тому +1

    I remember using them ins source to make
    "real time shadows"

  • @therealpeter2267
    @therealpeter2267 6 років тому +3

    What's the difference between this and the already existing projector? And also what's the performance of it?

    • @quasar4780
      @quasar4780 5 років тому

      The projector we already have replaces the material of all the surfaces it touches with its own material. This one just projects a "plane" rendered with the given material and wraps it around the surfaces it touch.

    • @therealpeter2267
      @therealpeter2267 5 років тому

      @@quasar4780 okay, thank you!

  • @CMG3d0u4rdFR
    @CMG3d0u4rdFR 6 років тому

    Damn that's very useful. I didn't even knew that feature existed with HDRP ! Thanks !

  • @robmuzz
    @robmuzz 6 років тому

    Great video!

  • @mustafaeren9859
    @mustafaeren9859 6 років тому

    Thank you for everything you are doing for us :) take care, have a wonderful life

  • @danieledesa100
    @danieledesa100 6 років тому

    I would love to have more podcasts from you. Have you ever thought of starting doing that as well? Maybe something that would be available on a mobile device as well? Google podcast??

  • @JanHavel
    @JanHavel 6 років тому

    Good video tho i was kinda expecting a lil bit more tips - like first what comes to my mind is when something flat enough in scene or player hands and so will move between the projector and the wall i suppose those bullet holes will "jump" from wall to that object ... chances are probably smaller than i expect but it would probably not be bad to mention how to mask it by layer or something if its even possible and so.

  • @TriSutrisnowapu
    @TriSutrisnowapu 6 років тому

    Amazing tutorial

  • @abdoljalilsoltani9471
    @abdoljalilsoltani9471 6 років тому

    Excellent !!
    Thankful

  • @rukna3775
    @rukna3775 6 років тому

    checked ur podcast, great. And yeah, those Indian views are mine, I have been following u from a long time.

  • @Yoctopory
    @Yoctopory 3 роки тому

    Would this work as a replacement of the shadow projector in URP, or to create caustics under water?

  • @Weckacore
    @Weckacore 6 років тому

    If an object walks through the box of the decal projector, will the bullet hole appear above the object? For example, a foot steps on where a projector is, does the bullet now look like it is on said foot?

  • @babyfire6221
    @babyfire6221 6 років тому

    didn't find a decal tutorial until this

  • @jacobzackaria9876
    @jacobzackaria9876 6 років тому

    Brackeyyyy....Do a video on Camera Collision and occlusion..also about animating buttons and other UI elements 😀

  • @NicholasScotti
    @NicholasScotti 6 років тому

    what do you think to make a video about "publish your indie game for free" ?

  • @ScientObject40
    @ScientObject40 6 років тому +1

    pod pod pod pod... PODCAST!!!
    lmao!

  • @Ubayla
    @Ubayla 6 років тому

    Don't know why you left it out, but you can also adjust the size of the decal projector by changing the Size property in the inspector or by using the small white handles on the faces of the cube gizmo in the scene. (Instead of by scaling)

  • @southpawdevelopment
    @southpawdevelopment 6 років тому +1

    Brackeys there was no link for the HD render pipeline which I really want and need! Please post one!

  • @flaviopitica
    @flaviopitica 5 років тому

    could not find that link on how to that in the description

  • @adinassaem
    @adinassaem 5 років тому

    is it possible to multiply a decal to objects' textures?

  • @XEVIAN360
    @XEVIAN360 6 років тому

    Nice! But what about drawcalls? How hdrp handles projectors internally? In the standard pipeline it is a shame because every object touched by a projector is being totally redrawn.

  • @ColtPtrHun
    @ColtPtrHun 2 роки тому +1

    If you come back I'll be here :'(

  • @vast634
    @vast634 3 роки тому

    Are the projected decals precisely positioned polygons, or somehow rendered within the projected surfaces shaders?

  • @Vrga
    @Vrga 6 років тому

    Ok,this is epic

  • @omerakyuz3206
    @omerakyuz3206 6 років тому

    Is it performance-friendly for mobile?

  • @watercat1248
    @watercat1248 6 років тому

    i have a few questions
    1. there is a way put for the Decals only to specific layer ? like the old projector tool
    2. it works in the terrain ?

    • @rockyshark3281
      @rockyshark3281 5 років тому

      As I know, HDRP doesn't support default Terrain component. And still it doesn't have its own.

  • @waqariqbal2358
    @waqariqbal2358 4 роки тому

    Is HDRenderPipeline suitable for games targeting the mobile platform? Wouldn't it be too intensive for mobile games?

  • @serj_1264
    @serj_1264 6 років тому

    Hi! Cool video! Just a qq, for decals, do you or someone recommend using a pool to instantiate em or instantiate+destroy method??

  • @BlueJeebs
    @BlueJeebs 5 років тому

    Quick question. are the HDRP decals compatible with light baking?

  • @adizbek_ergashev
    @adizbek_ergashev 6 років тому

    Thanks. Great

  • @svenfruiti494
    @svenfruiti494 3 роки тому

    What if I use the Universal Rendering Pipeline....and not the HD one...?
    I mean..is there no way to do a projector or a caustic in PBR??

  • @Real_MrDk
    @Real_MrDk 6 років тому

    I like this

  • @isaacnewton8983
    @isaacnewton8983 6 років тому +1

    How performant is the decal system? I'm working an a relatively large protect and i am wondering how hundreds of decals is going to affect the Fps of my game.

  • @_chappie_
    @_chappie_ 6 років тому

    Thanks

  • @brandonnorsworthy
    @brandonnorsworthy 6 років тому

    thank you for the free 2 months

  • @masayaps1349
    @masayaps1349 6 років тому

    Do you have any tutorials on how to make a currency and shop system one where you collect coins in game then at the main menu you have a button that takes you the shop scene then you have all your items that you can buy then you can equip them and un-equip them say like stuff that changes colours of your player or things that change the background just you know stuff like that.... but if you don’t any chance you could make one

  • @waterfan3399
    @waterfan3399 4 роки тому

    i gave u a like as usual but this time, by seeing your cute smile at intro

  • @safallyaguhathakurta5714
    @safallyaguhathakurta5714 6 років тому

    Hi, can you please make a video on how to control game time, like suppose 24 hours in the real world will be equivalent to 1 hour in the game world, also how to access different time to do a different task or set something. thank you.

  • @borishanudel
    @borishanudel 6 років тому

    Cool - it is really simple in HD Render Pipeline :)

  • @onezerodev1756
    @onezerodev1756 6 років тому

    This is awsome

  • @randomman1000tweeny1
    @randomman1000tweeny1 6 років тому +32

    Seems like making a Splatoon clone wouldn't be too hard now

    • @stuwustudio
      @stuwustudio 6 років тому +7

      Starxel, Decals are slow, even if it would be easy, it would be far from optimal. Splatoon use instead texture that can be edited in runtimes with a special shader that prevents the texture from being pixelated. To do this in unity you would need to use the texture.setpixles function. Decal should only be used for bullet holes and sprays

    • @stuwustudio
      @stuwustudio 6 років тому +1

      Edit: Decals are not that slow but still

    • @JanHavel
      @JanHavel 6 років тому

      @@stuwustudio about bullet holes and decals im more concerned in case of networked games by network identities than decals it self ... you seems to have lot of knowledge on this topic - do you have also some experience about spawning bullet holes as network entities and what is the best way and limit to clear them? I dont like them dissapearing like 5 seconds after hiting wall but i suppose if i will give for example 5 players machine gun and let them create this way like 15k bullet holes per second (which should be accurate-ish fire rate of this kind of weapon) each it will soon hit some limit and it will be laggy as hell :D ... i wonder how game devs solve those issues - if its only by letting them dissapear quickly or something else also ... i suppose it could be possible to merge them somehow to smaller number of projectors dynamicaly but it seems complicated

    • @GlitchClaw
      @GlitchClaw 6 років тому +7

      @@JanHavel I don't think bullet holes should be server sided, clients can just handle it when they get gun shot from the server. Same goes for effects.

    • @JanHavel
      @JanHavel 6 років тому

      @@GlitchClaw Hmm you are probably right, i did not thought about it this way, its probably enough to send them to clients and just forgot about them cause they are static anyway and not that important i suppose ... tho its lil shame somebody new who logged in after fight will not see the bullet holes all around him but its probably fine most of the time

  • @tranceemerson8325
    @tranceemerson8325 6 років тому

    I like your videos, I would like to see how to use FFT (fast Fourier transform) to generate terrain, or water surfaces.

  • @LostStylus
    @LostStylus 5 років тому +1

    What if I want decals without HDRP to target mobile platforms?

  • @alejandrozamora3468
    @alejandrozamora3468 6 років тому

    I got that game designer adrenaline rush when I saw this.

  • @davidefurfaro9963
    @davidefurfaro9963 6 років тому

    How about making the hole a child of the object they hit? 'cause trying that with a rigidbody affected object would just be screwed up. For example if i wanted to shoot a barrel and i wanted to keep that barrel with a rigidbody to make it moveable for game mechanics, how would i keep it there since the projector would just stay here and the hole would just disappear? I hope the question was clear

    • @davidefurfaro9963
      @davidefurfaro9963 6 років тому

      ok nothing i already solved it, in the if statement in the "Fire" void i added a GameObject that would be the instantiated decal, set that game object to be = to the instantiate and set the instantiated decal parent to the collider it hit, if it isn't clear see down here:
      void Fire()
      {
      Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
      RaycastHit hitInfo;
      if (Physics.Raycast(ray, out hitInfo, 100f))
      {
      GameObject instantiatedDecal;
      instantiatedDecal = Instantiate(decalPrefab, hitInfo.point, Quaternion.FromToRotation(Vector3.up, hitInfo.normal));
      instantiatedDecal.transform.SetParent(hitInfo.collider.transform);
      }
      }

  • @solomonsekyim4530
    @solomonsekyim4530 6 років тому

    Thanks Brackeys I really wanted a tutorial on that but I kinda missed the keyword '"Decal"

  • @notBradYourself
    @notBradYourself 2 роки тому +1

    Anyone have info on how performant these are? I imagine its probably best to use some sort of object array + timeout to make sure these dont stack too heavily? What about ones that are part of the environment?

  • @juanegray123
    @juanegray123 5 років тому

    Hi, I am using these decals for bullet holes, but I can't edit the materials or access any variables to change the instance at runtime. Any ideas how to have them scale or fade out. thanks.

  • @cfactorygames
    @cfactorygames 5 років тому

    Have any way to animate a decal? Using a grid sheet texture or multiples images

  • @babybam4363
    @babybam4363 5 років тому

    you have more subs than the official unity channel

  • @WinDArtArh
    @WinDArtArh 6 років тому

    Hey. What about choose layer for decals? If i want use decal for only one object but this located with others.

  • @CentboyMidnight
    @CentboyMidnight 6 років тому

    pls make a video about how to create ctristal walls that get break when you shot them

  • @ThePanSashko
    @ThePanSashko 5 років тому +2

    OK! Great! And now, tell to us how we can make decals in LWRP?

    • @ThePanSashko
      @ThePanSashko 5 років тому

      @@dotcom4389 dacals it's very hard feature for gpu?

    • @tonywoods1226
      @tonywoods1226 5 років тому

      LWRP is usually used for Android and iOS development and you don't wanna use decals in your scene as it will eat up alot of gpu Vram and on phones even the smallest of things can have huge effect on the performance.

  • @VS-rv5xh
    @VS-rv5xh 5 років тому

    Is there a low spec alternative? HDRP is level 11 DX and my card only supports level 10.
    Right now i just instantiate textures at the point of rayhit.
    Works fine ..but not for bigger textures like bloodsplats

  • @nabeeltahir6013
    @nabeeltahir6013 6 років тому

    I changed the C# public variable in inspector window after changed the variable cube not moved.

  • @nikitagorokhov6636
    @nikitagorokhov6636 6 років тому

    Hi. Thanks a lot for your videos. I have two propositions for new videos. 1. Drag and release shot like in mini golf games (with direction arrow depends on power) with description about different types of Camera methods. I mean SreenPointToWorld and other. And of course for 3D :) No normal video in UA-cam about this. 2. Creating an shader (Shader graph) or other usable method (masking or something else) for round timer or health bar. NOT in UI system with “image fill” property. Regular sprite with option to put it everywhere in 3D scene not on canvas. I didn’t find video about it. Thanks a lot.

  •  6 років тому +2

    how to configure hd pipeline to my project?

  • @syverlauritz
    @syverlauritz 5 років тому +2

    I come from the future to tell you that a year later HDRP will still not be ready.