Offset of actor/dynamic light - not currently useful IMO
Moderator: Graf Zahl
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Offset of actor/dynamic light - not currently useful IMO
I just got through making a model of a street lamp. You know the kind, the pole goes upwards and the lamp sticks out in front of the pole on the end of a boom.
So, the model looks fine and I want to attach a dynamic light to it. I define the dynamic light and set it to be offset in front of the object so that it sits below the light source, rather than the vertical pole. I look at it in my test map and it looks perfect.
So, I go and throw the lamp actor liberally around a map and then play the map. OH GNO! Some lamps have the pool of light in front of them, some to the side and some behind.
It would seem that the dynamic light definition offset values for NESW are absolute rather than relative to the facing of the actor. Frankly, I can't think of a situation where that would be useful.
Is there already a way around this (e.g. a flag of some sort to make the light relative to the actor - I couldn't see such an option) or could this please be added/fixed? I'd rather not have to go around placing a map object light in front of every actor, especially as at some point I will need lights that change with the frame of the actor.
Thanks
So, the model looks fine and I want to attach a dynamic light to it. I define the dynamic light and set it to be offset in front of the object so that it sits below the light source, rather than the vertical pole. I look at it in my test map and it looks perfect.
So, I go and throw the lamp actor liberally around a map and then play the map. OH GNO! Some lamps have the pool of light in front of them, some to the side and some behind.
It would seem that the dynamic light definition offset values for NESW are absolute rather than relative to the facing of the actor. Frankly, I can't think of a situation where that would be useful.
Is there already a way around this (e.g. a flag of some sort to make the light relative to the actor - I couldn't see such an option) or could this please be added/fixed? I'd rather not have to go around placing a map object light in front of every actor, especially as at some point I will need lights that change with the frame of the actor.
Thanks
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Boingo the Clown
- Posts: 102
- Joined: Sat Dec 03, 2005 17:40
- Location: North of New York, West of Montreal, East of Toronto, and South of Hell
- Contact:
If you don't mind using a brute force solution, you could try doing four versions of your pole facing in four directions, each with its own light.
It is not very elegant, but it would work.
Another possibility is to have the dynamic light attached to an invisible object instead of the lamp itself, and place the invisible object manually where you want the light to be.
Again, not a very elegant solution, but better than having to wait for the next version of GZDooM to come out.
It is not very elegant, but it would work.
Another possibility is to have the dynamic light attached to an invisible object instead of the lamp itself, and place the invisible object manually where you want the light to be.
Again, not a very elegant solution, but better than having to wait for the next version of GZDooM to come out.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
You know, the best "change the objects" solution is to simply modify the sprite offset so that the light source is centered; then you can have the dynamic light offset be purely vertical -- those work.Boingo the Clown wrote:Again, not a very elegant solution, but better than having to wait for the next version of GZDooM to come out.
The only downside is that it'll look like the lamp's pole is moving in circle when you circlestrafe around it...
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
That and the fact that bit that blocks the player's movement would apparently be some invisible entity about 4 feet in front of the pole. The pole, on the other hand - for some strange reason - would allow you to walk right through it.Gez wrote:The only downside is that it'll look like the lamp's pole is moving in circle when you circlestrafe around it...

- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
OK, I'm just browsing through the bugs to see if any have been put to bed and not actually moved out of the forum. I used the following to test this particular one:
[spoiler][/spoiler]
And I thought it might be a useful test for anyone who might want to see the effect. Just load it up as a text file and watch the glow to the side of the zombies in map01. The glow is always relative to their position, not their facing.
Also, I'm not sure if even the offset is correct relative to the position of the actor. The above example, by my reading of the docs, should offset the position of the light by 64 units in the X direction only. However, the light seems to constantly be to the South East of the actor. Is that my mistake or is that not working correctly either?
[spoiler]
Code: Select all
pointlight test
{
color 1.0 1.0 1.0
size 32
offset 64 0 0
}
object Zombieman
{
frame POSS { light test }
}
And I thought it might be a useful test for anyone who might want to see the effect. Just load it up as a text file and watch the glow to the side of the zombies in map01. The glow is always relative to their position, not their facing.
Also, I'm not sure if even the offset is correct relative to the position of the actor. The above example, by my reading of the docs, should offset the position of the light by 64 units in the X direction only. However, the light seems to constantly be to the South East of the actor. Is that my mistake or is that not working correctly either?
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact: