[Mod][WIP] Skybox Extended [skybox_extended]

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

[Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Tue Dec 22, 2015 10:22

Greetings Minetest Community!

This mod adds a simple coded interchangeable skybox which adds Space to a regular minetest world, adding certain realism when going into higher altitudes.


    When on earth
    Image

    When in space (Currently activates at Y = 1000)
    Image

    Screenshots were taken from one of my WIP servers, please focus on the skybox changes instead of the other things that are shown in these images.


NOTE: This mod is still work in progress, would like volunteers to help me test this mod entirely.

If you have any further Ideas for this mod feel free to share them here.

NOTE: I've tested this on one of my public minetest servers during my spare time, so far it works very well.
The skybox images that I was using as a placeholder to test the mod is from Xonotic, please give credit to Cuinn Herrick if you are using his images.

Credits: Kudos to Amaz for helping me adding a check timer code and paramat for reviewing the code.

Source Code License: WTFPL

Dependencies: None

Requires: Minetest 0.4.11 or Higher

Version: 0.2

    Version:0.1: First Release
    Version:0.2: Added Fixes + Check Timer

    TODO: Make generated debree for space.

Raw Source Code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--Version 0.2

pos = {x=0, y=0, z=0}

local space = 1000 --value for space, change the value to however you like.

--The skybox for space, feel free to change it to however you like.
local spaceskybox = {
"sky_pos_y.png",
"sky_neg_y.png",
"sky_pos_z.png",
"sky_neg_z.png",
"sky_neg_x.png",
"sky_pos_x.png",
}

local time = 0

minetest.register_globalstep(function(dtime)
time = time + dtime
if time > 1 then for _, player in ipairs(minetest.get_connected_players()) do
time = 0

local name = player:get_player_name()
local pos = player:getpos()
 
   --If the player has reached Space
   if minetest.get_player_by_name(name) and pos.y >= space then
   player:set_physics_override(1, 0.6, 0.2) -- speed, jump, gravity
   player:set_sky({}, "skybox", spaceskybox) -- Sets skybox

   --If the player is on Earth
   elseif minetest.get_player_by_name(name) and pos.y < space then
   player:set_physics_override(1, 1, 1) -- speed, jump, gravity [default]
   player:set_sky({}, "regular", {}) -- Sets skybox, in this case it sets the skybox to it's default setting if and only if the player's Y value is less than the value of space.
      
      end
         end
            end
               end)

minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
   
   if name then
   player:set_sky({}, "regular", {})

         end
            end)
Last edited by emperor_genshin on Sat Jan 23, 2016 05:10, edited 19 times in total.
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

User avatar
fessmK
Member
 
Posts: 46
Joined: Wed Sep 25, 2013 15:56

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by fessmK » Tue Dec 22, 2015 14:41

Nice idea. You should upload the skybox images if you can. Also, make the stars more detailed, and see if you can make a second skybox with improved stars appear at night.
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Tue Dec 22, 2015 17:32

Thank you, I'll see what I can do with the skybox images. :)

fessmK wrote:Nice idea. You should upload the skybox images if you can. Also, make the stars more detailed, and see if you can make a second skybox with improved stars appear at night.


Side note: may be adding space vaccum feature on this mod later on as well, incluiding random space debree like asteroids and such to generate.
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by paramat » Wed Dec 23, 2015 05:14

'local space = ' and 'local spaceskybox = ' should be before 'register globalstep' for speed.
Also globalstep is 10 times per second, there's no need to check the y's of all players that often, add a timer or use random to check less often, once every few seconds is enough.
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Wed Dec 23, 2015 06:02

Thank you paramat, will make sure to fix that as soon as possible.

paramat wrote:'local space = ' and 'local spaceskybox = ' should be before 'register globalstep' for speed.
Also globalstep is 10 times per second, there's no need to check the y's of all players that often, add a timer or use random to check less often, once every few seconds is enough.
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DS-minetest » Sun Dec 27, 2015 20:23

