I vaguely remember fixing this at some point for Orange Box. Checking
the history:
In src/utils/vrad/lightmap.cpp, in this function:
bool GatherSampleLight( sampleLightOutput_t &out, directlight_t *dl, int
facenum,
Vector const& pos,
Vector *pNormals, int normalCount, int iThread,
int nLFlags,
int
static_prop_index_to_ignore,
float flEpsilon )
{
...
switch (dl->light.type)
{
case emit_point:
out.m_flFalloff = 1.0 /
(dl->light.constant_attn + dl->light.linear_attn * dist +
dl->light.quadratic_attn * dist * dist);
break;
case emit_surface:
dot2 = -DotProduct (delta,
dl->light.normal);
if (dot2 <= EQUAL_EPSILON)
return false; // behind light
surface
out.m_flFalloff = dot2 / (dist * dist);
// move the endpoint away from the
surface by epsilon to prevent hitting the surface with the trace
src += dl->light.normal * DIST_EPSILON;
break;
I fixed this by adding the line above (src += ...). The starting point
of the trace was in solid due to slightly different tracing on details
vs. non-detail brushes so this just pushes it out slightly along the
normal to avoid starting inside the brush. So the light was casting,
but the detail brushes were effectively shadowing themselves. Note that
vrad has changed a fair amount in general so it's possible that this fix
won't correct the issue by itself in the version of vrad you're using -
but it's also possible that it will fix it - and it's really likely that
the problem you are seeing will go away if you update to the new SDK
when released.
Jay
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Baker
Sent: Friday, September 28, 2007 2:20 PM
To: [email protected]
Subject: Re: [hlcoders] vrad ignores texlights on func_details
Well that's weird. All func_details are gone after vbsp is run, so vrad
should see them as world geometry. I was fooled by the file
vraddetailprops.cpp in vrad.
The problem I am seeing is that func_details with texlights painted on
them do not cast light. Anyone know why this might happen? texlights
work for brush entities and regular worldspawn geometry.
----- Original Message -----
From: "Tim Baker" <[EMAIL PROTECTED]>
> Would it be very difficult to change vrad to respect texlights on
> func_details?
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders