(Demo) Black Holes
Moderators: winston, another_commander
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
(Demo) Black Holes
It turns out, we can create a black hole in Oolite, even after the fix mentioned in this thread Issue with planet texture for extra planets.
Yes, that big black section in the middle of the screen is a black hole.
To create this, set the planet texture to be a PNG file with nothing in it (that is, not all white, or all black, but delete everything). Set the planet texture to that. Then set the illumination color to [0, 0, 0] and you get something like the above screenshot. You'd probably need to set a few other things in planetinfo.plist (cloud settings, I'm thinking, making sure there aren't any, atmosphere settings, etc). But from a visual point of view, it's a black hole. Not a black sphere that has reflections. But, for all intents and purposes, a black hole.
*Big caveat*. This only works at a graphical level of "Shaders Enabled" or "Extra Detail". Anything below that and you see something like this:
Edit to add: you can see some of the reflection on the moons surface in the lower half of the shot.
Here's a demo OXP I put together for this. BlackHoleDemo.oxz. This will add a "Black Hole" a *really* long way out in every system. Please note: there is no gameplay in this demo (ie gravitational changes, proximity dangers, time skewing etc). It's just a tech demo. If someone wants to play around a bit more, they are welcome to grab with demo and run with it.
Anyway, I thought it might be worth sharing to get those creative juices flowing!
Note: You might want Galactic Almanac installed, as it will put a beacon on the black hole to make navigating to it reasonably easily.
Yes, that big black section in the middle of the screen is a black hole.
To create this, set the planet texture to be a PNG file with nothing in it (that is, not all white, or all black, but delete everything). Set the planet texture to that. Then set the illumination color to [0, 0, 0] and you get something like the above screenshot. You'd probably need to set a few other things in planetinfo.plist (cloud settings, I'm thinking, making sure there aren't any, atmosphere settings, etc). But from a visual point of view, it's a black hole. Not a black sphere that has reflections. But, for all intents and purposes, a black hole.
*Big caveat*. This only works at a graphical level of "Shaders Enabled" or "Extra Detail". Anything below that and you see something like this:
Edit to add: you can see some of the reflection on the moons surface in the lower half of the shot.
Here's a demo OXP I put together for this. BlackHoleDemo.oxz. This will add a "Black Hole" a *really* long way out in every system. Please note: there is no gameplay in this demo (ie gravitational changes, proximity dangers, time skewing etc). It's just a tech demo. If someone wants to play around a bit more, they are welcome to grab with demo and run with it.
Anyway, I thought it might be worth sharing to get those creative juices flowing!
Note: You might want Galactic Almanac installed, as it will put a beacon on the black hole to make navigating to it reasonably easily.
Last edited by phkb on Tue Nov 14, 2023 10:09 am, edited 1 time in total.
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: (Demo) Black Holes
As an extra FYI, the current oolite-final fragment shader contains some test code for generating a gravitational lens effect, which would fit nicely with black holes. It is not readily accessible because it also affects the hud, but it's there if you want to have a play with it. You can activate it by copying the code under case 8 (line 486) of the shader and pasting it in the place of the code under one of the other effects, say 7. So it should look like
Then just execute a postFX=7 from the console.
It could be a useful effect if we get it to render before the hud and at the exact desired set of screen coordinates, but that's a story for another time.
Code: Select all
case 7:
hdrColor = gravLens(scene, TexCoords);
bloomColor = gravLens(bloomBlur, TexCoords);
if(bloom) hdrColor += bloomColor;
hdrColor *= exposure;
break;
It could be a useful effect if we get it to render before the hud and at the exact desired set of screen coordinates, but that's a story for another time.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: (Demo) Black Holes
If anyone wants to see what the effect looks like, a demo (not in Oolite, mind!) can be found here: https://www.shadertoy.com/view/llyyRm
I have to say, it’s really cool! If there was a way of doing what you said, that would certainly elevate the impact massively!
I have to say, it’s really cool! If there was a way of doing what you said, that would certainly elevate the impact massively!
Re: (Demo) Black Holes
Humor is the second most subjective thing on the planet
Brevity is the soul of wit and vulgarity is wit's downfall
Good Night and Good Luck - Read You Soon
Brevity is the soul of wit and vulgarity is wit's downfall
Good Night and Good Luck - Read You Soon
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: (Demo) Black Holes
It's not actually hard to exclude the hud from the effect, but I realized that there is another problem: any ship or station positioned in front of the black hole while the effect is active, will be distorted. I don't think that should be the case; only the starfield background should be (I think). That might be trickier than I thought.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: (Demo) Black Holes
Just for my curiosity:
Apart from being black and having an otional gravitation lens and maybe in future havin the accretion disk - how does the black hole behave?
I space around the black hole just a smooth as elsewhere? What can you feel when controlling an aristoteles drive?
Apart from being black and having an otional gravitation lens and maybe in future havin the accretion disk - how does the black hole behave?
I space around the black hole just a smooth as elsewhere? What can you feel when controlling an aristoteles drive?
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: (Demo) Black Holes
You mean at the moment, with this demo? It doesn't do anything. It is just a demo of creating what appears to be a black hole in space. That's it, I'm afraid!
If you mean what *should* happen, that's up to whoever wants to run with this. I may get around to it in time, but I have a number of other projects on the go, and this one is at the bottom of the pile. But off the top of my head: having your ship move towards the black hole, requiring you to boost away from it; possibly getting some particles to track into the black hole as a visual clue that a black hole is present; having random pieces of equipment break the closer you get to the black hole; having time accelerate the closer you get to the black hole. I'm sure there's probably other things that could happen.
Re: (Demo) Black Holes
On something I'm working on, I've got this:
This could only happen if the player moves their ship pretty close to the black hole, and could even be conditional so as to undo the likely unwanted misjump if moved away before trying to jump, assuming they're not mass-locked.
It's not much, but it does give a clue...
Code: Select all
player.commsMessage("WARNING: Gravitational Disturbance Detected!",8);
player.ship.scriptedMisjump = 1; // Which causes next jump to automatically be a misjump!
It's not much, but it does give a clue...
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Re: (Demo) Black Holes
Added a custom classification, so it doesn't appear on the MFD as a planet:
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: (Demo) Black Holes
Wiki page now up: https://wiki.alioth.net/index.php/Black_Hole
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: (Demo) Black Holes
Just wanted to park this idea here:
A Black Hole would be on the edges of a regular Oolite solar system? Or in Interstellar Space?
A Black Hole would be on the edges of a regular Oolite solar system? Or in Interstellar Space?
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: (Demo) Black Holes
Hmm. I'd expect a black hole to be the center of a galaxy. Which means it starts as a collapsed star and as that in the center of a solar system, then aggregates mass such that it influences all star systems in a growing range.Cholmondely wrote: ↑Tue May 28, 2024 1:00 pmJust wanted to park this idea here:
A Black Hole would be on the edges of a regular Oolite solar system? Or in Interstellar Space?
If we leave out the time ranges, the black hole would be found as the center of a star system or considered in intergalactic space. But never on the edge.
Sunshine - Moonlight - Good Times - Oolite