Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Unity Proxy Grid - square/hex grids of items on planes

Discussion in 'Unity MARS' started by leweyg_unity, Jun 9, 2020.

  1. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    Here is a useful utility if you'd like to create your MARS worlds out of square or hex grids (originally for a "Game of Go" played over your AR world). It includes some utilities+configurations+events for not only laying out the grid but also keeping track of edges (connections) between the vertices (points) on the grid as they grow and change. An example scene and readme is included.

    ProxyGridExample.png

    We have some amazing plans for really polishing up this feature later on, hope this tides you over until then, and feel free to customize to your liking!
    -Lewey G.
     

    Attached Files:

  2. wickedwaring

    wickedwaring

    Joined:
    Feb 5, 2014
    Posts:
    15
    Hi Lewey G,

    Thanks for this, looks great, have had a run on device (iPhone XR), being relatively new to room scanning like this, could you advise:

    a) Is there anyway of increasing the speed in which it scans / generates the grid?
    EDIT: Turned off debug executable in the build scheme helped some.

    b) How would I change the granularity of the grid (more vertices, smaller squares etc), I have tried making the values in GridConfig.cs smaller but it does not seem to change anything.

    Would this also allow the grid to sit on smaller surfaces?

    Thank you
     
  3. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    IUsesMarsSceneEvaluation
    Hey @wickedwaring , some quick answers:

    a) To increase the speed of scanning, by default there is a 2.0s wait between MARS "solves", you can change this in "Assets/MARS/Settings/Resources/EvaluationSchedulerModule.asset" and set "Evaluation Interval" so something like 0.2 or 0.3s. This can also be done via API by adding the "IUsesMarsSceneEvaluation" interface and calling "
    this.SetEvaluationInterval(0.3f);"

    b) To adjust the grid side, the script is just the default, find your "ProxyGrid" object, expand "Config" and adjust the "Distance Between Same Plane" (most important) and also lower the "Radius of Vertex".

    Hope that helps!
    -Lewey G.
     
    wickedwaring likes this.
unityunity