How To Make a Mirror in Unity (that works in VR!) - Part 1 : RENDER TEXTURE

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

КОМЕНТАРІ • 52

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

    I remember making a new project for the sole purpose of experimenting with reflections in order to make a mirror for fun. Couldn't think of something good enough to work but looks like you did lol. Pretty cool!

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

    Mirrors in VR are essential IMO. They help ground you in the immersive experience. I've been grabbing mine from a Unity Learn tutorial (for my projects). The tutorial said it was okay to do that, fyi. Thanks for showing me how to make it on my own!

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

    Excellent Valem video!!! Waiting for the second part!! Best regards

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

    Thanks a lot! By far the best tutorial for this, even as I'm just using this for regular 3rd person.

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

    Wow~ it was simple, but the result was a detailed mirror!!

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

    hurry up week, i need the real thing :) thank you, Valem. one of the best teachers atm

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

    Going to add this to my Unity game, where the player can play as different horror creatures, and just have vampires not show up in the mirror 😂

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

    this is pretty much where I got a while ago on my own but yeah thats as good as I could get it so cant wait for part 2

  • @1playfair
    @1playfair Рік тому

    Awesome tutorial Valem thanks as always

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

    Nice! I am waiting for this!

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

    Thanks, I needed this.

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

    Making a stereo mirror should be possible by rendering a mirror camera for each eye and connect the two render texture outputs in an unlit stereo shader

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

    I love how he finds the little tricks funny, like he's cheating or something. Very endearing. Also great tutorial thank you!

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

    I like the fact that you show us the code.

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

    Yo Valem, this is regarding the part 1 tutorial but I didn’t think you would see it because it’s your most popular video.
    I connected my oculus to my Mac book but the only thing that changed to the oculus was that I could open safari, some other guy in the comments said that if you have that problem you also need the quest app on your computer, but the quest app is really broken on computers and practically doesn’t work, ima check again if they fixed it but I was just wondering, how did you do it? Like how did you connect your oculus to the computer and have it immediately show Unity, it’s just that in the tutorial you didn’t really explain how to plug it in for it to work. Hoping you would respond…

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

    hello! thanks a lot for great tutorial. When I apply, inside the Unity it works perfectly but in Quest3 , the mirror camera somehow follows the main char. How can I fix it?

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

    Help! This is the 3rd mirror tutorial I follow and my mirror is still black when running in Quest 2. Inside Unity, the reflection is okay, but inside Quest 2, it is black. I think it is caused by some build setting, but I can't figure out what. Can anyone help me? Thanks in advance!

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

    Hey! I know it is long after this vid was posted, but I'm hoping someone who reads my comment can help me: This tutorial works well, but when I stand in some spots the mirror "reflects" the outside of the room. How would I fix this? I didn't add a culling mask and used the clipping planes method instead as the walls in my room are one object. Is that maybe why I'm having the issue?

  • @emersonbrunodeoliveiragome856

    My camera does not have the elements displayed in the inspector, how do I make this change? Was it explained in another video?

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

    What about VR performance on Quest 2? We saw that only URP 2020 LTS gives us good performance, but what's the point of using such an old version? Do you guys know anything about this? have there been any updates?

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

    Great tutorial. Seeing a new tutoral video from you increases my dopamine level. Also i use this technic to create in game phone camera but i dont know how to make it record. If i could record myself in my vr game that would be great. Does anyone know where should i start to learn how to do that?

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

    I am looking forward to the secret method! I wonder if it'll be an skinnedmeshrenderer with inverted scale, some kind of stencil method? Thanks for the part 1!

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

    Something worth noting is that the mirror is set up incorrectly, the mirror camera should NOT be behind the mirror, to get it to work correctly you need to use an empty game object in replacement of the camera, and ensure the camera isn't a child of the empty game object but has the same parent, ensure the camera is flush with the mirror face, or somewhere near and make the only translation of the camera look where it did in the original script

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

    Hey Valem, how do I assign the reference of the script in unity inspector? Once I save the code and get back to Unity I don't see the 'Player Target' and 'Mirror' slots below the Script object. Thanks!

  • @미니골방
    @미니골방 Рік тому

    Thank you Valem, have one question, is this possible to make cerved mirror?

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

    Do you perhaps know how to make the player always the same size

  • @rodrigo.cs.machado
    @rodrigo.cs.machado Рік тому

    Excellent tutorial!! how to make the mirror not see the line renderer of the character's hand?

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

    make an updated version of "Realistic guns in unity"

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

    Hey I have a question can you make a npc that you can kill pls it will be the last details in my game if you can.

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

    In there a way to do this but make it so there's objects on one side that you have to throw to the other side by using the mirrored character

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

    fantastic! congratulations Valem . I do not see to apply it. I hope I don't do anything wrong.

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

      in case I want to apply it to multiple windows, I need to have multiple render textures and materials right? and the script also needs to be modified?

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

      @@Axel0689 how does the script need to be modified, because when i added it to my mirror object, it just went wrong and it didn't function properly again

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

    Muchas gracias, Thank you very much, 非常感谢, बहुत धन्यवाद, Merci beaucoup, شكرا جزيلا, আপনাকে অনেক ধন্যবাদ, Большое спасибо, Muito obrigado/a, Terima kasih banyak, بہت شکریہ, Vielen Dank, どうもありがとうございます, Asante sana, खूप धन्यवाद, చాలా ధన్యవాదాలు, நன்றி மிகுந்தும், Çok teşekkürler, 정말 감사합니다, Cảm ơn bạn rất nhiều.racias, Grazie mille

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

    It is still 2D mirror and there is no depth, right? How can you make it 3D? 2 cameras - one for each eye?

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

      Yes unfortunately but the technique I'll talk about in the video will do this ! :D

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

    where is output i cant find it

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

    can someone send the script, I keep getting compile errors

  • @ecommerce-coding
    @ecommerce-coding Рік тому

    Danger for the mirror effect.If your mirror targets to the main character,when you moves,the mirror too.

  • @陈宇曦
    @陈宇曦 Рік тому

    Is see too big when I close to mirror

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

    Mirror

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

    The full body physics is lacking a step over tutorial.
    I wasn't able to make it use stair, I had to make everything be a ramp. Not epic.

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

      Oh yeah ! Stair hates physics, character controller deals with it better. What I can advice you is keep a stair mesh but use a ramp collider on it. Stairs are really bad for VR cause you get motion sick with the little bump :)

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

    Didn't work, it black for me

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

    awesome to see this tutorial - my latest vid had a lot of people explaining that mirrors were super labor intensive but this makes it seem like it doesnt have to be ua-cam.com/users/shortsVdAungBqOqw

  • @TylerGlenn-ud4ei
    @TylerGlenn-ud4ei Рік тому

    can someone just write the script under my comment...