Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

2D Game with a second 3D Camera rendered over 2D texture fill.

Discussion in 'General Graphics' started by JohnBrindle, Jan 27, 2020.

  1. JohnBrindle

    JohnBrindle

    Joined:
    Jan 3, 2014
    Posts:
    8
    I have test project where I have a very simple level in 2D where a space ship fly's around a cave system.

    What I'm attempting to do is somehow with either Depth, Sorting, Render Pipelines, Texture Rendering or what every is the best way of having a 3D Camera overlay on the Black Areas with the blue scribbles or the filled parts of my cave system.

    See pic below...
    upload_2020-1-27_10-24-23.png

    I need the 3D camera image to be displayed as one Rect. over the complete level, so almost like the grey areas are covering the 3D camera overlay. The grey area is in fact the background colour of the camera and will have parallax effects and stars etc. So I cannot just cover over the grey area to get the 3D camera effect i'm looking for.

    I'm sure there is a simple solution somewhere, I just cannot think of the correct phrase to put in to google.

    So Summery
    Black Area below should show a complete full size Rect of a 3D camera. That when zoomed in using my 2D camera should be able to move around the cave system and still see the 3D camera effect and any Parallax background detail in the Grey areas.

    upload_2020-1-27_10-25-35.png

    Thanks John
     
  2. JohnBrindle

    JohnBrindle

    Joined:
    Jan 3, 2014
    Posts:
    8
    I've managed to get a 3D camera rendering through the Gray areas, but this was simple as the Grey areas are empty.

    Do you think it could be done using some kind of projection or am I over thinking it!?