Search Unity

Question Lighting in simulation scene for simulation objects are different to normal gameobjects?

Discussion in 'Unity MARS' started by tubbz0r, Jul 1, 2020.

  1. tubbz0r

    tubbz0r

    Joined:
    May 24, 2014
    Posts:
    72
    Hey guys! I've been having issues with lighting in a basic MARS Scene where spawned game objects aren't being lit in the scene however the simulation objects (beds, tables, etc) are being lit. When I apply the sun source to point to a directional light my spawned game objects become lit but the simulation objects stop becoming lit, do you guys have any idea why this is?
     
  2. mandloipsm

    mandloipsm

    Joined:
    Jun 6, 2020
    Posts:
    2
    NOTE: I AM NEW TO UNITY AND UNITY MARS. THIS IS JUST WHAT I THINK AND MIGHT BE INCORRECT
    Simulation objects are not affected by the lightning as they are there to simulate the read world. They get light from the real sun and not the directional light you create inside Unity.
     
  3. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    In your Hierarchy, right-click and select "MARS > Data Visualizer > Light Estimation Visualizer" (that should find your default light, and add the logic to it to control intensity and direction).

    NOTE: Not all version of AR Foundation or devices support lighting. I believe you will want to be using AR Foundation 4.x on a modern iOS or Android device to get best results (but it should fall back to default gracefully on older versions).
     
    jmunozarUTech likes this.
  4. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
    Do you have a light in your main scene? The sun in the simulation environment only lights the simulation objects (furniture etc), your content will be lit by the lights in your scene.

    And as Lewey says, to get on device light estimation you need ARFoundation 4 and a visualizer.
     
    jmunozarUTech likes this.
  5. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    Btw, you may need to resync the Simulation (see resync button in menu) for Scene lighting changes to show up in the Simulation View.
     
  6. tubbz0r

    tubbz0r

    Joined:
    May 24, 2014
    Posts:
    72
    Thanks for getting back!

    "MARS > Data Visualizer > Light Estimation Visualizer" ,- Light Estimation Visualizer is missing for me :(
    I'm using AR Foundation 4.1.0

    I have a directional light in my scene.

    I have tried resyncing the simulation but still no luck :(
     
  7. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
    Odd... You can also add a "MARS Light Estimation Visualizer" component to your light (which is the same thing as the menu does).