Search Unity

Mousepicking through three layered cameras

Discussion in 'Editor & General Support' started by mkolb, Feb 28, 2008.

  1. mkolb

    mkolb

    Joined:
    Dec 17, 2007
    Posts:
    48
    Hi all,

    strange issue going on right here:

    I created three cameras in order to properly render the surroundings, the main camera which renders more or less everything but the Skydome and my terrain.
    The second camera only renders my Skydome, and the third camera only renders my terrain.
    Explanation:
    I didn't want to use a Skybox because they are hard to make and are very hard to shade in order to look good. Therefore I use a layered Skydome, the most outer an unlit Skydome with a nice gradient and some alto-bla-bla clouds on it (hardly visible). Then I have a transparent unlit cloud layer with more accentuated clouds.

    I always face the problem that transparent objects don't get rendered if they are in front of the sky dome, so I had to move every object which uses transparency to the sky dome layer. Since the terrain vegetation also uses transparency, I first moved it the terrain to the Skydome layer, which resulted in a mixed render result (meaning the trees and the sky dome were alpha-blended).

    Because of that I created a new layer for the terrain , and assigned the terrain to it.

    Are there any issues(compatibility, performance) known with three layered cameras?

    On the render side everything works fine, the trees get rendered in front of the sky dome, BUT:

    Mouse picking stopped to work! I don't know to what that is related because it worked fine with two cameras.

    So, does anyone have an idea how I could resolve the issue, either by reducing the number of cameras again to two without losing the ability to render a forest in front of a transparent cloud layer or by getting the mouse picking to work again.

    Thanks in advance!
    Best regards
     
  2. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
  3. mkolb

    mkolb

    Joined:
    Dec 17, 2007
    Posts:
    48
    Thank you very much, I didn't know there were render queues available/customizable.

    But now that I know, that eases a lot of things for me.