Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[RELEASED] RealSunAR - Sun and shadows matching the real world on your AR project

Discussion in 'Assets and Asset Store' started by A_Savvidis, Jun 15, 2019.

  1. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    42
    RealSunAR.jpg
    Real sun & shadows for your AR project
    that match those of the real world!



    What does RealSunAR™ do?
    It rotates a directional sun to the same locations as the real Sun and uses a shadow catcher material to creating shadows that match the shadows of the real world objects around the user!

    Is there a demo?
    Yes. You can download an android .apk file to install on your ARCore compatible android phone. Use this link to download.

    Is it hard to use?
    Just drag and drop 1 or 2 scripts on a gameobject and you are done!
    You don't have to think about it. I've also included tooltips on everything.

    How does it do that?
    Basically, it uses the phone's GPS and Compass to figure out where you are and where you are looking then it uses my own algorithm to position the sun taking account all that as well as June/December solstice and comes with a ShadowCatcher material that acts as a plain ground that shows shadows. Also, it takes into account other elements such as:
    • Weather (Through the OpenWeatherMap API)
    • The device's tilt (compass tends to get reversed when looking over 90 degrees)
    • If the phone was shaking around (compass stability)

    Will it work for me?
    Right now it has 3 working modes
    1. AR Foundation mode
    When it detects that tracking is lost it resets the light back to it's original position. When tracking is resumed, it recalculates the suns position.
    2. ARCore Optimized
    When it detects that tracking is lost it resets the light back to it's original position. When tracking is resumed, it recalculates the suns position. Initial tests show that my version is more accurate that Google's sun shadow angle.
    3. API Agnostic mode
    It activates every x seconds to makes sure that if tracking is lost it will recalculate properly.

    Where was it tested?
    It's been tested & verified in:
    • Greece
    • Germany
    • UK
    • USA

    Verified compatibility with Unity versions
    • 2019.1.8
    • 2019.1.7
    • 2019.1.5
    • 2018.4.2
    • 2018.4.0 (I submited the plugin using this version)
    • 2017.4.29 (Prefabs are broken in this version but the plugin works fine)
    • 2017.4.28 (Prefabs are broken in this version but the plugin works fine)

    Is it open source?
    Yes! You can modify and play with it. Comments are included in the code.

    Updates coming soon:
    • Any other AR tookits you might be interested in?
    • Any other weather API you might be interested in?
    • Some minor frame optimizations
    • Compass drift detection
    • Option to change the sun's color depending on the time
    • More

    Is it 100% accurate?
    Simply put, that's impossible. It all comes down to the compass accuracy. And phone's compasses do drift a bit all the time. Expect a 0 to 15 degrees error in most cases.

    Support
    If you need to ask anything/need help or have suggestions just email me or write on the support forum. Thank you.
    Android ARCore demo
    Manual (pdf)
    Developer's LinkedIn
    Developer's Unity Connect
    • Email: RealSunAR@gmail.com

    From the same Developer:
    Benchmark Scenarios

    STORE URL: https://assetstore.unity.com/packages/slug/148713
     
    Last edited: Aug 6, 2019