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.
- Tested on Debian 12 and Windows 11
- Install JDK 23 (needed because of the shiny new foreign function and memory API)
- Install Clojure 1.12
- Download Packr Jar file for creating Windows executable
- Install NSIS for building Windows installer
Get JoltPhysics and build it as follows.
cd Build
./cmake_linux_clang_gcc.sh Release g++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DDOUBLE_PRECISION=ON -DDEBUG_RENDERER_IN_DEBUG_AND_RELEASE=OFF -DPROFILER_IN_DEBUG_AND_RELEASE=OFF -DUSE_AVX2=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF
cd Linux_Release
make -j `nproc`
sudo make install
cd ../..
cd Build
./cmake_windows_mingw.sh Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DDOUBLE_PRECISION=ON -DDEBUG_RENDERER_IN_DEBUG_AND_RELEASE=OFF -DPROFILER_IN_DEBUG_AND_RELEASE=OFF -DINTERPROCEDURAL_OPTIMIZATION=OFF -DUSE_AVX2=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF
cmake --build MinGW_Release -j `nproc`
cmake --install MinGW_Release --prefix /usr/local
cd ..
- Build Jolt wrapper library:
make
- 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
- 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
- Download NASA JPL ephemeris data:
clj -T:build download-ephemeris
- 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
- Build atmosphere lookup tables:
clj -T:build atmosphere-lut
- Perform all build steps above:
clj -T:build all
- Enable integration tests (requiring results of above build steps):
touch .integration
- 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
- Install clj-kondo
- Run
clj-kondo --lint src/clj/sfsim
- 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:
clj -M:run
- Simulators
- Engines
- LWJGL
- Publications
- Webpages
- NVidia article on atmospheric scattering
- Cascaded Shadow Maps
- [Shadow mapping improvements] http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/)
- improved Perlin noise
- Normal vectors of ellipsoid
- Clojure performance flame graphs
- How to calculate your horizon distance
- Java native interface example
- Earth explorer data
- Wedesoft blog
- Videos
- Clojure
- cljstyle (style checking)
- clj-kondo (static code analysis)
- clj-async-profiler (flame graph profiler)
- antq (detect available updates for dependencies)
- nREPL server and REPL-y client
- rebel-readline REPL with colors :)