i like it, i always wanted such of mod
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
davidthecreator
Member
 
Posts: 179
Joined: Mon Aug 18, 2014 19:48
In-game: DavidDoesMinetest

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by davidthecreator » Sat Jan 02, 2016 20:35

awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by Napiophelios » Sat Jan 02, 2016 21:36

This is pretty neat for space fans.
Maybe you could expand it for several ranges:
One for space
one for surface levels
one for underground
and one for the Nether

I experimented with the underground range a little.
If you rearrange the values for -200 and use solid black textures;
caves are completely dark without any "blueskies" showing in open areas.
Image Image



regsky.png
regsky.png (241.35 KiB) Viewed 3476 times
skyext.png
skyext.png (213.12 KiB) Viewed 3476 times
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Sun Jan 03, 2016 03:43

Already done that ;)

You could give it a try on minetest server snet1.thesentinelempire.com/30015

Also, great work with the experiment Napiophelios :)

Napiophelios wrote:This is pretty neat for space fans.
Maybe you could expand it for several ranges:
One for space
one for surface levels
one for underground
and one for the Nether

I experimented with the underground range a little.
If you rearrange the values for -200 and use solid black textures;
caves are completely dark without any "blueskies" showing in open areas.
Image Image



regsky.png
skyext.png


Edit: I still may need to work on this server before releasing it to the Public Server List.

Hmm, maybe I'll add that addition to the official mod, I just need more time to think about it feel free to help me decide, would this be a necessary addition? :)
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DI3HARD139 » Fri Jan 08, 2016 01:13

I'll help with the testing if you'd like. Both in Server and SP environments (Heavily and lightly modded).
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Fri Jan 08, 2016 01:52

Sure, that would be great. :)

DI3HARD139 wrote:I'll help with the testing if you'd like. Both in Server and SP environments (Heavily and lightly modded).
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DS-minetest » Mon Feb 22, 2016 18:14

TailsTheFoxDoes MT wrote:*deleted*

just copy the code in a init.lua and make textures


@emperor_genshin: can i get those textures from ur screenshots
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DI3HARD139 » Tue Feb 23, 2016 03:11

I second DS-minetest's request.
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Sat Feb 27, 2016 19:27

The Skybox textures I used as a placeholder for this mod are from Xonotic, if you want them click this link bellow.

http://opengameart.org/content/xonotic-skyboxes

The skybox textures that you are looking for is called "polluted_earth".

DS-minetest wrote:
TailsTheFoxDoes MT wrote:*deleted*

just copy the code in a init.lua and make textures


@emperor_genshin: can i get those textures from ur screenshots


DI3HARD139 wrote:I second DS-minetest's request.


NOTE: You may want to convert these files to .png for minetest.

As a side note I will work on my own skybox textures soon.
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DS-minetest » Sun Feb 28, 2016 08:03

emperor_genshin wrote:The Skybox textures I used as a placeholder for this mod are from Xonotic, if you want them click this link bellow.

http://opengameart.org/content/xonotic-skyboxes

The skybox textures that you are looking for is called "polluted_earth".

DS-minetest wrote:
TailsTheFoxDoes MT wrote:*deleted*

just copy the code in a init.lua and make textures


@emperor_genshin: can i get those textures from ur screenshots


DI3HARD139 wrote:I second DS-minetest's request.


NOTE: You may want to convert these files to .png for minetest.

As a side note I will work on my own skybox textures soon.


thx

(TailsTheFoxDoes MT's post disappeared)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by emperor_genshin » Fri Jun 03, 2016 23:55

Would be great if Minetest's skybox feature had a Fade-In/Fade-Out function when applying a change to the skybox. =/
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: [Mod][WIP] Skybox Extended [skybox_extended]

by DI3HARD139 » Tue Jun 21, 2016 03:52

I agree with that. I was playing around with some skybox textures. Namely Outer space ones and currently have 3 layers. One at 10k, 2nd at 20k and 3rd at 30k. Kind of annoying how it just jumps between textures.
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 10 guests

cron