Search Unity

Setting up multiple Cameras culling

Discussion in 'AR/VR (XR) Discussion' started by technorocker, Jun 15, 2019.

  1. technorocker

    technorocker

    Joined:
    Jun 7, 2018
    Posts:
    10
    Hello Everyone, I can normally find what I'm looking for with googling but for my particular project I'm working on I have multiple cameras pointing in each direction above the players head for scenery views that will be on 4 different displays. I have one more camera acting as the POV for the actual player. I have set the clipping planes to offset each other. So the scenery cameras near clipping plane is at 5 and far is 1000 for obviously the scenery. The POV came has a clipping plane set from 0.07 to 5.

    Now when I was setting it up on a plane just out the open area and added a few objects around the ground plane it works great. now I made an indoor environment for the player to walk around in and because the scenery cameras are set to a clipping plane of 5 the displays are showing other side of walls and lowers floors and such as seen in this pic.

    Camera clipping.PNG

    I guess I'm looking for a way for the scenery cameras to either cull differently in tight spaces or maybe not show if through walls, or something along that line. Any suggestions or tips would be much appreciated. I have seen tutorials for setting up open world cameras that show FP cam combined with a background camera for outdoor areas but I cant seem to figure out how they make indoor scenes work properly. Unless the near clipping plane is set high enough that any indoors settings wouldn't matter to the background camera rendering.


    EDIT---------------------------

    So I came across this cross section shader in the asset store...
    https://assetstore.unity.com/packages/vfx/shaders/cross-section-66300

    I no nothing of coding shaders, I'm still fairly new at coding give or take a year or hobby learning. A few questions arise from this asset. After a bit of research I see that there is a discard function which just does that. but is there a way to use the what would be discarded pixels and place them elsewhere? like say another camera feed? I am starting to look into making a shader, if its possible that will slice what my POV camera sees and remove it from the scenery cameras. Any shader experts want to chime in on possibilities, or does this just discard the unused information
     
    Last edited: Jun 17, 2019