Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Stuck again with design issue - help appreciated :-)

Discussion in 'Editor & General Support' started by Jason210, Mar 29, 2013.

  1. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    128
    I'm designing a large simulation program that takes place in a huge environment. The last osbtacle to my thinking during the design phase is knowing how to approach the problem of managing what gets rendered and what doesn't. Specifically these two problems:

    1. Objects that are far away in in the environment don't need to be rendered, so what is the normal way of dealing with that?
    2. The vehicle in this simulation is large. It's comprises many corridors and rooms (over 2000) filled with objects, and I fear they cannot all processed at once, so I need to know what technique to use in order to show only what is needed.
    My first thought with the problem (2) was to use levels, but not sure if that's a good way of doing it, since the vehicle would have to be made up of four or five levels, yet all the levels would have to communicate with each other and also be "moved" by the kind of parent level through the environment.

    I'm now thinking of using raycast to detect which objects are near the camera.

    Cheers
    Jason
     
    Last edited: Mar 29, 2013
  2. kiranmaya

    kiranmaya

    Joined:
    May 27, 2010
    Posts:
    218
    Unity3d pro had LOD feature .
    https://www.youtube.com/results?search_query=unity3d+lod

    and camera farclip planes values adjustment will help lot in draw call reductions .




     
  3. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    128
    Thanks!

    I think LOD will solve the problem of the environment, but internally in the vehicle the rooms need to be controlled based on the position of the camera, rather than the distance from the obejct. For example, it's no use calculating the room below if it can't be seen, and yet the distance between the room above and the room below is less than a meter.

    A raycast can detect if there is something under your feet or not, but it only returns a Boolean. If there were something similar that could return the name of the object you were "walking" on, then this could used to abitrarily determine which adjacent rooms should also be rendered. A simple array could store that information and could be tweaked easily.