Search Unity

Physically based Solar system simulation

Discussion in 'Physics' started by chusmaverde, Mar 16, 2020.

  1. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    Hello Unity community,

    I think this might be the place to put this, though I am not sure. I have been working on a physics-based Solar System using Newton's formulas. I have a blog in which I have written down the lessons learnt from this experience. Anyone interested in this topic is welcome to check it out in my blog.

    The content explains
    • The math used.
    • The problems found (precision issues, orbit prediction, Speeding up the system)
    • The implementation code (and basic setup)
    • Where to find accurate planetary data.
    Cheers
     
    Last edited: Mar 21, 2020
    mishakozlov74 and Edy like this.
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Very nice! Thanks for the contribution!
     
    chusmaverde likes this.
  3. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    Hello once again,

    The pandemic has helped in doing some more testing for this physically-based gravity system I first posted. As such I am preparing 3 posts to explain the things I have done in this area:
    • Gravity Part 1: An update
    • Gravity Part 2: Orbit predictions (One-Body problem)
    • Gravity Part 3: Create a force map and display it (CPU, Compute Shader and Vertex Shader)

    The first part is already live, and the next ones will come shortly.

    Here is the link to Gravity Part 1: An update post
     
    Last edited: Jun 13, 2021
    Edy likes this.
  4. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Great! Part 3 looks very interesting, as displaying force maps using GPU could also teach how to display other fields.
     
  5. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    It is a very interesting topic, it took me awhile to learn how to use the GPU, but the wait was worth it. Documentation-wise, it is more complicated to learn shading language than C#. Once you know how to use the GPU for this it can easily be extrapolated to other tasks.
     
    Edy likes this.
  6. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    Hello again,

    As I mention a week ago, here comes the 2nd installment of this series. In this post I predict orbits for One-Body problems and visualize them.
    Part 3 will be coming shortly! In the meantime I hope this brings value to the community.
     
    JeffDUnity3D and Edy like this.
  7. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    Hello again,

    Finally I have finished uploading the last post of my gravity series: Part 3. In this post I explore creating a texture and updating pixels using CPU, compute shader and Fragment shader. There are also some GIFs and tables to compare each method.
    This is the end to this series of post... but I still have other ideas I would like to develop. Any feedback will be welcomed and most importantly I hope this is helpful to the community.
     
    Last edited: Jul 9, 2021
  8. chusmaverde

    chusmaverde

    Joined:
    Jun 10, 2013
    Posts:
    29
    @Edy I hope in this latest post you can find something interesting about using the GPU :)
     
    Edy likes this.
  9. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Cool!! It's definitely interesting. I'll look forward to move some calculations to the GPU.
     
    chusmaverde likes this.