Hello eveybody.
I was trying to implement something some days ago (no, I can't be more vague
) and then this idea stroke me.
What about the possibility to add a thing in the map, with a special type that will make it the "sky maker".
Instead of the sky, you'll see the point-of-view of this thing
in the sky (where the sky should be, as if it was the sky ... well you get it).
We can imagine that if the thing itself is seeing a sky, it will see the default/existing sky (so, doom sky or a skybox etc).
If you rotate the thing, this rotation will be added to the rotation of the player's camera for the final rendering. So, you can rotate the sky by just rotating the thing in the opposite direction.
If you want to add a planet in front of your starfield, just add a floating thing representing a planet in front of the "sky-thing"
If you want a city, you can have some skyscrappers in front of the background (showing a city).
If you want a gigantic cacodemon floating above the city, just add it in there.
If you want a day and night cycle (
Spoiler:
"why the hell would I want that ?" => I don't know for an open world ?
, you can have it by changing the color of the walls around your sky-thing.
And if you want a spaceship going very fast through stars (like a windows screen saver) you can have it will things and some scripting.
Considering a skybox is showing very far things, the fov should be modified to be something like 0 (ortho projection).
If shouldn't be hard to implement that in opengl (render the sky_scene, render the other scene and for every "sky" pixel use gl_FragCoord to pick the corresponding pixel from the sky_scene).
And like for portals, you can just skip the sky_scene rendering when no part of the sky is visible.
I tried to research is something like that has already been suggested, but I found nothing.
Have a nice night.
(English is not my native language).
Hello eveybody.
I was trying to implement something some days ago (no, I can't be more vague :) ) and then this idea stroke me.
What about the possibility to add a thing in the map, with a special type that will make it the "sky maker".
Instead of the sky, you'll see the point-of-view of this thing [i]in[/i] the sky (where the sky should be, as if it was the sky ... well you get it).
We can imagine that if the thing itself is seeing a sky, it will see the default/existing sky (so, doom sky or a skybox etc).
If you rotate the thing, this rotation will be added to the rotation of the player's camera for the final rendering. So, you can rotate the sky by just rotating the thing in the opposite direction.
If you want to add a planet in front of your starfield, just add a floating thing representing a planet in front of the "sky-thing"
If you want a city, you can have some skyscrappers in front of the background (showing a city).
If you want a gigantic cacodemon floating above the city, just add it in there.
If you want a day and night cycle ( [spoiler]"why the hell would I want that ?" => I don't know for an open world ?[/spoiler], you can have it by changing the color of the walls around your sky-thing.
And if you want a spaceship going very fast through stars (like a windows screen saver) you can have it will things and some scripting.
Considering a skybox is showing very far things, the fov should be modified to be something like 0 (ortho projection).
If shouldn't be hard to implement that in opengl (render the sky_scene, render the other scene and for every "sky" pixel use gl_FragCoord to pick the corresponding pixel from the sky_scene).
And like for portals, you can just skip the sky_scene rendering when no part of the sky is visible.
I tried to research is something like that has already been suggested, but I found nothing.
Have a nice night.
(English is not my native language).