2D Sprites in 3D World - Unity Sprite Billboarding Tutorial

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 78

  • @PaperMouseGames
    @PaperMouseGames  2 года назад +12

    Got a follow up tutorial with directional billboarding as seen at 8:10 so make sure to check that out 🥳
    ruclips.net/video/UcYfEfJW_mk/видео.html

    • @WolfServant
      @WolfServant 5 месяцев назад

      Link?

    • @PaperMouseGames
      @PaperMouseGames  5 месяцев назад

      @@WolfServant updated comment with link!

    • @felixmarvelian6118
      @felixmarvelian6118 Месяц назад

      Is there still tutorial about character movement animation and stuff??

  • @SirPrizeMF
    @SirPrizeMF 4 месяца назад +2

    It's good for me to see that despite having next to no experience, the method I came up with on my own is the same as the one you emply. Thank for this video.

  • @Ziplock9000
    @Ziplock9000 4 месяца назад +1

    I'm glad you've done it with a shader instead of a GO rotating the object like some tutorials!

  • @hamham1926
    @hamham1926 Год назад +2

    You are amazing. The thing you do on later (8:10) is absolutely the thing i want!

  • @thewiresponge
    @thewiresponge 2 года назад +2

    really want another tutorial about this, about what you said in 8:00
    and im really liking your videos and your game too

  • @mrpro877
    @mrpro877 2 года назад +11

    8:10 I've been searching a tutorial for that for a very long time so I would more then like that you will make a video covering that!

    • @PaperMouseGames
      @PaperMouseGames  2 года назад +7

      Sounds like a few people are interested so I'll work on that!

  • @millex324
    @millex324 9 месяцев назад

    Ive been trying to find a video describing exactly this for so long. Thank you!

  • @WillToWinvlog
    @WillToWinvlog Год назад +1

    We used to call this phenomenon, "No butts about it" due to the fact that it has no back. I first read this phrase to describe these sprites in an old issue of Nintendo Power.

  • @piotrwilczynski4366
    @piotrwilczynski4366 2 года назад +18

    Yes do the animation tutorial you mentioned 😉 And by the way, nice video, you explain and show very well. Although this script would probably work better in LateUpdate, if you move the camera in Upadate method.

    • @PaperMouseGames
      @PaperMouseGames  2 года назад +5

      Very good point! When I do the animation one, I'll update the script 👍

  • @MakestroPlays
    @MakestroPlays Год назад +2

    In case anyone was wondering how to make the billboards effect only rotate slightly on the X axis instead of being locked on 0 you can use Mathf.Clamp for that. Would look like this:
    transform.rotation = Quanternion.Euler(Mathf.Clamp(Camera.main.transform.rotation.eulerAngles.x, -15f, 15f), Camera.main.transform.rotation.eulerAngles.y, 0f);
    The first number in Mathf.Clamp is the number you're checking then the next 2 are the range you're looking for. So Camera.main.transform.rotation.eulerAngles.x(which is your camera's x rotation) is the number being checked then Mathf.Clamp forces the number between -15 to 15.

  • @ThePalacios123
    @ThePalacios123 2 года назад +2

    very good work! I've been looking for this aesthetic for a long time, thank you very much!

  • @joodini9177
    @joodini9177 2 года назад +2

    Been looking everywhere for this kind of tutorial! :) thank you very much! I look forward to the other tutorial

  • @Metalvain4
    @Metalvain4 8 месяцев назад

    Excellent tut in 2024, thank you. Subbed!

  • @amirulhakim3359
    @amirulhakim3359 Год назад +3

    Would you mind sharing your configurations for the cinemachine camera as seen at 6:38

  •  Год назад

    Awesome explanation, simple solution!!!
    Thanks for sharing.

  • @bobbville
    @bobbville 2 года назад +2

    Good luck on 1k subs! 🥳🥳🥳🥳🥂

  • @Kyt2024
    @Kyt2024 2 года назад +1

    This is an excellent video, thanks for making it! Like several others have said as well, please do make the animation tutorial. I'd love to see how that works. Your Amber Roots billboarding and art look fantastic!

  • @mings2994
    @mings2994 2 года назад

    I'm a big fan of this tutorial thank you!

  • @1NewUser1
    @1NewUser1 2 года назад

    Thank you very much, I looked through a ton of clips until I found a good one in your video

  • @allpointsbroadband
    @allpointsbroadband 2 года назад +2

    That tutorial to show different animations for different angles would be cool.

    • @Kyt2024
      @Kyt2024 2 года назад

      Yes please, this!

  • @AspectsUntold
    @AspectsUntold 2 года назад

    Great video, I was looking for how to do this and your video answered it in a way I can easily follow.

  • @why2seerious701
    @why2seerious701 Год назад

    Thank you, that was useful. This video really saved my time.

  • @kamron4825
    @kamron4825 2 года назад

    You’re awesome! Thanks for making this video and making it look so easy

  • @PsychoMantis_13
    @PsychoMantis_13 6 месяцев назад

    thank you so much! i might be a year late, but i was looking how to do this exact thing!

  • @briana3186
    @briana3186 2 года назад

    Thanks! This looks great. Just what I was looking for.

  • @rafaellewis1263
    @rafaellewis1263 2 года назад

    This was awesome, thanks so much for sharing! I would indeed love to see that other tutorial you mentioned! #subbed

  • @dynamicvoltage9765
    @dynamicvoltage9765 2 месяца назад

    I'm not sure how you got this to work, but you should have to do this:
    Vector3 diff = billboard.position - CameraTransform.position;
    billboard.forward = diff - CameraTransform.forward;
    The reason is that the billboard and the camera are in 2 different positions, so their forwards, to "flatten" out, can't be the same.

  • @TankkOneFGC
    @TankkOneFGC 7 месяцев назад

    Lifesaver... thank you

  • @Lord_Piccolo
    @Lord_Piccolo 2 года назад

    Very clear and useful. Thank you so much!

  • @Simon-ik1kb
    @Simon-ik1kb 9 месяцев назад

    thanks, great tutorial

  • @deswave1
    @deswave1 2 года назад

    thank you, so helpful!

  • @KermenTheFrog
    @KermenTheFrog 2 года назад +1

    Omg i was looking for a good way to do this for so long thanks so much for creating this tutorial. still wondering the best way to implement shadows are for 2d sprites when using them with billboarding along with some 3d objects.

  • @MikeyDunksMusic
    @MikeyDunksMusic Год назад

    @8:01 YES!!! I want to learn how to do that. Can you please make a tutorial on that?

  • @mediamermaid333
    @mediamermaid333 Год назад +1

    Thank you!!

  • @ThePalacios123
    @ThePalacios123 2 года назад +2

    Hi, I'm interested in knowing how a game like "ragnarok online" is made, the characters are 2d but they have 8 angles with animated sprites

  • @vinirodrisant
    @vinirodrisant 2 года назад +1

    dude great video, could you tell me the name of this extension that auto completes?

  • @CezarWagenheimer
    @CezarWagenheimer 2 года назад

    Please also do the animation tutorial, and keep it coming! Congratulations.... =)

  • @DJVM
    @DJVM 2 года назад

    hey, why don't the sprites appear in the build?

  • @hariyantohariyanto501
    @hariyantohariyanto501 2 года назад

    it would be lovely with shadow imbedded on the billboard,,,
    thanks for the trick, make more tuts please,,,,

  • @what-err0rs
    @what-err0rs 2 месяца назад

    When you put the GFXs in the parents do you scale them down or make them transparent

  • @geoffreychauvin1474
    @geoffreychauvin1474 2 года назад

    What about just being able to composite 2D sprites in a 3D environment akin to something like a 2.5D psx era platformer? Can you lock the perspective where it's single point perspective but traveling on a horizontal path? Im a Luddite when it comes to unity

  • @archibaldc.1833
    @archibaldc.1833 2 года назад

    10:42
    How did you get it to show your own sprite?
    Because no matter what I do it just shows the white square, and Unity docs are completely unhelpful.
    It seems you changed the Sprite option from Square to Tree, but it doesn't let me choose anything beyond more basic white shapes and searching does nothing. I just does the ø whenever I try to drag and drop the custom sprite onto either the object directly or into the various options in Sprite Renderer. The only thing it lets me change is Material, but dragging and dropping yields the same non-existent results. How did you import your own sprites?

    • @PaperMouseGames
      @PaperMouseGames  2 года назад

      Hmm not 100% sure what the issue you're having might be, maybe stop by the Discord and we can discuss it there and try to troubleshoot it?

  • @东皇太一-s4g
    @东皇太一-s4g Год назад

    it helpful,like don’t starve。 ty

  • @Marcos10PT
    @Marcos10PT 9 месяцев назад

    How does this compare in performance/efficiency with rotating the mesh in a vertex shader?

  • @Nika-ss7dv
    @Nika-ss7dv Год назад +1

    Does this work in VR?

  • @Schrogs
    @Schrogs 2 года назад +1

    where do I get this 2d sprite package you talked about? Also, when you created a new project, did you do 2d or 3d core? This is the exact game style i want and I am brand new lol. God help me and my new hobby

    • @PaperMouseGames
      @PaperMouseGames  2 года назад +1

      The 2D sprite package comes straight from Unity's package manager as shown at around 0:30 so if you open the package manager, and search for it, you should find it. When I created this project I used 3D. If you are literally just starting though I'd recommend sticking to 2D stuff at first. Everyone's different of course, but I think it's easier to get started with as there are less things to adjust and keep track off in a traditional 2D game😊

    • @Schrogs
      @Schrogs 2 года назад +1

      @@PaperMouseGames thanks man. The reason I want 3d is so I can screen rotate, but I want to do 2d sprites. An example of this is the game Realm of the mad God, which looks just like the style you created here!
      I have switched to game maker 2 just to learn stuff because unity was complex. I have created a character sprite that can move in 4 directions and shoot and kill blobs. It's fun so far. I know I'm going to have to learn unity though so I'll see if I can find this sprite package and get the basics down

  • @laurentcharles7179
    @laurentcharles7179 Год назад

    Thanks for the video. And I would like to know if my game was created in 2D mode, may I convert it to 3D mode without modifying it a lot using your method?

  • @spectrecular9721
    @spectrecular9721 2 года назад +1

    Is there a way to optimize this to run purely on the GPU via shaders/ShaderGraph?
    This works fine if you only have a handful of sprites, but I'd imagine if you wanted a large screen full of them it would have some impact on the CPU

  • @kaffekrus2903
    @kaffekrus2903 Год назад

    Heyo! I just found your channel and its some awesome insight on 2D in 3D! Thank you! I was wondering, do you use this on your player as well? I want to, mechanics wise, do the same as you with 2D Sprites in a 3D world, but i cant seem to get the hang of the player controller. It rotates weirdly when i look around😅

  • @kevinle7650
    @kevinle7650 Год назад

    Would you recommend using the URP or the default pipeline for this type of aesthetic?

  • @RobbyDev-x1n
    @RobbyDev-x1n Год назад

    I tried this but the rotation looks delayed, how do I fix it?

  • @myshittycode
    @myshittycode 2 года назад

    Is there any way to make the sprite move up and down slowly?

  • @HomageGames
    @HomageGames 2 года назад

    Have you encountered issues with the 2d billboarded sprites getting clipped into the 3d geometry? I haven't found a fix for that yet as I suspect it requires the URP to sort drawing based on sprite pivot point

    • @PaperMouseGames
      @PaperMouseGames  2 года назад

      I did have this issue a long time ago... Haven't had it with this method and using URP (which is what I've been using for the last few years). Maybe it was a non-URP issue. Sadly I don't remember how I resolved it or how to recreate it 😅

  • @humanharddrive1
    @humanharddrive1 9 месяцев назад

    how to make it depth sort?

  • @geocine
    @geocine Год назад

    may you create a tutorial about this in Godot, I know your content is Unity just a longshot.

  • @trashfourlife
    @trashfourlife Год назад

    Hello! I need some help with the code and Im hoping if anyone could help me even if this video is a year old!
    So, I just typed out the code for the Spritebillboard, but it keeps telling me that
    "NullReferenceException: Object reference not set to an instance of an object"
    I've been googling as much as I can, but as a person who has NO coding experience I'm quite stuck on how to get it fixed ^^;;

    • @Toki-
      @Toki- Год назад +3

      Is there a "MainCamera" tag on the camera?

    • @trashfourlife
      @trashfourlife Год назад +1

      @@Toki- OH‼️‼️ THATS PROBABLY IT THANK YOU SO MUCH 💕💕 ILL TRY IT OUT ONCE I GO BACK TO WORK OTL

  • @idraggunz2slay49
    @idraggunz2slay49 Месяц назад

    reminds me of paper mario lol

    • @idraggunz2slay49
      @idraggunz2slay49 Месяц назад

      i made this comment before finishing the video lmfaoo

  • @henryd3bby
    @henryd3bby 2 года назад +2

    I'm the 1000th

  • @archibaldc.1833
    @archibaldc.1833 2 года назад

    Cheap Doom knock off game, here I come!

  • @se5d
    @se5d 2 года назад +1

    another one:( increase the font size when recording the video!!!!!!!!!!!!!!!!!!!!!!!!!!!