2 registered members (AndrewAMD, Ayumi),
853
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: fix the PVR issue please
[Re: fogman]
#323703
05/16/10 19:06
05/16/10 19:06
|
Joined: Sep 2006
Posts: 99 BS, Germany
Storm_Mortis
Junior Member
|
Junior Member
Joined: Sep 2006
Posts: 99
BS, Germany
|
Well actually the Page about the Lighting Engine told nothing about the issue...
The model recives PVR-Values from Models, seems to be the 2nd UV-Set, but not the Lightmap texture ... me testlightmap is white/blue - textures are terracotta/olive - player is lit terracotta/olive ...
so, if it's not meant this way, i thing we may call it a bug^^ Anyway ...
At least, its useless this way, and would be pretty cool to be useable.
Proberbly some indication would be helpful? Maybe by using the 2nd UVs, the last Skin always will be used for a Lightmap... Or some kind of cecker in Med "Ligntmap"
Don't know, but i would be very glad to finaly use this "Feature/Bug-Thingy" corect^^
it found a voice ... now it needs a body
|
|
|
Re: fix the PVR issue please
[Re: jcl]
#323795
05/17/10 14:56
05/17/10 14:56
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Is there a shorter solution than this?
if(c_trace(camera.x, vector(camera.x, camera.y, camera.z-1000), USE_POLYGON|SCAN_TEXTURE) > 0)
{
if(HIT_TARGET)
{
BMAP *bmap_;
bmap_ = ent_getskin(you, ent_status(you, 8));
var format = bmap_lock(bmap_, 0);
var pixel = pixel_for_bmap(bmap_, hit->v->u2*bmap_width(bmap_), hit->v->v2*bmap_height(bmap_));
bmap_unlock(bmap_);
pixel_to_vec(&color, NULL, format, pixel);
}
}
Because hit.u2 and hit.v2 don´t seem to have the correct values and hit.skin2 is NULL. The lightmap is displayed with the default material, thus I believe that everything is setup correctly.
|
|
|
Re: fix the PVR issue please
[Re: jcl]
#328605
06/14/10 09:34
06/14/10 09:34
|
Joined: Aug 2008
Posts: 482
bart_the_13th
Senior Member
|
Senior Member
Joined: Aug 2008
Posts: 482
|
You probably mean PRV, not PVR? This has nothing to do with models. The PRV is compiled by the map compiler from the static level lighting.
When you need your model surfaces to affect the PRV, you can import them in WED as level geometry, or use c_trace and determine the lightmap value at the hit position.
But it still not working when I load precompiled wmb to a level however I still can get the lightmap value using the c_trace.
|
|
|
|