How retroplasma/earth-reverse-engineering works
This repository reverse-engineers Google Earth’s 3D satellite resources through two product workflows: a C++ flycam client that retrieves octree metadata and node assets for viewing, and a JavaScript exporter that retrieves and decodes resources for model export or coordinate-to-octant lookup. The README documents the resource hierarchy and mesh/texture formats; source excerpts show portions of the client and exporter wiring, but not every internal call or rendering step.
Main entry points: rocktree_util.h Resource requests · main.cpp Flycam runtime · utils.js Resource access · rocktree_http.h HTTP transport
Components 24
Flycam client
- Flycam runtime
client/main.cpp - Resource requests
client/rocktree_util.h - HTTP transport
client/rocktree_http.h - Socket HTTP
client/http.h - Asset decoder
client/rocktree_decoder.h - Resource types
client/rocktree_types.h - Octree math
client/rocktree_math.h - Mesh processing
client/rocktree_ex.h - Texture loading
client/stb_image.h - CRN decompression
client/crn/crn_decomp.h - CRN declarations
client/crn/crnlib.h - OpenGL rendering
client/rocktree_gl.h - OpenGL loader
client/gl2/src/glad.c - Request threads
client/threads.h
Model exporter
- Exporter command
exporter/dump_obj.js - Resource access
exporter/lib/utils.js - URL retrieval
exporter/lib/get-url.js - Payload decoding
exporter/lib/decode-resource.js - Texture decoding
exporter/lib/decode-texture.js - Coordinate lookup
exporter/lat_long_to_octant.js - Octant conversion
exporter/lib/convert-lat-long-to-octant.js
Resource formats
- Rocktree schema
proto/rocktree.proto
Other components
- User
- Google Earth
Connections 24
- User → Flycam runtime: uses
README.md - Flycam runtime → Resource requests: requests assets
client/main.cpp - Resource requests → HTTP transport: fetches resources
client/rocktree_util.h - HTTP transport → Socket HTTP: uses transport
client/rocktree_http.h - HTTP transport → Google Earth: requests URLs
README.md - Resource requests → Asset decoder: decodes payloads
client/rocktree_util.h - Resource requests → Resource types: populates assets
client/rocktree_util.h - Flycam runtime → Octree math: uses octree logic
- Flycam runtime → OpenGL rendering: renders scene
- Flycam runtime → OpenGL loader: initializes graphics
client/main.cpp - Mesh processing → CRN decompression: decompresses textures
client/rocktree_ex.h - Mesh processing → Texture loading: loads images
client/rocktree_ex.h - CRN decompression → CRN declarations: uses declarations
client/crn/crn_decomp.h - Resource requests → Request threads: dispatches work
client/rocktree_util.h - User → Exporter command: runs export
README.md - Exporter command → Resource access: retrieves resources
exporter/dump_obj.js - Exporter command → Texture decoding: decodes textures
exporter/dump_obj.js - Resource access → URL retrieval: downloads payloads
exporter/lib/utils.js - Resource access → Payload decoding: decodes responses
exporter/lib/utils.js - Resource access → Google Earth: requests URLs
README.md - User → Coordinate lookup: requests location
README.md - Coordinate lookup → Octant conversion: converts coordinates
exporter/lat_long_to_octant.js - Octant conversion → Resource access: queries octree
exporter/lib/convert-lat-long-to-octant.js - Resource requests → Rocktree schema: parses schema assets
client/rocktree_util.h