Unity3D Fast Tips - Using RenderTexture to show a 3d object in UI

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

КОМЕНТАРІ • 52

  • @halivudestevez2
    @halivudestevez2 10 місяців тому +4

    In 2023 Beta Unity Editor you can find the Target Texture of the camera under the Output section in the Inspector, and called "Output Texture"

  • @XYZGameStudios
    @XYZGameStudios 9 місяців тому +2

    If you use URP and you need a transparent background i think this wont work and the official Unity Thread about the fix is over 5 years old without a Solution. The most easy way is to make a screenshot and remove the background. You cant chage the rotation with this solution but if you just want the model as a picture this works.

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

    Oh my gosh! This is a really great video! Whenever I would try to put 3D GameObjects as UIs, I would do so with two different Canvases, and then also playing around with the Camera settings. Then I would have to fumble with the layers and layerMasks. And THEN I would have to increase the size of the 3D GameObjects exponentially.
    This looks so much easier and seems like it would be less performance intensive.

  • @sothisishowitreallyends
    @sothisishowitreallyends Місяць тому

    Helped with an issue I was having, thank you

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

    Great tutorial, thanks a lot, I manage to place different animations in my 3D UI (a face of my character that changes according to whats happening in game)

    • @GameDevBits
      @GameDevBits  11 місяців тому +1

      Phenomenal! You're going old school like Doom with the face!

  • @SYRIASTARSCHANEL
    @SYRIASTARSCHANEL 6 місяців тому

    Thanks man , we are looking for great tutorials like that in the future , Big thanks from Syria

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

    Amazing, thanks a lot! Was able to fix a bug in my own setup using your tutorial. Never stop making great videos.

  • @nm56342
    @nm56342 8 місяців тому +1

    Life Saver! This worked perfectly

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

    I love the video! Excellent tips and amazing results. You have a new subscriber. Keep up the good work!

  • @dreamisover9813
    @dreamisover9813 Місяць тому

    Thanks, really good tutorial!

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

    Simple and direct to the point. Thank you

  • @TheSixoul
    @TheSixoul 2 роки тому +4

    Good video but work on keeping your volume consistent throughout the video. You go from alright volume to really loud and booming then to super quiet that it's hard to hear.

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

      Really appreciate the comment!
      Coming off a few weeks of being unwell and Im pretty sure now I skipped the normalisation process.
      Thanks for watching and never hesitate to call it out if I drop the ball on stuff like that.

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

      yeah that scared the shit out of me lmao

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

    Thank you so much for this tutorial. It helped me a lot

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

    Nice one! Thank you!!

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

    Great video! Saved me ton of time! :)

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

    I was trying to render a tilemap on the UGUI an it just solved my problem! Thanks for your excellent work~

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

    I’m struggling to figure out particle render queue which is making a model appear over particles

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

      If your UI/Canvas is in Overlay mode it will be drawn at the end of the frame and always over the particles.
      Unity have a github project that brings particles into UGUI and sorts this out for you: github.com/mob-sakai/ParticleEffectForUGUI

  • @ІгорЛисенко-ж9н
    @ІгорЛисенко-ж9н 4 місяці тому

    Render texture is redundant in this case.
    You may just put 3d object in ui on ui layer and upscale it to be visible.
    Render texture is more of tv/monitor ingame imitation.

    • @GameDevBits
      @GameDevBits  4 місяці тому

      Scaled up objects can work, but a canvas is not intended to display 3d objects. Large objects can have floating point issues, they can intersect and overlap through UI elements or have shadowing issues.
      There's always more than one way to skin a cat. :)
      This is absolutely an intended use for render textures, it's why they support transparency.

    • @ІгорЛисенко-ж9н
      @ІгорЛисенко-ж9н 4 місяці тому

      @@GameDevBits
      1. Agreed.
      2. More than one skin? Instantiate prefab.
      Usage of render texture increase draw calls.
      For PC it pretty much ok, but for mobile no.

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

    Thank you so much!

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

    what if i wanted to display a full inventory, with say 24 items displaying. would you create a camera for each item? or is there a way to make some sort of map?

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

      For a bunch of items like that, I'd question if they need to be 3d. You could render them in advance and create icons.
      I have a free Unity tool here to do that: timps.itch.io/timpsshot

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

    works well. any way to up the quality of the camera tho? very pixaly on the edges

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

      You can change the resolution on your render texture to increase the quality. Just keep in mind the cost. Default res is 256x256 which might only be suitable for a very small item on screen.

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

    Excellent tips Keep it up man!

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

    On my project when android build that not show

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

    absolutely amazing!

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

    Great tutorial thank you!

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

    Wow thats amazing thank u

  • @idontunderstandnihongoqwq940

    You are my lifesaver Thanks!

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

    THANK YOU!

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

    so cool!!!

  • @rekiallard77
    @rekiallard77 3 місяці тому

    Nice

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

    i saw someone doing that for the whole scene

    • @GameDevBits
      @GameDevBits  7 місяців тому +1

      Could be done for things like split screens or faking some kind of full screen post processing?

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

    thank you

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

    thankoo

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

    thanks bro nice job, I subscribed to your channel

  • @NotARealPersonBR
    @NotARealPersonBR 4 місяці тому

    thanks a bunch for this

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

    Thanks a lot!