Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 07:42:41 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsZSPACE - First person galactic exploration and interior decorating
Pages: 1 ... 10 11 [12]
Print
Author Topic: ZSPACE - First person galactic exploration and interior decorating  (Read 27821 times)
fluffrabbit
Guest
« Reply #220 on: September 02, 2019, 12:08:07 AM »

Compressed dynamic range is high dynamic range, and high dynamic range is low dynamic range. ZSPACE and other games without exposure shifting do indeed compress the dynamic range to the computer monitor, but not in a realistic way. If you wanted it to be realistic while everything was still in-range, the stars would technically be visible, but they would be quite dark and you may have to look at the LCD at a specific angle to see them.

A real solution would be an actual HDR display that has at least 3x the dynamic range of those available today. There are high-bit-depth monitors, but they're very expensive and I doubt their dynamic range is significantly greater than a standard (s)RGB monitor, even with the extra bits.
Logged
amasinton
Level 1
*



View Profile
« Reply #221 on: September 03, 2019, 04:49:51 AM »

Still toying with things. Today I made a new star shader!

It's purely mathematically based, too, not using a star sprite like before, which makes it a lot more customizable than the old one.

Just catching up here.  Beautiful work with the atmosphere, the rings, the new stars!  I very much like that you're using actual stellar data for your stars and that the shader is so dynamic that you can swap out or modify datasets.  But I also like that your'e not being a slave to simulation - that you're doing simulation in service of your aesthetic and gameplay goals.  Walking the line between verisimilitude and expression is a tough balancing act.

Are you doing any instancing stuff in your rings and stars shaders? 
Logged
nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #222 on: September 03, 2019, 08:17:10 AM »

Still toying with things. Today I made a new star shader!

It's purely mathematically based, too, not using a star sprite like before, which makes it a lot more customizable than the old one.

Just catching up here.  Beautiful work with the atmosphere, the rings, the new stars!  I very much like that you're using actual stellar data for your stars and that the shader is so dynamic that you can swap out or modify datasets.  But I also like that your'e not being a slave to simulation - that you're doing simulation in service of your aesthetic and gameplay goals.  Walking the line between verisimilitude and expression is a tough balancing act.

Thank you. That's really one of the biggest goals overall, to keep that balance.

Are you doing any instancing stuff in your rings and stars shaders? 

Yes, for the rings - it's all rendered as a single pass of an instanced rock mesh. Instancing blows my mind with how fast it is. The stars are different though, they use fully procedural geometry - the real star positions have an offset calculated to put them relative to the viewpoint, then that's used to draw a point, and then a geometry shader generates a quad for every point to act as a canvas for the pixel shader. There's basically no performance impact to it, which is nice.

The most performance intensive part of both systems is population and data transfer. Sending the data from CPU to GPU for rendering 10,000 or 50,000 rocks or 100,000 stars all at once is very costly by comparison. It's not so bad for the stars, because the updates are fairly infrequent, and they only work with a smaller subset of the data each time. In the case of the rings though, their positions have to be updated every frame due to the fact every rock is moving independently, and the player moving relative to them. Although, truthfully, rings are very much on the backburner for now.

Populating the ring particles is an order of magnitude more expensive than any other part of the chain there, and the faster you move, the heavier the population gets. It's not so bad if you move slowly relative to the orbital velocity of them, but if you sit stationary while the particles orbit below you, it can get extremely slow because it keeps repopulating effectively the entire visible radius of particles (of which there can easily be tens of thousands every frame). So I need to come up with another method. Or, hell, maybe even just disable the particles if you're going too fast. Or something that only spawns in a few hundred per frame max.
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #223 on: September 06, 2019, 06:07:21 PM »

A few things:

1. The stars are basically done, except for one important thing. I need to figure out a logic tree to go from a stellar luminosity and temperature, to a mass value... this seems to be one of the more obnoxious and tedious things to do in astrophysics, and let me tell you, it's a bummer. Looks like there's no option besides a big fat hairball of if/switch statements...

2. I've got other stuff going on in the near future on and off, I dunno how much this will impact developing things, but at some point it's probably going to tank for a while, sadly. However I think during that downtime I'll still be able to do some less heavy programming, so perhaps I'll get going on a proper solar system generator; something that doesn't actually need the game to run.

3. I'm actively trying to think of a new name for the game. I've intended to for a while but I think it's about time I got around to it. I'm bringing this up mainly because I want to freeze this thread in place and start a new one with the new name. So I figured it would be a good idea to give some warning. This also will coincide with the launch of a patreon page for the game (surprise!) although... it feels a wee bit dickish to launch a patreon page then immediately go low-profile for a while  Facepalm we'll see I guess
Logged

amasinton
Level 1
*



View Profile
« Reply #224 on: September 07, 2019, 02:57:01 PM »

In the case of the rings though, their positions have to be updated every frame due to the fact every rock is moving independently, and the player moving relative to them.

Is it possible to put the calculations for the rock movement into a function in a computer shader?  It seems like that would be possible, and then you would only have to send data to the GPU when you need to change the number of rocks or something else fundamental about them other than constant movement/rotation?

...Looks like there's no option besides a big fat hairball of if/switch statements...

Oh dear!  If it's any comfort (and it probably shouldn't be) that seems to be the entire code base of my game.  Ifs all the way down...

Quote
...so perhaps I'll get going on a proper solar system generator; something that doesn't actually need the game to run.

Out of curiosity, do you ever use Meejus' Astronomical Algorithms?  I don't know how useful they are, in your case, but I've always wanted to have the time to implement some of them in some of my projects.

Quote
3. I'm actively trying to think of a new name for the game. I've intended to for a while but I think it's about time I got around to it. I'm bringing this up mainly because I want to freeze this thread in place and start a new one with the new name. So I figured it would be a good idea to give some warning. This also will coincide with the launch of a patreon page for the game (surprise!) although... it feels a wee bit dickish to launch a patreon page then immediately go low-profile for a while  Facepalm we'll see I guess

Marge Simpson says names are hard.  Also, so's crowdfunding, I hear.  Keep us in the loop when you launch the Patreon (before or after your hiatus - that's a tricky decision) - and on the new name/relaunch of the thread.

And best wishes on your other endeavors.
Logged
nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #225 on: September 07, 2019, 04:07:39 PM »

As if to further drive home the point that I should do something else, my UPS started cheerfully displaying the following, even after I replaced the battery:

« Last Edit: September 07, 2019, 04:24:19 PM by NovaSilisko » Logged

oahda
Level 10
*****



View Profile
« Reply #226 on: September 08, 2019, 02:42:32 AM »

Finally finished reading through the whole thread!! What a cool project. You had me from the beginning at space coffee but the rest has been a mesmerising log to follow. Super impressive in terms of tech but also very enthralling in concept. Animal Crossing amongst the stars! Kiss I really like that you’re going with a non-violent approach to this. Need more games like that. Good luck on continued progress! Gomez
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #227 on: September 08, 2019, 08:42:01 AM »

I am determined to kick the ass of every star in the galaxy.

I forgot to mention before - I changed how stars spawn in the first place. Before, they were grouped explicitly based on templates, containing mass and radius ranges

As mentioned, getting a mass value for a star is very difficult. But I have a different approach that I'm going for that I think might work out better...

Perhaps some of you are familiar with the Hertzsprung-Russell diagram:



In simplest terms, it's a way to plot stars based on their luminosity/absolute magnitude, and their temperature, and every combination of these two produces a unique coordinate on the diagram. So... if I can make effectively an inverted HR diagram, I can create a mass lookup table based on every region of it, just stored as an easily-editable texture. Hopefully.

