Stefan was able to get a proof-of-concept cloud layer working for the Earth! Wack
To implement this in OrbitX, here are a few things off the top of my head that will help, some of which Stefan has probably already figured out:
graphics.planet defines a planet like Earth, but every frame graphics.threedeeobj._update_obj is the generic function that updates the position and rotation of the Earth. The Earth's angular direction is set with threedeeobj.py:153:
So rotational movement happens when entities['Earth'].heading changes, which is done by the physics engine and depends on entities['Earth'].spin and the time acceleration. Also note that entities['Earth'].heading is clamped to [0, 2pi)
So option 1: if we want the movement of the clouds of Earth to be exactly 1.06x the rotation of the Earth, we're going to have to figure something out. Maybe we could like apply a transformation that maps the heading of Earth to another period that is 1/1.06 the length of the Earth's rotation? idk
Or option 2: we just always have clouds rotate around Earth at a certain speed, regardless of the Earth's spin or how fast the simulation is going. This is easier and probably makes more sense, but implement either tbh
Final thing: entities['Earth'].atmosphere_scaling is probably a useful field to use. It probably maps somehow to how tall the atmosphere is, but check out physics.calc.pressure for what exactly it means because tbh i just copied it from OrbitV
https://gyazo.com/a18e5e905e1c33043d3b9ff73c2655b0
Stefan was able to get a proof-of-concept cloud layer working for the Earth! Wack
To implement this in OrbitX, here are a few things off the top of my head that will help, some of which Stefan has probably already figured out:
graphics.planet
defines a planet like Earth, but every framegraphics.threedeeobj._update_obj
is the generic function that updates the position and rotation of the Earth. The Earth's angular direction is set withthreedeeobj.py:153
:So rotational movement happens when
entities['Earth'].heading
changes, which is done by the physics engine and depends onentities['Earth'].spin
and the time acceleration. Also note thatentities['Earth'].heading
is clamped to [0, 2pi)So option 1: if we want the movement of the clouds of Earth to be exactly 1.06x the rotation of the Earth, we're going to have to figure something out. Maybe we could like apply a transformation that maps the heading of Earth to another period that is 1/1.06 the length of the Earth's rotation? idk
Or option 2: we just always have clouds rotate around Earth at a certain speed, regardless of the Earth's spin or how fast the simulation is going. This is easier and probably makes more sense, but implement either tbh
Final thing:
entities['Earth'].atmosphere_scaling
is probably a useful field to use. It probably maps somehow to how tall the atmosphere is, but check outphysics.calc.pressure
for what exactly it means because tbh i just copied it from OrbitV