Community Forums/Showcase/BlitzSky

Krischan(Posted 2009) [#1]

I present you a derivate of my former project BlitzTiles. It is BlitzTiles without "tiles", just the cool day/night cycle with lighting usable for own projects. I added a small demo how to include it. The steering is like in BlitzTiles, reduced in some useless functions. If you need help just press F1 or "I" for runtime information.

Download [442KB ZIP]:

Like BlitzTiles, BlitzSky is completely free and published under a modified BSD-License. And BlitzSky doesn't need additional files to download and it is much smaller - just unpack and play.

Have fun!

Here some screenshots:





Hambone(Posted 2009) [#2]
Really nice work here. Thanks for sharing. Nicest sky I've seen outside of Oblivion. Ever thought of adding weather :)

Well done.

BlitzSupport(Posted 2009) [#3]
Excellent, thanks.

chi(Posted 2009) [#4]
wow!!! thank you so much for sharing... pretty good job!!! ;)

Ked(Posted 2009) [#5]
Looks amazing! Great job!

Loktar(Posted 2009) [#6]
Hey this is really fantastic, appreciate you providing us with it.

John Blackledge(Posted 2009) [#7]
Truly stunning - thanks.

SabataRH(Posted 2009) [#8]
Very nice transitions, very smooth and unnoticible. I thought the overall quality was top-notch.

Yeshu777(Posted 2009) [#9]
I just get "Texture does not exist"...

Loading the ""


Krischan(Posted 2009) [#10]
Yeshu, either update your B3D to the latest Version and/or check your graphics card driver version und update it, too.

Guy Fawkes(Posted 2009) [#11]

now to add some weather effects :D

i have just the thing!

fredborgs rain demo :D

Colonel_Klink(Posted 2009) [#12]
Thank you Christian. You have just saved me a power of work. I'm adding you to the list of contributors to my project.

puki(Posted 2010) [#13]
This is very good.

However, it still retains the dual lighting of BlitzTiles - ie, when the sun sets below the horizon, it continues to light objects and, as the moon rises as the sun sets, the moon also lights the same objects from the opposite side.

An additional check is required to turn the sun/moon off when they have set. You'll notice this is you press '9', to flip time to the point of sunset and the point of moonrise.

Personally, after '; rotate light angle and point light sources/quads to pivot/cam', I would 'kludge' the code so that the moon does not rise until the sun has set fully and the sunlight has gone (deactivated from the scene) - then you can bring the moon up. This will give a more realistic effect to back and front surfaces that have darkened (due to sunset) and then you get the frontsurface lighting instigated by the rising moon.

Realistically, sunlight overpowers and negates moonlight - ie, in real-life, when it is daytime and you can see the moon in the sky, then that moonlight is irrelevent (probably because the relection angle is wrong from our viewpoint on the earth).

I'd also push the sunrise and sunset colours deeper into orange - the current lighting colour is too subtle.

Tachyon(Posted 2010) [#14]
*wishes someone would start making these cool modules for miniB3D*

Ked(Posted 2010) [#15]
*wishes someone would start making these cool modules for miniB3D*

I think it would be better to wait for the revised MiniB3D to come out first.

Yue(Posted 2010) [#16]
Hi there if someone helps me, I'm trying to implement the sky in my project, but I have two problems, the first is to get a white box in place of the moon, and the other problem is that apparently the car appears very high intercourse around the sky.

Oiduts Studios(Posted 2010) [#17]
As far as I know Blitz Sky is not compatible with Fast extension. You could probably find another solution on the forums.

Yue(Posted 2010) [#18]
If it is a pity, does not work out that initializing Fastext white box in place of the moon.

stayne(Posted 2010) [#19]
Comment out the moon glow areas and the white box will disappear.

Yue(Posted 2010) [#20]
; Loads the textures and images
; -----------------------------------------------------------------------------------------------
Function BS_LoadMedia()
	Local s#=BS_CloudScale
	If BS_LoadMediaToVRAM Then Local vram%=256
	; Create Moonphase
	BS_Texture_MoonSphere	= BS_LoadTexture("moon.jpg"			,0+vram)
	BS_Texture_MoonQuad1	= BS_LoadTexture("moon1.png"		,2+vram)
	BS_Texture_MoonQuad2	= BS_LoadTexture("moon2.png"		,2+vram)
	; Loading Textures
	BS_Texture_Water1		= BS_LoadTexture(""		,2+8+vram,1.0/16	,1.0/16	,2)
	BS_Texture_Water2		= BS_LoadTexture(""		,2+8+vram,1.0/32	,1.0/32	,5)
	BS_Texture_Clouds1		= BS_LoadTexture(""		,2+8+vram,1.0/2		,1.0/2	,2)
	BS_Texture_Clouds2		= BS_LoadTexture(""		,2+8+vram,1.0/s		,1.0/s	,2)
	BS_Texture_Clouds3		= BS_LoadTexture(""	,2+8+vram,1.0/s		,1.0/s	,2)
	BS_Texture_Sun1			= BS_LoadTexture(""			,2+8+vram)
	BS_Texture_Sun2			= BS_LoadTexture(""			,2+8+vram)
	BS_Texture_HorizonMask	= BS_LoadTexture(""			,2+8+vram)
	BS_Texture_Sunglow1		= BS_LoadTexture(""	,2+8+vram,1			,1		,3)
	BS_Texture_Sunglow2		= BS_LoadTexture(""	,2+8+vram,1			,1		,5)
	;BS_Texture_Moonglow		= BS_LoadTexture(""		,2+8+vram,1			,1		,3)
	BS_Texture_SingleStar	= BS_LoadTexture("dot.png"			,2+8+vram)
	BS_Texture_HazeGradient	= BS_LoadTexture(""			,2+8+vram)
	; Loading Images
End Function

not exactly where you remove the glow of the moon. = (

Yue(Posted 2010) [#21]

Global BS_Hazesegments%			= 16
Global BS_SkyObjectsMulti#		= 32.0
Global BS_BrightnessMulti#		= 0   ;128.0
Global BS_MoonTextureSize%		= 512
Global BS_StarSizeMin#			= 0.02
Global BS_StarSizeMax#			= 0.03
Global BS_FixStarsProportion#	= 0.95
Global BS_StarMinBrightness%	= 64
Global BS_StarMaxBrightness%	= 255
Global BS_Stars%				= 1000
Global BS_SunInclination#		= 45.0
Global BS_MoonPhase#			= 0.0
Global BS_MoonInclination#		= 60.0
Global BS_CloudSpeed#			= 8.0
Global BS_CloudScale#			= 4.0
Global BS_SunAngle#				= 90.0
Global BS_MoonAngle#			= 90.0
Global BS_HazeHeight#			= 0.5
Global BS_ShowHaze%				= 1
Global BS_ShowSky%				= 1
Global BS_ShowStarTwinkle%		= 1
Global BS_ShowBrightness%		= 1
Global BS_Minheight#			= -10

Ok Change BS_BrightnessMulti# = 0, But the moon is very opaque, any suggestions??,

Ok conflict with Fastext points to this function:

; -----------------------------------------------------------------------------------------------
; Updates Sun Brightness FX
; -----------------------------------------------------------------------------------------------
Function BS_UpdateBrightness()
	Local sx#,sy#,sz#
	Local mx#,my#,mz#
	Local brightness#,a#,x#,y#
	; get sun quad position in 3D space
	CameraProject BS_Camera,sx,sy,sz
	; calculate 2D position of sun quad
	If x<0 Then x=0
	If y<0 Then y=0
	; exponential brightness
	; Normalize value and update sunglow quad size
	ScaleEntity BS_SunGlow,BS_BrightnessMulti*a,BS_BrightnessMulti*a,BS_BrightnessMulti*a
	; get moon quad position in 3D space
	CameraProject BS_Camera,mx,my,mz
	; calculate 2D position of sun quad
	If x<0 Then x=0
	If y<0 Then y=0
	; exponential brightness
	; Normalize value and update sunglow quad size
	ScaleEntity BS_MoonBright1,BS_BrightnessMulti*a*0.33,BS_BrightnessMulti*a*0.33,BS_BrightnessMulti*a*0.33
	ScaleEntity BS_MoonBright2,BS_BrightnessMulti*a,BS_BrightnessMulti*a,BS_BrightnessMulti*a
End Function


Last edited 2010

Yue(Posted 2012) [#22]
When you need to run Fastext + BlitzSky, you must make the following changes in

	; Moonshines
	EntityParent BS_MoonBright1,BS_MoonPivot
	PositionEntity BS_MoonBright1,-128,0,0
	EntityTexture BS_MoonBright1,BS_Texture_Sunglow2,0,1
	EntityBlend BS_MoonBright1,1
	EntityParent BS_MoonBright2,BS_MoonPivot
	PositionEntity BS_MoonBright2,-128,0,0
	EntityTexture BS_MoonBright2,BS_Texture_Sunglow2,0,1
	EntityBlend BS_MoonBright2,5   ;<<<<<< Here Problem.

Change Code.
EntityBlend BS_MoonBright2,1   ;<<<<<< Fix Problem. =)


stayne(Posted 2012) [#23]
Good job Yue

Guy Fawkes(Posted 2012) [#24]
EXCELLENT job, Yue! :D

Yue(Posted 2012) [#25]
Help, Moon x 3 Zise???