CarmackStarRendering
https://news.ycombinator.com/item?id=33837401
https://news.ycombinator.com/item?id=33837401
In part 1 we looked at how to take a buffer of positions and the render them on the GPU with all kinds of helpful features such as constant screen size, double precision and stencil support. But where do we get the positions to go in that buffer?
To procedurally generate content in the editor a Scripted Importer is useful.
Unity has the MeshDataArray system for procedurally generating an array of meshes in a job compatible way.
Ephemeris needs to draw a lot of lines to show orbital paths. In fact most of the important information in the game is communicated entirely with lines and UI elements!
Ephemeris needs to draw a lot of lines to show orbital paths. In fact most of the important information in the game is communicated entirely with lines and UI elements!
---
In orbital mechanics, Kepler's equation relates various geometric properties of the orbit of a body subject to a central force. This can be used to calculate the position of a body (relative to the central body) at any time, without having to iteratively integrate acceleration and velocity over time.
Ephemeris has an "infinite" grid which acts as a reference to help understand the position of things within 3D space. This reference plane should have lines as thin as possible (1 pixel) without suffering from aliasing at any angle or distance.
- All objects are on "rails" which can be sampled at points in time.
Friday 1st
Tuesday 1st
---
The Ephemeris simulation is completely double precision and uses SI units, 1unit = 1meter. However, this simulation must be displayed in the Unity scene. This is a problem - the Unity scene uses single precision coordinates for position, there is a fundamental part of the engine and there is no way to change this. As mentioned in Precision & Scale Unity recommends a maximum scene size of 50km (i.e. 50,000 units) at most. To fix this Ephemeris uses three tricks: scale, floating origin and offsetting.
Participated in the 2024 Cylon GameJam for all of September up to the 24th.