Search Unity

Endoscopy

Discussion in 'AR/VR (XR) Discussion' started by ryes2010, Apr 24, 2019.

  1. ryes2010

    ryes2010

    Joined:
    Apr 24, 2019
    Posts:
    2
    Im trying to make a surgery simulator, however I dont know how to make a endoscopy simulation. What I want to make is an asset that has a new camera rig that displays the image inside the game on a screen inside the game.
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Its not entirely clear what you are asking tbh, but I think if I understood correctly, you want a rendertexture.

    You basically have an extra camera, looking at the thing you want, then have it output to the render texture. You can use that texture as a texture on any material, and voila, you have a working screen + camera rig. You can obviously add any post effects you want to the camera to give it an endoscope look and feel.

    https://docs.unity3d.com/ScriptReference/RenderTexture.html

    https://docs.unity3d.com/Manual/class-RenderTexture.html



    This actually has been asked a lot of times and there are a lot of answers all over the place, a quick google turned these up:

    https://unity3d.com/learn/tutorials/topics/graphics/render-textures-and-ui



    https://forum.unity.com/threads/solved-rendering-cameras-view-to-a-texture.359732/


    This tutorial will be easiest to follow:

    http://unity.grogansoft.com/in-game-security-camera-using-render-texture/

    Good luck
     
  3. ryes2010

    ryes2010

    Joined:
    Apr 24, 2019
    Posts:
    2
    Thanks! Thats exactly what i wanted!
     
    MadeFromPolygons likes this.
  4. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    You are most welcome :)