Welcome back NavyFish,
glad to read you again ! Hope you do well! Yeah a lot of new exciting things to try, Unity3D evolves a lot currently, procedural instancing and the asynchronous GPUCPU data transfer seem exactly what we've been missing.
I've underestimated how much (or less) time I'd have left for continuing working on all the procedural terrain stuff, so things progress pretty slow. Still haven't found the time to continue on documentations and descriptions, but tried to continue on the custom sandbox implementation.
Great fun, and again learning a lot while trying to do reimplement the typical Unity stuff on my own (especially the Matrix4x4d and Quaterniond classes were tough) with the important classes in being in double precision. But there was some progress, I finished the first bunch of classes I wanted and currently setup the underlying engine loop (that updates the timer or queries all objects for physics update). The design is very similar to Unity, e.g. so that you can add components to gameobjects that change their behavior, e.g. a ridigbody for physics.
Currently I did a rough (bugfixing not done) implementation of:
MainLoop (the central engine loop, I don't know if this is good practice )
SystemTime and Time (custom Timer for Time.deltaTime, used e.g. for physics within the engine).
SceneManager and Scene (SceneManager manages all scenes and scene the objects within a scene).
Bounds (double precision)
Mathd (double precision)
Matrix2x2d (double precision)
Matrix3x3d (double precision)
Matrix4x4d (double precision)
Meshd (double precision - probably overkill to keep mesh's vertices in doubles? )
Quaterniond (double precision)
Rigidbody (with global gravity and just a few functions only yet, to be extended)
Transform (double precision - most important as it manages position, scale and rotation!!)
Vector2d (double precision)
Vector3d (double precision)
Vector4d (double precision)
Today I did my very first debug test. And the magic happens, with 1000 objects with a ridigbody components applied to each one. Seems to be fast, the FPS loss happens mostly in Unity due to the 1000 UnityEngine.GameObjects instances and their separate Update() Component-Scripts. But as that is only for debugging I dont care. And I think there is room for optimization.
Pretty happy, as the positions, scales and rotations are all handled in double precision, and the first part of the physics (single gravity effect) seems to work.
Nextup is a bugfixing and testing phase of the components, and then extending the Rigidbody class. I am thinking of adding a "LocalGravity" variable (Vector3d) to Ridigbody too, so that all objects are not only affected by a single global gravity value directing into the same direction (like in Unity3D), but to allow that all objects do influence each other with their gravity (maybe a bit parameterised, so that you can control which objects affect others or are influenced by LocalGravity).
Afterwards I might start with an easy collider component.
Sorry for no terrain stuff and just a few grey spheres and cubes
I've added a LocalGravity for each rigidbody (which can be combined with GlobalGravity), which is per object a result of all surrounding objects that have a gravity influence.
The LocalGravity can be configured per ridigbody in terms of
1) "emitLocalGravity" - Does the ridigbody have a gravity-effect to the other ridigbody's LocalGravity.
2) "receiveLocalGravity" - Is the ridigbody's LocalGravity affected by the surrounding ridigbodies.
idea is that for very small objects (e.g. a person) I do not have to check if it influences other ridigbodies, however it could still be that it is pulled by larger rigidbodys (a planet).
The calculation is not parallelized yet, so ~250 physical rigidbodies each one emitting and receiving localgravity is an upper limit in terms of performance right now. Its still performed in the Render thread. When I've done Collision detection I am going to have to think about how to structure the engine into several separate threads.
Wow very nice!!! Very very quick, impressive. Have you extended the implementation for the terrain heights? Would really like to see an update too!