Search Unity

Reflection Probes: only cull mask anchored object

Discussion in 'Scripting' started by AlucardJay, Sep 4, 2016.

  1. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    In my racing game, I wish for each car to have its own reflection probe.

    How can I get the reflection probe to only cull mask the object it is a child of (all associated renderers that use the probe as the anchor override).

    As the cull mask uses layers, does this mean I need a separate layer for each car?
    Am I missing something? If this is the case, lucky I'll only have 8 cars!

    The game is multiplayer. There is a chance that different players will be using the same car prefab, so assigning a layer per prefab won't work, it will cull other cars that are an instance of the same prefab.
    All I can think of is have a pool of layers; as each car is instantiated it grabs a unique layer, and assigns unique layer to all renderers and the probe cull mask.

    Is this my solution? Any helpful thoughts and advice will be much appreciated

    Edit: Just looking for some advice and pointers/tips from someone who has done this before. Anyone?
     
    Last edited: Sep 8, 2016
  2. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Edit: Not sure if my question is unclear, or my theory is the solution, or for some other reason that there has been no comments/help/advice. I also asked on UA, again with no replies. So I am going with the layer pool idea.

     
    Last edited: Sep 11, 2016