Flag Rush - blue flag

I'm going through the tutorials in an effort to learn jME and I notice that the backside of the flag has a blue sheen to it. (It's the same with jME's test version so it's not a typo of mine.)

Both sides look normal if I take the flag code and stick it into a simpleGame or baseGame by itself. After some experimenting it seems the blue color appears when the player vehicle is on screen at the same time as the flag (and afterwards), but I can't see why that should be the case…

Anyone have any idea what causes this?


I’ve tried replacing the bike model (3ds and jme) with a box and the char.3ds that comes with jME in a test project. In both cases the blue colour on the backside of the flag does not appear.

So it seems there is something specific about the bike model that is the cause? Any ideas? I’m sure I can’t be the first person to notice this.

Picture from jmetest’s flag rush lesson 9:

Bigger picture:


I am just guessing, but this looks like the kind of behaviour that occurs when we forget to call updateRenderState() on a node after loading it and applying textures or other RenderStates to it.

Just in case, make sure that updateRenderState() and updateGeometricState() are called on every node.


Having gone through the code I was unable to figure out where the problem lies. And a liberal sprinkling of update functions made no difference.

But I must say I find it quite strange that things can appear to work with some 3d models and fail with others. -Seems like a recipe for hard to track down bugs.

I seriously hope jME3 will do away with all this boilerplate code…

So where is the problem? You figured out the model is the problem! The blue light looks for me like some ambient-light that comes from somewhere (maybe the model, don't know about sideeffects of the 3ds-importer!?). But if replacing solves the problem, where is your problem? You won't use the model, so what?

BTW: Boilerplate code? What do you mean with that?

The problem is I'm trying to learn this stuff. And I didn't know if it was a problem with a somehow corrupt model, a bug or if it was a renderstate or other update that I had overlooked. If the tutorials do things incorrectly it makes learning so much harder.

While I'm not going to use this model for anything beyond this tutorial I had to ask myself if this problem would turn up with other models, or if there was something fundamental about the update functions I had missed.

Looking at the picture in the wiki it seems the flag used to be white on both sides


so it seems has been lost in the transition between jme1 and 2.

It seems you were right about the ambient light. Setting LightCombineMode.Off seems to fix the issue :slight_smile:

Thanks for the tip.

EDIT: It seems I spoke too soon. It made the blue go away, but by making the flag a flat white. Oh well, back to exploring…

In any case I feel it would be worthwhile to fix what is generally held to be the best jme tutorial. Bugs in the tutorial along with jme1 code in the jme2 version of the tutorial is bound to give a bad impression of the JME.

From wikipedia's definition of boilerplate code: "In computer programming, boilerplate is the term used to describe sections of code that have to be included in many places with little or no alteration." -What I mean by it is basically all those update functions that we have to include; updateRenderState, updateModelBound etc. along with a certain lack of convenience functions. I gather ardor3d is cutting down on those, and feel we would do well to follow suit.