Live data from Hacker News

Orbit Tessellation developer diary for Kerbal Space Program 2

kerbalspaceprogram.com

51–60 of 84 posts

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#52
post #48
post #45

Earlier quoted context omitted.

> yet GPUs don't support double precision well. Are there GPUs without FP64 functionality at all? Or are you just referring to most consumer GPUs being built for FP32 performance over FP64?

It's not that GPUs don't support fp64, it's that for domestic gamer GPUs fp64 arithmetic is normally ~1:32 performance of fp32 arithmetic. e.g. 1080gtx FP16 (half) performance 138.6 GFLOPS (1:64) FP32 (float) performance 8.873 TFLOPS FP64 (double) performance 277.3 GFLOPS (1:32) e.g. 3090rtx FP16 (half) performance 35.58 TFLOPS (1:1) FP32 (float) performance 35.58 TFLOPS FP64 (double) performance 556.0 GFLOPS (1:64)…

For AMD GPUs the FP64/FP32 performance ratio is twice as high compared to nVidia, it’s 1:16

https://en.wikipedia.org/wiki/Radeon_RX_5000_series#Desktop

https://en.wikipedia.org/wiki/Radeon_RX_6000_series#Desktop

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#53
post #10

KSP 2 has easily been my most anticipated game for a while now. It's a bummer that there's still a while to wait, but I'm hoping that it's worth it.

You can give Simple Rockets 2 a try in the meantime. It uses fully customizable procedural parts (wings, fuel tanks, even engines) instead of premade parts like KSP, it looks a bit nicer and it includes a visual programming environment for your spacecraft (e.g. you can build a SpaceX-like autoland routine).

I've never tried Simple Rocket, could you compare it to KSP? At a glance, it seems more serious than KSP while KSP has a "fun" edge, but besides that they seem more similar than not.

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#54

Earlier quoted context omitted.

Expanse season 1 was a nice exception to the rule, but I find that as the longer the show goes on the more it gets ignored. Missiles that fly into the sun at faster than light speeds...

The expanse still gets the physics right for the important scenes. Watching people stand for over a few days looking at a torpedo slamming into the sun would be boring. Space combat physics is still done very well.

That sequence was indeed not realistic. It's interesting to keep in mind that according to Expanse-lore, the Epstein drive on human-rated vessels operates typically around 11G. It is likely that a missle that is much lighter, so the rocket equation has less teeth, and not constrained by fragile meat-bag-physics, would be even more powerfull.

But if we just assume 11G, and constant acceleration (remember, specific impulse is supposed to be 1,100,000 seconds), that gets you to 0.05c in 37 hours. At that point, 8 lightminutes (1 AU) takes for example 160 minutes to travel. Not instantanious by any means, but a lot faster than one would imagine.

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#55
post #29

One of the things KSP taught me is that orbital mechanics aren't that complicated, but even so, pretty much all movies and TV shows about space were written by someone who doesn't even know the basics.

The vanilla KSP physics aren't realistic, only the nearest/most influential body exerts gravity on the spaceship. With the Principia mod[0], more realistic and complex maneuvers[1] can be simulated.

"Orbit Type Diagrams"[3][4] show the fractal-like complexity of three or n-body problems[5][6]

[0] https://github.com/mockingbirdnest/Principia

[1] https://www.youtube.com/watch?v=l3PCCJZzVvg

[3] https://www.semanticscholar.org/paper/Crash-test-for-the-res...

[4] https://www.semanticscholar.org/paper/Crash-test-for-the-Cop...

[5] https://en.wikipedia.org/wiki/Three-body_problem

[6] https://en.wikipedia.org/wiki/N-body_problem

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#56
post #6

Space rendering is full of interesting problems like this. Another one is that single precision floating point doesn't have enough precision to represent both planet scale and human scale in the same coordinate system (let alone solar system scale or galaxy scale), yet GPUs don't support double precision well. So you have to make sure that you do calculations needing high precision on the CPU in double precision and…

An interesting piece of industry-insider information, at least as far as I recall from the Sony pub regulars I knew back in the day: the colloquial term for the polar artefact you describe is the cat’s bumhole .

One way around this is cube-mapping. You construct a cube then normalize all the vertices to "over-inflate" it until it's a sphere. Then you have six textures mapped to the faces of the cube, and no cat's bumhole, and no international date-line zipper. If you subdivide the faces of the cube into rectangles via equal angles instead of naively into a grid, then cut each of the rectangles into two triangles by the shortest diagonal, then you get a very nice tessellation with triangles that are nice and fat (nearly equilateral) with no thin sliver triangles and they're all of approximately equal size. The other thing you can do is double the vertices along the cube face edges, so that no two cube faces share any vertices. In that way you can avoid some "hairy ball theorem" related problems when it comes time to do normal mapping, which involves constructing tangent and bitangent vectors for each vertex. Each face of the cube can have a field of tangents and bitangents with no discontinuities, and since no texture or normal map crosses any boundary between faces, you avoid problems that come up with such discontinuities. (Hairy ball theorem says it's impossible to construct a field of tangents and bitangents covering a sphere that does not contain some discontinuity, so one solution is to stuff the discontinuities between cube map faces where they cannot bother any texture or normal map.)

Tessellated sphere looks like this: https://imgur.com/l3GmWq3

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#57
post #29

One of the things KSP taught me is that orbital mechanics aren't that complicated, but even so, pretty much all movies and TV shows about space were written by someone who doesn't even know the basics.

The vanilla KSP physics aren't realistic, only the nearest/most influential body exerts gravity on the spaceship. With the Principia mod[0], more realistic and complex maneuvers[1] can be simulated. "Orbit Type Diagrams"[3][4] show the fractal-like complexity of three or n-body problems[5][6] [0] https://github.com/mockingbirdnest/Principia [1] https://www.youtube.com/watch?v=l3PCCJZzVvg [3] https://www.semanticschol…

KSP physics may not be realistic, but they should be close enough for most movies and TV shows, yet they don't even approach that. I think that's the point of the parent.

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#58
post #6

Space rendering is full of interesting problems like this. Another one is that single precision floating point doesn't have enough precision to represent both planet scale and human scale in the same coordinate system (let alone solar system scale or galaxy scale), yet GPUs don't support double precision well. So you have to make sure that you do calculations needing high precision on the CPU in double precision and…

Creating astronomy visualizations often involves all sorts of fun tricks. I work in a planetarium as a 3D animator and each day has interesting unique challenges. Indeed we have to remain mindful of not pushing Maya too hard when it comes to series of scale. We use fluids as a way to create 3D nebulae that can be flown through. https://thefulldomeblog.com/2013/08/20/the-nebula-challenge/ Or if you constrain the fluid…

> Simulating the bands of Jupiter is tricky but I've done some experiments with 2D fluids.

Nice! I've always wanted to do some fluid dynamics on the surface of a sphere, but the math is too hard for me. I found a video on youtube where someone has done some interesting things a few years ago: https://www.youtube.com/watch?v=Lzagndcx8go&t=1s but there's very little information about it. Then there was what was done for the film 2010: The year we make contact" http://2010odysseyarchive.blogspot.com/2014/12/

I've had to resort to simpler means myself, which means faking it. I use OpenSimplex noise on the surface of a sphere, and from this I can find the gradient of the noise field tangent to the surface of the sphere, rotate this vector 90 degrees about an axis passing through the center of the sphere -- which is equivalent to some kind of spherical curl of the noise field -- which gives me a non-divergent velocity field. Because incompressible fluid flows are also non-divergent, there's a strong but superficial resemblance -- it looks like fluid flow, even though it is just an arbitrary process. Into this field, I dump a bunch of colored particles and let them flow around, painting alpha blended, slowly fading trails behind them onto the surface of a cube to be used later as textures of a cubemapped sphere.

For the bands, I superimpose a simple velocity field of counter rotating bands on top of this curl-noise generated velocity field. Something like: horizontal_velocity += K x sin(5 x latitude)

Results looks like this: https://duckduckgo.com/?q=gaseous-giganticus&t=h_&iax=images...

The idea for using the curl of a noise field to mimic fluid dynamics is from a paper by Robert Bridson, et al.: https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph2007-cu...

This program is open source, it's here: https://github.com/smcameron/gaseous-giganticus

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#59
post #29

One of the things KSP taught me is that orbital mechanics aren't that complicated, but even so, pretty much all movies and TV shows about space were written by someone who doesn't even know the basics.

They are still making a work of fiction and entertainment, so some shortcuts are taken. Series like Star Trek just come up with new physics and word salad to progress the plot and pull out their deus ex machina.

Re: Orbit Tessellation developer diary for Kerbal Space Program 2

#60
post #10

KSP 2 has easily been my most anticipated game for a while now. It's a bummer that there's still a while to wait, but I'm hoping that it's worth it.

Same, so far they've mainly showed a lot of visual improvements, but I really hope the technical groundwork is being done as well.
Post reply on HN