Skip to content

wedesoft/sfsim

Repository files navigation

This is a work in progress. Aim is to simulate take off, space station docking, and moon landing with a futuristic space plane. Requires OpenGL 4.5.

Object shadows on ground

Object self-shadowing

Spaceship rendering with planet, atmosphere, and clouds

Planet rendering with volumetric clouds and night time textures

Rendering of volumetric clouds

Atmospheric scattering and planet level-of-detail rendering

Planetary cloud cover with volumetric clouds with shadows using deep opacity maps

Installation

  • Tested on Debian 12 and Windows 11
  • Install Java: sudo apt-get install openjdk-17-jre
  • Install Clojure 1.11
  • Download Packr Jar file for creating Windows executable
  • Install NSIS for building Windows installer

Build

  • Build Worley noise: clj -T:build worley
  • Build Perlin noise: clj -T:build perlin
  • Build blue noise: clj -T:build bluenoise
  • Build cloud cover: clj -T:build cloud-cover
  • Build atmosphere lookup tables: clj -T:build atmosphere-lut
  • Download NASA Bluemarble data: clj -T:build download-bluemarble
  • Download NASA Blackmarble data: clj -T:build download-Blackmarble
  • Download NOAA elevation data: clj -T:build download-elevation
  • Extract elevation data: clj -T:build extract-elevation
  • Convert day map sectors into pyramid of tiles: clj -T:build map-sectors-day
  • Convert night map sectors into pyramid of tiles: clj -T:build map-sectors-night
  • Convert elevation sectors into pyramid of tiles: clj -T:build elevation-sectors
  • Convert tile pyramids into pyramid of cube maps: clj -T:build cube-maps
  • Perform all build steps above: clj -T:build all
  • Build JAR file: clj -T:build uber
  • Create Windows executable: java -jar packr-all-4.0.0.jar packr-config.json (delete out-windows folder first)
  • Create Windows installer: makensis nsis-config.nsi
  • Enable integration tests: touch .integration

Lint

Run

  • Run tests: clj -M:test
  • Run test for specific module (rendering for example): clj -M:test sfsim.t-render
  • Run the global cloud cover prototype: clj -M etc/cover.clj
  • Run main program displaying black window: clj -M -m sfsim.core

External Links