how to define a texture for a custom sky

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

how to define a texture for a custom sky

Post by bongobeat »

Hello there,

somebody knows what size or dimensions should have a texture for a custom sky?
how to define correctly the texture material?
I guess the textures shoul be at least, a 360° texture?
how can I remove the halo light from the sun? and keep the "halo" light of the nightsky which looks better?

Before all, I did no want a "real" custom sky. I want to make a planeterium, that show some space photography, so I think the best way to do it is to use a sky. In the other way I have modified the sky.model into a big dome, that shows the textures, but the render is not realy good. Or I have to set a very big texture.
e.g. a 1024x1024 texture is not nice on this dome, and the dome is not so big, it takes 5x5 squares. that's why actually I have a 4096x2048 texture. Which is pretty big.

ok, let's go back to the sky:
here is what the sky looks with a custom textures, of 4096x2048 (4096 - height and 2048 - width)
SpoilerShow
Image
even if I uncheck all things of the sky (in the editor), except model and sky: I have always some kind of white fog everywhere. And when the night comes, the ambient light is still better.

here is all definitions:
SpoilerShow

Code: Select all

defineObject{
	name = "planetarium01",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/planetarium01box.fbx",
			sortOffset = 200000,	-- force water rendering before other transparent surfaces
			renderHack = "Sky",
		},
		{
			class = "Model",
			name = "nightSky",
--			model = "assets/models/env/sky.fbx",
                        model = "mod_assets/models/planetarium01box.fbx",
--			material = "night_sky",
			sortOffset = 199999,	-- force water rendering before other transparent surfaces
			renderHack = "Sky",
		},
		{
			class = "Model",
			name = "stars",
			model = "assets/models/env/stars.fbx",
			sortOffset = 199998,	-- stars are rendered after night sky
			renderHack = "Sky",
		},
		{
			class = "Light",
			type = "directional",
			castShadow = true,
		},
		{
			class = "Light",
			name = "ambient",
			type = "ambient",
		},
		{
			class = "Sky",
			--farClip = 1000,
		},
		{
			class = "LensFlare",
		},
	},
	placement = "floor",
	editorIcon = 100,
	reflectionMode = "always",
}
the material:
SpoilerShow

Code: Select all

defineMaterial{
		name = "planetarium_box",
		diffuseMap = "mod_assets/textures/planetarium04.tga",
		doubleSided = false,
		lighting = false,
		alphaTest = false,
		blendMode = "Translucent",
		textureAddressMode = "Wrap",
		glossiness = 30,
		depthBias = 0,
--		shader = "sky",
	}
I have remove the "shader = "sky", ", because if I let it, the texture is not rendered:
SpoilerShow
Image
please can someone help?
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply