Jump to content

Mystery Shadow


Cerez

Recommended Posts

Has anyone else experienced this strange problem with OpenJK (JKA SP) before?

 

shadow.jpg

 

There is a weird shadow glitch on the characters in the communications window.

 

It only happens the very first time Luke's (and Kyle's) face pops up after the Yavin2 level (end of Yavin training). It's starting to get on my nerves. I've tried everything I could think of, on multiple platforms, but it seems like it's a long-standing bug with OpenJK -- not to do with graphics cards at all. I have the source ready here, if anyone knows how to fix it, or work around it. Thanks.

Link to comment

Are you sure it's a shadow and not the model itself? You have a different Luke model from the base JKA one and the 'shadow' on Luke's face in your screenshot doesn't match his hair at all.

 

EDIT: Nevermind, I see the problem on Kyle now.

Cerez likes this
Link to comment

Yep, that was my first thought, too, but I realised it didn't matter which model I used or on which computer (graphics card) I played the game.

 

It's funny, because it makes this Luke look quite evil. Evil%20smile01.gif

 

It doesn't happen later in the game. This shadow is only apparent on their first appearance in the communications window.

 

Also, changing the shadow settings in the game doesn't affect this shadow at all, so I presume it is something on the programming side of things. It may be a small error somewhere in the code at this point that's producing it.

 

Edit: It almost looks like the lighting is somehow inverted here... Also, that line between the face and the hair is not there at all in the actual model (or at least not visible).

Link to comment

I didn't get an issue with Luke after yavin2 or kyle when starting tatooine...

 

Not even in the comms window? Before Tatooine? You should be seeing a shadow-like glitch there on both Luke and Kyle.

Link to comment

I have an NVIDIA GeForce as well. GT 520MX. And my other computer is an Intel.

 

Hmm... strange. I could almost say it's a problem with the Luke model, were it not for the fact that later in the game he appears in the comms window just fine.

 

I've tried toying with the model's shaders and skin files, but it didn't seem to make any difference.

 

I think this phantom shadow problem is there even in the default Luke and Kyle models, guys, it's just that it's not so obvious on them. I think I can see what appears some lighting distortion on your last screenshot, @@ensiform.

 

Edit: It's certainly a very peculiar visual glitch...

Link to comment

Here is a screenshot of the same Luke model later in game. 

 

http://s1.postimg.org/d6tu3tpxr/later.jpg

 

There's no glitch at this point, so it must be that there is an extra filter or something on that first comms window that's causing this phantom shadow effect...

 

In this shot it doesn't have that glitchy looking shadow, but I think something is still wrong. The left side (his right) is barely lit, while the rest of the face is shadowed.

Cerez likes this
Link to comment

What I want to know is where it's getting the light source from seeing as there's no map or dynamic lighting. Could it grab it from the last known position of the player in the last loaded map?

Cerez likes this
Link to comment

What I want to know is where it's getting the light source from seeing as there's no map or dynamic lighting. Could it grab it from the last known position of the player in the last loaded map?

 

Good point. I'm not sure, it could be. That would explain why the shadow is changing each time the mission selection interface comes up. However, the same doesn't happen in the base JKA game. I think there the lighting is either always neutral/diffused, or not there at all.

 

Worth noting that I have my cg_shadows setting set to 0 (disabled), and these shadow/lighting effects are still present, so it is likely that they are not technically a shadow.

 

Edit: I'll see if I can get a shot in of the same model after Yavin2 in the base (retail) game for comparison. Might give us a clue as to what's happening.

Link to comment

Okay, here's a screenshot of the original scene in the retail version of the game:

 

http://s30.postimg.org/45f0gzlpt/original.jpg

 

I was wrong, the original had a direct lighting source, too. One thing is clearly evident: the lighting in the comms window is completely messed up in OpenJK -- in all comms windows, as @@Kessno rightly pointed out.

 

Edit: And, yeah, it looks like the lighting source is moving around, and that's the cause of the strange shadow effects. I think you're right on, @@DT85.

 

Edit: Made a bug report: https://github.com/JACoders/OpenJK/issues/636

Link to comment

 

On detailed visual comparison, your game actually seems to have no lighting at all in the comms window, @@ensiform. I take it that you are running the latest version of OpenJK? I wonder what is different in your setup that's removed the lighting effect. Perhaps it is the older graphics card driver? I would still prefer what you have (no lighting) to what I have now (weird lighting).

Link to comment

I don't get anything on Luke, only Kyle:

 

Wow, that's something I haven't seen yet! That's as bad as my Luke, if not worse.

 

What's going on here? :huh: Why would the shadows/lighting be playing up like this only in the comms window, with completely unpredictable effects? And what makes the retail game's handling of this any different? (I've never come across something like this with the base game.)

Link to comment

So the problem with my Kyle model was because of a bad custom shader I had :P Ignore that!

 

Oh, LOL! Okay! That makes sense now. I was starting to panic! :P

 

(I saw your message on the bugtrack. Thanks. I'm trying it now.)

Link to comment

@@Xycaleth, the fix worked! Thank you so much!

 

https://github.com/JACoders/OpenJK/issues/636

 

The handling of the lighting in the comms window is now identical to the retail version of the game.

 

Is there any disadvantage to having RF_LIGHTING_ORIGIN removed?

Not that I can think of. The flag is meant to tell the renderer that the lighting origin was setup, and can be used for lighting. However, the lighting origin setup was commented out (above the line that you edited) so it was just lighting the model from a random location.

 

@@Cerez You had to manually change that line within OpenJK's source and re-compile the code?

 

@@Xycaleth I assume the fix will be applied to new versions of the OpenJK build from here on out?

I had Cerez test the fix for me because I couldn't reproduce the problem. I've added the change to the OpenJK source code now, so yes, it will be fixed in future versions of OpenJK! :)

Futuza and Cerez like this
Link to comment

@@Cerez You had to manually change that line within OpenJK's source and re-compile the code?

 

@@Xycaleth I assume the fix will be applied to new versions of the OpenJK build from here on out?

 

Yes and yes.  :winkthumb:

 

Not that I can think of. The flag is meant to tell the renderer that the lighting origin was setup, and can be used for lighting. However, the lighting origin setup was commented out (above the line that you edited) so it was just lighting the model from a random location.

 

Sounds good. I can't see any defects myself. Thanks @@Xycaleth.

 

Edit:

 

For convenience's sake, I'll post the solution/fix here:

 

In "code/ui/ui_shared.cpp", change line #7231 to read:

ent.renderfx = RF_NOSHADOW;
And recompile the game.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...