Light definition in DEDs
Hello,
Come across something I am not sure how it works. Using Light definitions in a DED file for models.
Example, created a new model for the barrel and it only has 1 state, I add a blue glow
Light {
State = "BAR1"
Color { .3 .6 1 }
Size = 0.5
Y Offset = -5
}
Easy enough!
Problem is I now have a monster that fires a gun, I want to add a light flash so it lights a dark room up. However, for some reason the above does not work anymore. I look about and can see I need to make the state definition frame number 32768 (which means fullbright model) - not sure 'why' I need that for a light to show up, but that effect helps anyway.
However, I need to specify the light coordinates so the light sits on the end of the gun...or very near. I can specify it using 'X' and 'Y', but this only seems to move it up/down or left/right......I need to move it forward too 'Z' crashes the engine lol
Light {
State = "SPOS_STND"
Color { 1 0 0 }
Size = 0.1
x Offset = 0
Y Offset = 25
}
Also I noticed the halo (showing were the light is) seems to be in a slightly different place depending on what angle I look at it....as if its rotating from an off axis centre!
I am obviously missing out on how the light works!
The Wiki says not to use frame number 32768 anymore, but use the Flag instead such as Fullbright - is this correct....or does it not reallt matter?
So what am I doing wrong to be able to specify were the light emits from and how to use it properly.
Hope that makes sense.
Come across something I am not sure how it works. Using Light definitions in a DED file for models.
Example, created a new model for the barrel and it only has 1 state, I add a blue glow
Light {
State = "BAR1"
Color { .3 .6 1 }
Size = 0.5
Y Offset = -5
}
Easy enough!
Problem is I now have a monster that fires a gun, I want to add a light flash so it lights a dark room up. However, for some reason the above does not work anymore. I look about and can see I need to make the state definition frame number 32768 (which means fullbright model) - not sure 'why' I need that for a light to show up, but that effect helps anyway.
However, I need to specify the light coordinates so the light sits on the end of the gun...or very near. I can specify it using 'X' and 'Y', but this only seems to move it up/down or left/right......I need to move it forward too 'Z' crashes the engine lol
Light {
State = "SPOS_STND"
Color { 1 0 0 }
Size = 0.1
x Offset = 0
Y Offset = 25
}
Also I noticed the halo (showing were the light is) seems to be in a slightly different place depending on what angle I look at it....as if its rotating from an off axis centre!
I am obviously missing out on how the light works!
The Wiki says not to use frame number 32768 anymore, but use the Flag instead such as Fullbright - is this correct....or does it not reallt matter?
So what am I doing wrong to be able to specify were the light emits from and how to use it properly.
Hope that makes sense.
Comments
The mf2_always lit flag was a kludge added by Deng team back in the day, so a dlight could be added to the Doom barrel without making it's states full bright.
I made an RFE about changing this a couple of months ago:
http://sourceforge.net/tracker/?func=de ... tid=542102
As for the halo offset issue: the X and Y halo offset fields are based off world co-ordinates with 0,0 being set to the centre of the mobj; the facing angle of the mobj has no affect on them.
That clears up why it worked with the barrel, but differently with other states - handy to know too!
As for the offset, I can see now what it does. Basically if I offset it to the left, it will always show on the left of the model no matter what angle I look at it. Not sure how useful that can be, so really I am limited to offsetting it higher or lower.
Guess I can work with that, at the end of the day it is just to create a flash of light. If I really need to show a source thats offset to a specific location a light cant be moved to I could use a generator to create some kind of effect.
Cool, thanks again Vermil
Hi Gordon,
Thanks for reply. I am creating a custom monster - sort of. Its a Sentry Robot in replacement to the Zombie Guy. I am messing about with the idea of creating a sort of 'Robot' mod with full 3D replacement models and effects.
At the moment I am just researching to see if I can pull off the things I need to do to make this work. So far its working out....interesting lol
In this case I needed a gun flash to make it more realistic in dark areas. I was just trying to be exact and put the origin of the flash at the end of the gun with a little halo. I may just do it with no halo to hide the source as I cant position it that exactly, its not a deal breaker.