Actually, density might be a bit more manageable because, apart from extremely low density red giants (the biggest are actually 100,000 times less dense than earth's atmosphere), density is a lot more consistent across star types.

Either way, I think this is a much less tedious and much more flexible approach to the problem... although, there's probably some cases where two stars of the same luminosity and temperature can have different masses, likely in the realm of giant stars where everything is pretty much just pure chaos, but I'm willing to deviate from reality on that front for the sake of keeping myself sane.



Finally finished reading through the whole thread!! What a cool project. You had me from the beginning at space coffee but the rest has been a mesmerising log to follow. Super impressive in terms of tech but also very enthralling in concept. Animal Crossing amongst the stars! Kiss I really like that you’re going with a non-violent approach to this. Need more games like that. Good luck on continued progress! Gomez

Thank you!
Logged

oahda
Level 10
*****



View Profile
« Reply #228 on: September 10, 2019, 01:26:07 AM »

I do recognise that sort of diagram! Sounds like a good solution!
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #229 on: September 10, 2019, 07:14:55 AM »

Actually, density might be a bit more manageable because, apart from extremely low density red giants (the biggest are actually 100,000 times less dense than earth's atmosphere), density is a lot more consistent across star types.

^ I dunno what I'm on about here. Density is all over the place. A red dwarf is 30 times denser than the sun, while a red giant is, as stated, 1/100,000th earth's atmospheric density. Mass is a lot less varied (from perhaps 0.05 solar masses to 50). Although I'll probably have to work on some sort of logarithmic scale... conceptually this is all pretty easy, but the actual act of painting the mass table accurately is going to be a challenge.
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #230 on: September 13, 2019, 03:48:47 AM »

After far too much procrastination and internal debates/mental breakdowns, I think I have a reasonable solution for mass. I decided not to go with a direct table of masses and instead do a bit of a hybrid solution. This is the "table" as it exists right now, crudely hand-painted:



As with the HR diagram, the X-axis represents temperature (hot on the left, cool on the right), while the Y-axis represents absolute magnitude/luminosity (bright on top, dim on the bottom). If you squint, you can kinda make out some alignments with the HR diagram.

Instead of encoding mass values, it simply blends between different approximations based on real star data. Black means it defaults to the main sequence, which is simple and predictable enough that I can approximate it with effectively a few line segments + wiggle room.

Giant stars, then, are blended in with the red channel, and use a different formula. Sort of a weird multi-axis blend of magnitude versus temperature, again based on real data. The yellow there is going to go away - it was originally going to be a different formula for brighter giant stars, but this one works fine as-is.

And the blue is for white dwarf stars, which have a very specific relationship between radius and mass (which I still need to look up, but I've been assured that is the case)

The important part here is the blending. Stars on their way out of the main sequence and into the giant stage will naturally blend into it if they spawn at the right region of this map, so I don't have to do any additional work there.

I guess soon enough I'll be able to hook the new system back into the game. Finally.
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #231 on: September 18, 2019, 07:45:53 AM »



Finally - the new stars are in-game. Mostly. The interstellar navigation screen is totally disabled right now because it doesn't know how to deal with the stars as they exist now, and I need to write a new shader and renderer for the star map as well.

Edit: And now the navigation is working as well. I took the opportunity to greatly (okay, just a little bit) improve the visuals of the interstellar nav screen as well



And of course, the real prize:

« Last Edit: September 18, 2019, 03:02:43 PM by NovaSilisko » Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #232 on: September 19, 2019, 08:56:52 AM »

And some entertainment. Auto-calculated oblate spheroids + low density red giants + slightly-too-fast rotation =

Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #233 on: September 25, 2019, 08:09:12 AM »

Between other stuff going on and being borderline distraught with indecision over a new name, I haven't really touched the game I guess since my last post here. Ghh.

I've thought about putting the name to a vote but I worry a lot about getting locked into something I'm not fond of and then regretting it. I dunno. OCD is hell

Edit: Forcing my own hand. I just renamed the repository and project file and everything. Once all that is sorted, I'm going to retire this thread and start a new one with the new name.

So, fair ZSpace thread, I bid you adieu.



« Last Edit: September 25, 2019, 11:06:48 AM by NovaSilisko » Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #234 on: January 21, 2020, 11:13:13 AM »

Wow, crap. I never actually posted the link to the new thread here. All you people following must have thought I got hit by a bus or something.

>>> HERE IT BE <<<



Logged

Pages: 1 ... 10 11 [12]
Print
Jump to:  

Theme orange-lt created by panic