Dev Considerations - ProkopHapala/SimpleSimulationEngine GitHub Wiki

Angular forcefileds

phi - https://en.wikipedia.org/wiki/Chebyshev_polynomials https://en.wikipedia.org/wiki/De_Moivre's_formula (Formulae for cosine and sine individually)

sin(nx) = sum_k comb(n,k) (cos(x))^(k) sin(x)^(n-k) sin((n-k)pi/2)

cos(nx) = sum_k comb(n,k) (cos(x))^(k) sin(x)^(n-k) cos((n-k)pi/2)

theta - https://en.wikipedia.org/wiki/Spherical_harmonics

https://en.wikipedia.org/wiki/Associated_Legendre_polynomials#Reparameterization_in_terms_of_angles

Besier triangles**

Subdivisions

rule is - for each edge create new vertex in the middle as linear combination of endpoints (3/8 weight) and opposite vertexes (1/8) weight can be computed also analytically (4th-order polynominal http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/loop.pdf ) https://www.ibiblio.org/e-notes/Splines/loop.html http://persson.berkeley.edu/pub/persson06subdiv.pdf

http://www.dgp.toronto.edu/~stam/reality/Research/pub.html

Gamasutra - https://www.cs.unc.edu/~dm/UNC/COMP258/subdivision.html

http://462cmu.github.io/asst2_meshedit/

fast Fluid Solvers

A Simple Fluid Solver Based on the FFT - Jos Stam (<1 page of C-code) https://github.com/erich666/jgt-code/tree/master/Volume_06/Number_2/Stam2001

SIGGRAPH Source codes https://github.com/erich666/jgt-code

Height field ray-tracing

http://computergraphics.stackexchange.com/questions/1725/whats-the-current-state-of-the-art-algorithm-for-ray-tracing-height-fields http://cvc.cs.sunysb.edu/Publications/2003/QQZKW03/184cgi03.pdf http://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htm Relaxed Cone-stepping http://http.developer.nvidia.com/GPUGems3/gpugems3_ch18.html

Terrain Shader

  • terrain can be rendered just in some area constrained by outer hull (low resolution polygonal terrain); start rayMarching from gl_FragCoord.z of polygon mesh
  • most importaint is to use gl_FragDepth properly with glDepthRange specifies the viewport depth transformation applied on gl_FragCoord.z. Normally gl_FragDepth=gl_FragCoord.z but it is non-linear; https://www.opengl.org/discussion_boards/showthread.php/165149-gl_FragDepth

Cloud Shader

  • (Similarily to terrain) rayMarching of cloud can start from gl_FragCoord.z to save performance, the cloud is confined in low-ress polygonal mesh (e.g. octahedal/icosahedral sphere)

Rendering Large scenes ( e.g. Aircraft and space simulator scenes )

https://www.sjbaker.org/steve/omniv/love_your_z_buffer.html http://gamedev.stackexchange.com/questions/74044/how-to-efficiently-render-a-large-terrain-mesh http://outerra.blogspot.nl/2012/11/maximizing-depth-buffer-range-and.html

Terrain

http://www.leadwerks.com/werkspace/blog/117/entry-1163-large-scale-terrain-algorithms/ http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter02.html Rutine regular grids algorithms http://vterrain.org/LOD/Papers/ http://www.gdcvault.com/play/1277/HALO-WARS-The-Terrain-of http://gamedev.stackexchange.com/questions/15573/heightmap-voxel-polygon-geometry-terrains

Game engine design

Message que architecture instead to reduce interdependence between modules - http://www.gamasutra.com/blogs/MichaelKissner/20151027/257369/Writing_a_Game_Engine_from_Scratch__Part_1_Messaging.php scene graph - http://archive.gamedev.net/archive/reference/programming/features/scenegraph/index.html

Voxels

fast frag-shader voxels with AO - http://www.iquilezles.org/www/articles/voxellines/voxellines.htm