Page 1 of 2
couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 12:45 am
by Grimwold
A couple of weird lighting things I've come across in the course of adding torches etc. to my first level...
This first one shows light coming through the rock at the top left and top right sides of a wall with a dungeon door..
The second is some light bleed from a prison ceiling light in another corridor. The first image shows the corridor with the light, the second shows a parallel corridor which also seems illuminated, and the third image shows the same corridor after I have stepped forward 1 space.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 12:50 am
by spectre900
looks like at the first pic the door is missing pillars on the sides. (are you using secret/hidden doors next to that door?)
and the second one, maybe an open trap door in the roof? or you have a roof light there?
those are just guesses tho, hope someone else can provide better answers.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 1:22 am
by Grimwold
spectre900 wrote:looks like at the first pic the door is missing pillars on the sides. (are you using secret/hidden doors next to that door?)
and the second one, maybe an open trap door in the roof? or you have a roof light there?
those are just guesses tho, hope someone else can provide better answers.
Thanks for the response.. the first is just a straight corridor no secret doors nearby.
The second is on the first level, so nothing coming from above... I used a roof light in the first corridor, but was not expecting it to show through in a parallel corridor the way it does..
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 8:12 am
by guigr
I can confirm that I had the same issue. When creating a corridor not far from a prison ceiling light, the corridor would be lighted where it shouldn't but moving around would 'switch off' the light.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 8:46 am
by antti
The prison lights are located so high up that you need to add a ceiling shaft for them to work correctly.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 9:05 am
by lowzei
As for ceiling lights: How can you change the colour (properties) of a ceiling light?
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 9:32 am
by petri
lowzei wrote:As for ceiling lights: How can you change the colour (properties) of a ceiling light?
See LightSource in Asset Definition Reference.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 10:02 am
by lowzei
I'm mainly using the editor in working breaks so i didn't dig to deep into it yet, i'm still unsure how this system works. Is it like a component system where you have objects to which you can attach certain components to? If so, how do i find components attached to an entity?
Do you have a working code snippet for a proper LightSource access?
Let's say my unique ID of a ceiling lamp is named magic_stopper_1, how can i access the property lightColour of the LightSource component of this entity?
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 11:00 am
by Grimwold
lowzei wrote:Let's say my unique ID of a ceiling lamp is named magic_stopper_1, how can i access the property lightColour of the LightSource component of this entity?
Without having actually done this, from reading the official
modding helpsheets, it sounds like you would have to create a custom object with the cloneObject function.
So you would add an entry in the relevant lua file (I don't have the editor installed here so can't check which)
Code: Select all
cloneObject {
name = "prision_ceiling_lamp_purple",
baseObject = "prison_ceiling_lamp",
}
Within that cloned object you would then use the following commands to change the Position, colour etc.
LightSource:
lightPosition: a 3d vector specifying the origin of the light source in entity’s local space.
lightRange: the range of the light source in meters.
lightColor: a 3d vector specifying the RGB color of the light source in range 0-1.
brightness: scales the intensity of the light source.
castShadow: a boolean which turns dynamic shadow rendering on and off.
particleSystem: (optional) name of a particle system to attach to the light source.
placement: must always be set to “floor”.
finally, when you loaded the editor your custom ceiling light asset would be listed and you would use that to add
prision_ceiling_lamp_purple_1 to your map.
Re: couple of weird lighting things... maybe bugs.
Posted: Mon Sep 17, 2012 11:13 am
by lowzei
Thanks but i'm not sure if this would work because why can't i just access the LightSource of an existing entity like the already implemented ceiling_lamp then? Shouldn't it have just the same properties?