Gas Giants

A quieter space for design discussion of long-term projects
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

I'm doing this on a separate branch https://github.com/fluffyfreak/pioneer/ ... nt_stripes which just has some hacky noise shit on it for gas giants at the moment.

It updates with time though so you can sit in orbit and what the patterns animate under time acceleration :)
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Ok, well generating it in realtime is really cool but not very practical it seems :) I get around 7fps and that's with clamping the number of octaves to 2 :)
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

I haven't forgotten about this, the other night I split out the GasGiant material code from the GeoSphere code, I don't know if I'll setup generating the texture in a shader or just create another type of threaded CPU job for it. Maybe the latter since it might be simpler and we already have enough trouble supporting peoples GPUs :/
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

I've just posted a PR for the first part of this task.

Too brain dead tired to comment more now.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

I got the render-to-texture part of drawing to a cubemap face working earlier but it's not outputting any colour for some reason :(
I also added a config option so that I can switch between CPU and GPU, this will mean that people have the option of using GPU or CPU generation of the gas giant textures - and later on other things.

I'm willing to maintain this for now but eventually ... ?
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Hopefully get some time to work on this at the weekend, I'm out 4 nights straight this weekend so it'll only be during the day.

As mentioned there's a GPU Job generation system in the works which I'm doing inside this branch because it's the only place that I have which uses it, totally experimental and currently totally hacked in. This is just whilst I figure out what the hell I want to do with it and how to get it to work. Then I'll do a pass to resolve duplication of effort and hopefully unify the different Job systems into something with a common interface.

Priority now is just getting it to work as planned. It doesn't throw any errors but it's also not rendering anything to the texture :/

First step (note-to-self) turn off back-face culling to see if I'm just doing something dumb with the full screen quad.
lwho
Posts: 72
Joined: Thu Jul 04, 2013 9:26 pm
Location: Germany

Re: Gas Giants

Post by lwho »

FluffyFreak wrote:and hopefully unify the different Job systems into something with a common interface.
You mean with the normal (CPU-thread-based) Jobs? I recently identified yet another kind of Jobs which might be useful: Jobs that are executed in the main thread one-by-one on each mainloop iteration. I recently tried to put StarSystem generation into (background thread) Jobs and totally failed (though I did not put much effort into it). Generating them in mainloop-Jobs while in hyperspace may be an alternative, if I don't get to make the stuff multi-threading friendly.

So, that would make three kinds of Jobs:
  1. CPU background thread jobs
  2. GPU jobs
  3. CPU mainloop jobs
Maybe, I'll do something about #3 this weekend, but don't know, yet ;)
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Well, later than planned, I have gotten GPU jobs working mostly. There still some very odd rendering issues but I expect that I'll solve those pretty soon.
I need/want to add some benchmarking, configuration and testing code and obviously fix the bugs but it is coming along nicely now.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

I just did some timings :)

GPU timings
(0.018675) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005814) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005523) millicycles in SingleTextureFaceGPUJob::OnRun
(0.004932) millicycles in SingleTextureFaceGPUJob::OnRun
(0.008628) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005535) millicycles in SingleTextureFaceGPUJob::OnRun
(0.006699) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005010) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005055) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005478) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005025) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005508) millicycles in SingleTextureFaceGPUJob::OnRun
(0.006309) millicycles in SingleTextureFaceGPUJob::OnRun
(0.006243) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005688) millicycles in SingleTextureFaceGPUJob::OnRun
(0.004917) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005367) millicycles in SingleTextureFaceGPUJob::OnRun
(0.004731) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005034) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005682) millicycles in SingleTextureFaceGPUJob::OnRun
(0.004029) millicycles in SingleTextureFaceGPUJob::OnRun
(0.003777) millicycles in SingleTextureFaceGPUJob::OnRun
(0.005826) millicycles in SingleTextureFaceGPUJob::OnRun
(0.004410) millicycles in SingleTextureFaceGPUJob::OnRun

CPU timings
(2439.925196) millicycles in SingleTextureFaceCPUJob::OnRun
(2476.761875) millicycles in SingleTextureFaceCPUJob::OnRun
(2868.632809) millicycles in SingleTextureFaceCPUJob::OnRun
(2875.058055) millicycles in SingleTextureFaceCPUJob::OnRun
(2932.938000) millicycles in SingleTextureFaceCPUJob::OnRun
(2935.582037) millicycles in SingleTextureFaceCPUJob::OnRun
(3689.515754) millicycles in SingleTextureFaceCPUJob::OnRun
(1202.598441) millicycles in SingleTextureFaceCPUJob::OnRun
(1215.870070) millicycles in SingleTextureFaceCPUJob::OnRun
(1183.723942) millicycles in SingleTextureFaceCPUJob::OnRun
(3629.931743) millicycles in SingleTextureFaceCPUJob::OnRun
(3708.483782) millicycles in SingleTextureFaceCPUJob::OnRun
(1241.106183) millicycles in SingleTextureFaceCPUJob::OnRun
(1223.256956) millicycles in SingleTextureFaceCPUJob::OnRun
(3626.401109) millicycles in SingleTextureFaceCPUJob::OnRun
(3712.126829) millicycles in SingleTextureFaceCPUJob::OnRun
(3778.210058) millicycles in SingleTextureFaceCPUJob::OnRun
(1207.013227) millicycles in SingleTextureFaceCPUJob::OnRun
(1977.629001) millicycles in SingleTextureFaceCPUJob::OnRun
(1978.615369) millicycles in SingleTextureFaceCPUJob::OnRun
(1838.568634) millicycles in SingleTextureFaceCPUJob::OnRun
(1966.444994) millicycles in SingleTextureFaceCPUJob::OnRun
(1962.982115) millicycles in SingleTextureFaceCPUJob::OnRun
(1878.994963) millicycles in SingleTextureFaceCPUJob::OnRun

EDIT:
GPU is an nVidia 650m (laptop) GPU.
CPU is a quad-core (with hyperthreading) Intel i7-3630QM @ 2.4Ghz running 7 worker threads.

ver unknown on: Windows

Hardware information:
OEM ID: 0
Number of processors: 8
Page size: 4096
Processor type: 586
Minimum application address: 10000
Maximum application address: fffeffff
Active processor mask: 255

Windows 8

OpenGL version 4.4.0, running on NVIDIA Corporation GeForce GT 650M/PCIe/SSE2
GLEW version 1.10.0
Shading language version: 4.40 NVIDIA via Cg compiler
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Obviously this is still with the rendering bugs that I mentioned however the generation process is the same so shouldn't affect the timings much.
Post Reply