LUA and Runninglights: problems
-
Been twiddling with some old THN scripts I pulled together, and I’ve run into some minor- issues.
First off, running lights behaving badly. When I define running_lights=“true”, I get this:
http://img163.imageshack.us/img163/1941/weirdlights.png
I’ve looked at entries elsewhere, and there doesn’t seem to be any kind of entry anywhere else in the file relating to them. I’ve tried changing the lighting flags to everything else I’ve found in Thorn.dll under different conditions, but to no avail. The current entries I have for ships are as such:
{ entity_name="l_fighter_A", type=COMPOUND, template_name="li_elite", lt_grp=0, srt_grp=0, usr_flg=0, flags=LIT_DYNAMIC, spatialprops={ pos={0,10,0}, orient={ {1,0,0},{0,1,0},{0,0,1} } }, userprops={ category="Spaceship", running_lights="true", loadout="li_n_li_elite_loadout01" } },
Secondly, I have a few general questions about lighting. Previously, I’ve taken a trial and error approach, tweaking values until I get a desirable result. However, I’d like to be able to do this more efficiently: does anyone know the meaning of the following terms in the context of lighting, and what the values in the entry below correspond to? Stuff I’m unsure about highlighted red:
{
entity_name=“Light_1”,
type=LIGHT,
template_name=“”,
lt_grp=0,
srt_grp=0,
usr_flg=0,
spatialprops={
TRUNCATED
lightprops={
on=Y,
color={255,255,255},
diffuse={0.592157,0.776471,0.901961},
specular={0,0,0},
ambient={0.058824,0.058824,0.058824},
direction={1,0,0},
range=1000000,diffuse=
cutoff=98.999977, –Twiddling with this does all sorts of weird things, really not quite sure what it means.
type=L_POINT,
theta=90, -Unknown Angle? Unsure how this relates to lighting
atten={1,0,0,0} –Attenuation?
}
}, -
Sooo- No-one here knows a thing about general lighting terms?
-
I don’t know anything at all about THN lighting, and to be honest, I really don’t anyone that would. Sorry, Ruppet
-
I can hazard a guess, but it’s probably what you already think. I’d say diffuse and ambient are the same as textures. Since the color is white, it would be diffuse supplying the actual color, probably somehow combined with ambient. I would say specular is not used. All I know about cutoff is that if it’s greater than 180, you get a warning that “phi > pi”. Presumably L_POINT is a point source (shines everywhere, like a sun) and L_DIRECT is directional (directed to one spot, like a spotlight; actually, there’s L_SPOT which probably does that). Attenuation might influence how it fades out.
-
adoxa wrote:
All I know about cutoff is that if it’s greater than 180, you get a warning that “phi > pi”.What kind of debugging interface are you using to get that?
-
adoxa wrote:
FLSpew.txt and experimentation.EDIT: Come to think of it, FL isn’t logging to FLSpew at all. Any Ideas?
-
This comes from Dev’s work on ToW. We just adopted all his stuff so don’t ask me how it all works
This is from our freelancer.ini
[Error] ;EMAURER these four should remain as set. ;log = fl-client-errors.log, 65540 ; alert all asserts log = fl-client-errors.log, -1 ; alert all errors (SEV_ERROR=1) ;EMAURER comment out lines below to vary the amount of output spew. log = $Text, 65536, 5 ; 65536 means 'don't care' about kind value. ; 5 refers to TRACE_LEVEL_5\. means report all messages ; with severity of 5 or less. lower the number, more severe ; the message. WARNINGS are at level 2\. reduce for less spew. ;log = $Text, 'I' ; incoming packet transmission ;log = $Text, 'O' ; outgoing packet transmission ;log = $Text, 'i' ; instance creation related messages (mass, MOI, equip) ;log = $Text, 'r' ; significant attitude/reputation events (show results of AdjustAttitude calls) ;log = $Text, 'a' ; detailed info regarding loading/unloading of archetypes. log = $Text, 'c' ; report server-side events sent to contollers log = $Text, 'm' ; mission-generated messages log = $Text, 's' ; log second thread activity ;log = $Text, 'f' ; report file opens/closes ;log = $Text, 'e' ; explosion/fuse messages log = $Text, 'd' ; damage messages log = $Text, 'A' ; reload console command messages ;---------------------------- ; Error explanation ; ; log = where to display log message, kind of msg, severity of msg ; where: [no default] ; $window = popup dialog ; $text = debugger window ; filename = any filename ; kind: [default = -1] ; -1 // all kinds, distinguish display based on severity. ; ERR_RENDER ='R', // Render Pipeline ; ERR_NETWORK ='n', // SERVER.DLL ; ERR_WARN ='w', // minor general problems ; ERR_SPINST ='i', // instance creation messages ; ERR_REP ='r', // log significant attitude/reputation events ; ERR_ARCH ='a', // log unloads of archetypes. ; ERR_CTRL ='c', // log server-side events sent to contollers ; ERR_MISN ='m', // mission-generated messages ; ERR_ASYNC ='s', // log second thread activity ; ERR_FILEIO ='f', // print File open/close ; ERR_ASSERT = 65540 // asserts ; severity: [ default = all severities ] ; the lower the number the more severe ; SEV_FATAL = 0 // Unrecoverable errors ; SEV_ERROR = 1 // Recoverable errors ; SEV_WARNING = 2 // Conditions which may indicate a problem, but are handled ; SEV_NOTICE = 3 // Useful messages that are in release builds. ; SEV_TRACE_1 = 4 // Information useful for debugging or determining program flow ; SEV_TRACE_2..n = 5..n // Higher traces levels indicate more verbose information