CHARACTER TRAIL TUTORIAL in Unity

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 84

  • @GabrielAguiarProd
    @GabrielAguiarProd  2 роки тому +5

    Now you can add some cool speed boost effects to your character!
    BTW make sure to use a pooling technique instead of instantiating and destroying all those objects! 😉
    Check out my course: www.udemy.com/course/unity-visual-effect-graph-beginner-to-intermediate/?couponCode=17.99_UNTIL_20-09

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

      I love your work!

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

      Do you know how to face particles to the camera but only in the y axis? Orient: Face camera place is rotating them by x and y.

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

    Thank you for the awesome tutorial, I was racking my head about how I wanted to approach this so I decided to check out some tutorials, this was one of my favorite implementations and I had a great time adding it to my project!
    For those who have complaints about it being not great for performance (which I guess I agree but I'm just happy for this great resource).
    I used object pooling to manage creation and instead of destroying meshes I would just set them inactive again, the only thing that ever gets re done is baking the mesh but that was nowhere near as much of an issue from what I've found,
    I would recommend an offset as since the meshes appear instantly you get less of the dragging effect from the video. Also, I have separate functions to handle spawning and de-spawning.
    Add your de-spawn after the while loop otherwise the meshes won't clean up a final time. You can leave that though I found it to be a cool feature instead of a bug that allowed for interesting gameplay opportunities.
    You can even use what is learned in this video for the Assassins Creed like silhouette detection that is always so smooth. and in that case creating and destroying is probably less of an issue considering how often you would get detected.
    Anyways rant over, hope I was able to help someone.
    Thanks again for the awesome Video you are a gem in this community.!

  • @018FLP
    @018FLP 2 роки тому +12

    Perfect, now i can implement Sandevistan in my game, hehehehe

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

    Very helpful tutorial I implemented it for a dash ability in my game! Thank you very much!

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

    I realy apreciate that you share that kind of knowledge, im not a VFX particule expert, but since tool like blender and unity can make that kind of procedural effect, im going back to draw some kind of handmade sprite sheet effect combine with shader & billboard and volume texture, FX make visual cool but are really time consuming, especialy if you want to look good your game or CGI short.

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

    I learned how to make an afterimage different from the method using the trace gimmick introduced in my video, and I learned one more thing.
    Thank you!
    From Google Translate

  • @kalpolproductions8558
    @kalpolproductions8558 Рік тому +2

    You are my favourite person
    Just what i needed i searched like hell, man you are legend

  • @VRWarLab
    @VRWarLab 2 роки тому +2

    Looks awesome for fast paced movement

  • @igormoreiravilhena2917
    @igormoreiravilhena2917 Рік тому +2

    Obrigado Gabriel, você é o cara! Conteúdo de muita qualidade. Estou me aventurando em criar um protótipo de um jogo que na minha opinião daria muito certo e tem principios do moba, como câmera controles etc e esses vídeos tem acendido uma chama no meu coração 😁

  • @serj_1264
    @serj_1264 2 роки тому +6

    I gotta say this is one of your best tutorials, not the most impressive effect, I mean, it's your channel, but tutorial and video quality is really high. Very "Brackeysist". I saw your channel has grown in these months, and Im happy for you, and also I'm glad the videogame project is ongoing. Gotta catch up with you!
    By the way, I've finished studying and, oh boy, as soon as this hot gets away, Unity is coming back. I got a new project in mind.

    • @GabrielAguiarProd
      @GabrielAguiarProd  2 роки тому +2

      Yeah we have that hot in Portugal too, got 43 yesterday on Coimbra!! Anyway, glad to know you have finished your studies and you are gonna get back to Unity! Hope you enjoy once again game dev! Thanks for the super nice feedback, we have been trying the best we can and slowly showing bits of the game here and there. It's going on well! Cheer serj stay well!

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

    I was looking for this for last few days... And we get this.... Thanks 👍🏻

  • @tt128556
    @tt128556 2 роки тому +2

    Just what I've been looking for, great job!

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

    I wish I could understand shaders better... at least we have Gabriel :D

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

    This is awesome. I was just thinking how should I go about doing something like this and then your video came

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

      Hope it's useful! Btw don't forget to use an object pooling system instead of instantiating and destroying all the objects! Good luck!

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

      @@GabrielAguiarProd sure will. Already have an object pooling system setup in my project

  • @VinciWare
    @VinciWare 4 місяці тому +1

    solid tutorial! You've got a new sub out of me!

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

    i swear i love u! I just started today a new project and needed exactly something this

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

    Nice tutorial. BTW I like your haircut, looks niceeee...

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

    This effect reminds me about neon power from infamous: second son

  • @王小狐
    @王小狐 2 роки тому +1

    nice work. Man

  • @andyhellgrim
    @andyhellgrim Рік тому +4

    How to fix the memory issue:
    Destroy(gObj, meshDestroyDelay);
    Destroy(mesh, meshDestroyDelay);
    Thanks for the video btw !

  • @TheUncutAngel
    @TheUncutAngel Рік тому +1

    GOAT

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

    Awesome video

  • @blueshift.9233
    @blueshift.9233 2 роки тому +3

    Hello! This is amazing effect. but I have a problem with GetComponentsInChildren taking only one child. Please tell me how to fix it..
    thanks for the tutorial!

  • @Salmontres
    @Salmontres Рік тому +2

    Thank you for putting this together! I was looking for something similar and stumbled on this vid. The only thing that stood out was instantiating a new mesh renderer whenever the coroutine is running. Is it possible to cache that renderer? Not sure how it works once it gets baked. I'll try it on my end and see how it works, thanks again!

    • @GabrielAguiarProd
      @GabrielAguiarProd  Рік тому

      In this case I would recommend a pooling system, instead of instantiating and destroying like I'm doing on the video.

  • @TuberTugger
    @TuberTugger 11 місяців тому

    Would be a good idea to turn off shadowmode for the newly created objects. Your not using them in your scene but it's default so anyone following this tutorial will have a bunch of shadows when they follow.

  • @xenogamingllc
    @xenogamingllc Рік тому +1

    Hi! Really good tuto thx. But it work with multiple mesh? Because in my case the mesh is deformed or stretched.

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

    this is great

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

    Does this work with MeshRenderer (not skinned)? When I add SkinnedMeshRenderer to my gameobject and it's children,everything works fine until I build game, then I can not see my robot character (with no bones). What do I need to do in C# script to "bake" or assigna normal meshrenderer to mesh variable of type Mesh (at 7:36)?

    • @nukem_
      @nukem_ 2 місяці тому

      Sorry for digging this up but did you figure anything out? I want to add this ghosttrail effect to my Player who has no limbs (it's just a chess pawn) and stumble into issues with MeshRenderer vs SkinnedMeshRenderer too. I get error messages when even trying to put a SkinnedMeshRenderer on it.

    • @aleksapajic
      @aleksapajic 2 місяці тому

      @@nukem_ I aborted adding this effect to my game. I didn't find any solution, sorry.

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

    hello this is a very cool tutorial especially good for a dash effect! and i wanted to ask if u can make a reflective water shader tutorial in urp 3d?

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

    Hi, thanks for making these awesome VFX shader tutorials. I'm trying to learn to make shaders with anisotropic highlights in unity, like that on hair or brushed metal. But I can't find any tutorial or documentation on it. Is it possible for you to make a tutorial on that? Thanks.

  • @WolfDev-gw1yl
    @WolfDev-gw1yl Рік тому +1

    Awesome tutorial I love it but this is going to be very heavy on performance with all the game objects spawned in such a rate.

    • @GabrielAguiarProd
      @GabrielAguiarProd  Рік тому +1

      True! I recommend using a object pooling system instead of instantiating and destroying continuously.

  • @3DMVR
    @3DMVR 9 місяців тому

    it actually looked cooler at 10:36 with the delay

    • @3DMVR
      @3DMVR 9 місяців тому

      delay could be where enemy thinks you are when using stealth in game like dishonored, the trail is while you are visible/invisible maybe

  • @theroddimus
    @theroddimus Рік тому

    This is a great tutorial, I do have a question, are you able to do the same effect with a character who has multiple Meshes to generate the same effect? Like with their hair and armor they might be wearing as well?

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

    Hey great tutorial Gabriel you are awesome!. I have noticed that when you declare a property in shader graph automatically sets the variable “_VariableName”. How do you do that? It is extremely useful. Could you provide me some information about it pls?

    • @GabrielAguiarProd
      @GabrielAguiarProd  2 роки тому +2

      Thanks! That's done automatically in the most recent versions of Unity 2021+. Quite useful indeed!

  • @zivv1147
    @zivv1147 9 місяців тому

    Great tutorial, but I wonder how performant is it to constantly create and destroy skinned meshes? Is it optimized for mobile games, and is there not a more performant method to perform this trail?

    • @GabrielAguiarProd
      @GabrielAguiarProd  9 місяців тому +1

      Yes! I highly recommend to use a pooling system instead, and if possible trying to decrease the polycount might help a lot.

  • @wildbard4112
    @wildbard4112 Рік тому +1

    Is there a way to better optimize this?

  • @Onyhh
    @Onyhh Рік тому +1

    is working fine but for some reason the skinned mesh trails are rotated -90° while the mesh isnt maybe is the animation im using that is wrong exported? any idea awesome tut btw.

    • @whoneedslovebro
      @whoneedslovebro Рік тому

      have u solved it?

    • @Onyhh
      @Onyhh Рік тому +1

      @@whoneedslovebro yea i think i put the script in the wrong game object instead of putting the trail script in the game object that contains the skinned mesh renderer component i put it in the one that contains all meshes basically the prefab game object the one that it is in the top of the hierarchy. Then it works fine.

  • @nb064
    @nb064 7 місяців тому

    how come when the script spawns in the new gameobjects the meshes are just 2 circles and not the entire mesh of the character

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

    hello :) thank you for this video. I was wondering, is there a way to access some parameters in the gameObject we instanciate? Especially for the shadows of the mesh renderer, because they spawn and all cast shadows

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

    will this work with 2D sprite animations?
    using URP 2D?

    • @coryronald6762
      @coryronald6762 2 роки тому +2

      Check out "unity 2d ghost effect" or "dash effect"
      There's a couple of tutorials that mimic this effect in 2d
      Enjoy!

  • @gamrets4352
    @gamrets4352 Рік тому

    how create the same scene?

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

    👍

  • @杨惠淳
    @杨惠淳 2 роки тому

    Hi, the mesh of my character model is falling down instead of standing up, what should I do? I can only get the trail of my character's head😭.

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

      Probably because your character is devided into different parts. You may need to apply this effect to more than one part.

    • @rudychristmas1210
      @rudychristmas1210 Рік тому

      我也遇到这个问题了hhh 是模型的问题

  • @Webtoonfreak
    @Webtoonfreak Рік тому

    Can anyone tell me how to remove the Shodows Created by the tail Meshes

    • @GabrielAguiarProd
      @GabrielAguiarProd  Рік тому

      I believe in the shader you can specify if you want to Receive Shadows or not.

    • @Webtoonfreak
      @Webtoonfreak Рік тому +1

      @@GabrielAguiarProd i tried it but it didn't work. May be because I am using built in instead of URP. So I just used this one line
      mr.material = Mat;
      mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
      😅

    • @GabrielAguiarProd
      @GabrielAguiarProd  Рік тому

      Nice

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

    Salve salve 😎👊

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

    Instantiating the SkinnedMeshRenderer will completely kill performance. Perhaps the same approach as in Motion Blur effects would be more suitable here. You can organize a billboard quad in front of the camera and Blit a character into this quad with a certain time interval (do not forget to clean it).

    • @chaosthunder
      @chaosthunder 2 роки тому +2

      are you gonna make a tutorial instead of trying to flex your omega brain where it's not needed? :)

    • @Salmontres
      @Salmontres Рік тому +2

      I was thinking the same thing. It's a really cool effect, but instantiating a new renderer every time this is called looks pretty bad on performance. My plan was to implement this solution and try to optimize it a bit.

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

    This seems very non-performant. also the script is only using one child from my prefab.

  • @bernardodelcast
    @bernardodelcast 10 місяців тому

    The tutorial is useful, however you've got no pools, so you're allocating a TON of garbage, and also creating dozens of material instances, which each have their own draw call.
    It's a good starting point, but extremely inefficient.

    • @GabrielAguiarProd
      @GabrielAguiarProd  10 місяців тому

      True! That's exactly what I advise on the pinned comment on this video.

  • @MemSczyzna
    @MemSczyzna 5 місяців тому

    nice but this is incredibly suboptimal

    • @GabrielAguiarProd
      @GabrielAguiarProd  5 місяців тому +1

      Yes, a lot! I really advise to use a pooling system.

  • @ГерманПопов-х1й

    this script is too no effective, my ram filled up in 2 minutes