2.5D Sprites w/ Animations URP - Unity 2022 LTS (Tutorial)

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • In this video I show how to create a 2.5D sprite-based character with animations in the Unity 2022 LTS environment with the universal render pipeline.
    #gamedev #unity #unity3d #unitytutorial #unitytutorialforbeginners

Komentáře • 51

  • @AngelCorpse666
    @AngelCorpse666 Před rokem +3

    Hey. Just letting you know, this works like a charm. I've been looking for this for awhile now. Thanks for the content!

  • @ludovicsanson8657
    @ludovicsanson8657 Před 6 měsíci +2

    Other solution (URP or HDRP) : make a quad, import every frame of your sprite image as a texture (Texture rendering mode:cutout, mesh renderer:two sided and receive shadows), and animate the texture (just pull every texture in the animation timeline). > It's cast shadows.

  • @cozygamemaker
    @cozygamemaker Před 5 měsíci

    Thanks a lot! This is the clearest and most complete tutorial for 2.5D URP setting!

  • @LightPython24
    @LightPython24 Před 10 měsíci +1

    This was perfect thank you so much! So easy and clear to follow. PLEASE make more videos like this in the future, would love to see more 😄

  • @bluzenkk
    @bluzenkk Před 5 měsíci

    thanks for the tutorial~~
    would like to see more on 2.5D stuff~~

  • @Lao_lu
    @Lao_lu Před 6 měsíci

    I'd love a followup which shows how to add the walk cycles and attack animations to this 2.5d player object

  • @Y1001
    @Y1001 Před dnem

    Perfect tutorial.

  • @TheNinja1234568
    @TheNinja1234568 Před 2 měsíci

    Great tutorial, really helped out !

  • @Flusap
    @Flusap Před 2 měsíci

    thank you comrade

  • @PeterMilko
    @PeterMilko Před 5 měsíci

    Very cool

  • @Poopymancer
    @Poopymancer Před 10 měsíci +1

    It might be because im using an older version of unity, but the options for universal render pipeline are different, i dont have URP asset (with universal renderer)
    I have:
    Pipeline asset (Forward Renderer) this looks like the closest thing
    Forward renderer
    2D renderer(experimental)
    Renderer feature
    Post process data
    XR System Data
    Im gonna go with pipeline asset and hope it works

    • @MichaelsGameLab
      @MichaelsGameLab  Před 5 měsíci

      I think that should work, it might've changed in an update.

  • @randomstuff6786
    @randomstuff6786 Před 7 měsíci

    thanks so much!! works great

  • @kirrychan
    @kirrychan Před 8 měsíci

    THANK YOU SO MUCH I LOVE YOU

  • @tldmbruno
    @tldmbruno Před rokem

    Great video btw!

  • @joseh4930
    @joseh4930 Před 9 měsíci +1

    Thanks. How can I add a Normal texture to that Material?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 9 měsíci +1

      You would need to add a texture input for the normal texture and link it up with the normal input of the material. You will also need to make sure the texture is tagged as a normal texture.

  • @mehmeh8883
    @mehmeh8883 Před 7 měsíci

    Very cool video!
    Now question is would I use a 3d colliders with this?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 7 měsíci +1

      Hello, yes I use 3D colliders for this method. More specifically, I use the capsule collider.

  • @Bear-en6dt
    @Bear-en6dt Před 24 dny

    Thank U

  • @leoromiya5338
    @leoromiya5338 Před 7 měsíci

    What I really need to know is why NOBODY addresses the weird lighting on the other side of the sprite. I have this issue and cannot for the life of me figure out how to make it look the same on both sides as it does on the front, with no weird lighting at all. I just want my sprite to be able to cast and receive shadows while looking the way it did before I applied the material on to it.

    • @MichaelsGameLab
      @MichaelsGameLab  Před 7 měsíci

      If you need to have both sides visible, then you might want to check out double sided materials or using a custom plane model that has a plane for the front and one for the back.
      I think the issue stems from the plane that the sprite is rendered on only has the one face and the lighting applies to both. So, if you rotate the sprite, then it will get darker as it's front face turns away from the light source and vice-versa.
      You can check out the following pages where other people had similar issues:
      www.reddit.com/r/Unity3D/comments/iiogt5/tree_leaves_how_to_get_proper_lighting_from_both/
      forum.unity.com/threads/double-sided-material.474594/
      forum.unity.com/threads/render-face-both-backface-light-problem.1303200/
      Hope this helps.

    • @SUWGamer
      @SUWGamer Před měsícem

      I've looked into this. One way is to write a custom shader.

  • @muhammadaqil6467
    @muhammadaqil6467 Před 2 měsíci

    does this only work for directional lights? it does not seem to work for point and spot lights

    • @MichaelsGameLab
      @MichaelsGameLab  Před 2 měsíci

      Yes, it should work with point and spot lights as well.

    • @muhammadaqil6467
      @muhammadaqil6467 Před 2 měsíci

      @@MichaelsGameLab i seem to be having issues with getting it to work with spot and point lights, do you mind helping me out privately or are there any settings i should be looking at to get this to work?

  • @tldmbruno
    @tldmbruno Před rokem +1

    Does this method renders sprites at the correct depth? Or does the sprite still clip into each other when near?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 9 měsíci

      Should render at the correct depth if you use a different material for the sprite renderer, like shown in the video.

  • @Quick-Bull01
    @Quick-Bull01 Před 3 měsíci

    I found that the lighting on the sprite makes the sprite too bright. How should I fix it?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 3 měsíci +1

      Is it too bright from the material or from the light source?

    • @Quick-Bull01
      @Quick-Bull01 Před 3 měsíci

      ​@@MichaelsGameLab I guess it's from the material? It's like the sprite reflects some light on the surface. You can also see it in your video, the sprite becomes lighter after applying this material. If I don't want any reflection, how should I switch it off? Thank you!

    • @MichaelsGameLab
      @MichaelsGameLab  Před 3 měsíci +1

      You probably need to change some material properties. I think materials will have .5 smoothness by default, so maybe try setting that to 0.

    • @Quick-Bull01
      @Quick-Bull01 Před 3 měsíci

      ​@@MichaelsGameLab I found the solution: I changed the material type in Alpha from "Lit" to "Unlit", then the sprite reflect no light. Thank you friend!

  • @mehmedcavas3069
    @mehmedcavas3069 Před 9 měsíci

    But how do you handle render order or other spriterenderers inside the player. I have a spriterenderer player which will carry weapons but have problems with rendering order

    • @MichaelsGameLab
      @MichaelsGameLab  Před 9 měsíci

      In the video I make a new URP material and assign it to the sprite renderer. This should handle the render order issue because it is no longer using the 2d sprite material.

  • @user-wd1mh9eh9q
    @user-wd1mh9eh9q Před rokem

    I still can't manage to get the shadow, it might be because I could change my sprite texture type since the setting doesn't show up. Any way i can fix that?

  • @Mmk-dn1fi
    @Mmk-dn1fi Před 9 měsíci

    Why doesn’t he just choose URP when creating the unity project, instead of adding URP later from the package manager? Is there a benefit to doing it that way?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 9 měsíci

      There is no real reason to do it one way or the other. Does the same thing.

  • @tldmbruno
    @tldmbruno Před rokem

    I've noticed you used a 2x scaled 16x16 sprite. Is there a reason for this? Does Unity work poorly with sprites that are smaller than 32x32?

    • @MichaelsGameLab
      @MichaelsGameLab  Před rokem

      I do it so I can see the images better when using the search in unity. Other than that I don't think there is any other reason.

  • @tianqigao869
    @tianqigao869 Před rokem

    cool!

  • @Kopellis
    @Kopellis Před 6 měsíci

    mine doesnt make a shadow but just has the sprite deformed on the back

    • @MichaelsGameLab
      @MichaelsGameLab  Před 6 měsíci

      Did you turn on the shadow casting from the debug menu and set the material as shown in the video?

    • @Kopellis
      @Kopellis Před 6 měsíci

      Ok on the directional light i had cast shadows off

  • @sergiobland8853
    @sergiobland8853 Před 7 měsíci

    i love you bro

  • @ahahau
    @ahahau Před měsícem

    how can i download player sprites?

  • @doublehitgames531
    @doublehitgames531 Před 3 měsíci

    where the continuation?

    • @MichaelsGameLab
      @MichaelsGameLab  Před 3 měsíci +1

      I have not made a continuation yet. I might do one soon though.