Page 1 of 1

Make a Light Object

Posted: Sun Jan 25, 2015 10:39 am
by Eleven Warrior
Hi all.

Ok I just want to make full square Black Dark Light Box. The code below was from LOG 1 and I need to have this object in LOG 2

Code: Select all

defineObject{
	name = "dark_square",
	class = "LightSource",
	lightPosition = vec(0, 1.4, 0),
	lightRange = 2.6,
	lightColor = vec(-1, -1, -1),
	brightness = 100, ---was 200 ---
	castShadow = false,
	placement = "floor",
	editorIcon = 88,
}
I know it's probably easy, but can someone please rewrite this code for me thank you :) I need this for a Wallset.

Re: Make a Light Object

Posted: Sun Jan 25, 2015 10:58 am
by minmay
Note: I strongly disapprove of using this object. Light with negative colours causes terrible rendering behaviour, such as max-value pixels appearing around the edges. In particular the OpenGL and DirectX versions of Legend of Grimrock 1 rendered negative lights completely differently and the OpenGL version made them look even more absolutely terrible than they already do (instead of turning textures black they would wrap around and turn them white). The only use of negative light I have seen so far that I did not hate was Ancylus' "Hall of Inversion" room in ORRR2, because it used them in a very specific (and ingenious) way that avoided the rendering issues.
But I'm providing it anyway since otherwise someone else will probably make an even worse version of it.

Code: Select all

defineObject{
	name = "dark_square",
	components = {
		{
			class = "Light",
			offset = vec(0, 1.4, 0),
			range = 2.6,
			color = vec(-1,-1,-1),
			brightness = 100,
			castShadow = false,
		},
	},
	placement = "floor",
	editorIcon = 88,
}

Re: Make a Light Object

Posted: Sun Jan 25, 2015 11:10 pm
by Eleven Warrior
Yep I agree it does look bad. The object has a purple edge around it not good. I did find it useful in LOG 1 for a hallway where you had to feel the walls for a secret button but, even then it was strange. Ohh well in the garbage can it goes thxs anyway Minmay :)