Partial flickering on models

I just tested the game on a nexus 10 tablet. The problem ist that some parts of the level flicker white during camera movement.

On dektop I can see small white points on the edges of the level sometimes. On the Nexus 10 some parts of the level are flickering as the following video shows:
[video]http://www.youtube.com/watch?v=jvh5i_jUT7Y[/video]

What’s the scale on the course? (Total dimensions in world units).

@mathias4himself: Really, learn to write proper support requests. This is just another “I have a piece of string in my hand, how long is it?” question.
Read this: http://www.mikeash.com/getting_answers.html (!!)

The whole scene has been scaled by a factor of 10 using the following code:
[java]
void scaleRecursively(Node node) {
boolean hasChildren = false;
for (Spatial child : node.getChildren()) {
hasChildren = true;
if (child instanceof Geometry) {
child.scale(1f * GlobalConstants.GLOBAL_SCALE);
child.setLocalTranslation(child.getLocalTranslation().mult(GlobalConstants.GLOBAL_SCALE));
} else if (child instanceof Node) {
scaleRecursively((Node) child);
}
}
if (!hasChildren) {
node.setLocalTranslation(node.getLocalTranslation().mult(GlobalConstants.GLOBAL_SCALE));
}
}
[/java]

@normen For me it doesn’t make sense to give more information about a graphical problem then making a video about it. What else do you like to know? I do consider answers and rtfm.

You didn’t answer my question mathius. Factor of 10 is relative.

I mean in world units what is the total size of your scene. The reason I ask is because android uses 16 bit floats for some things and they are a LOT less precise than 32 bit ones so you run into problems much sooner.

The total volume of the level is 69.48772 wu, calculated by level.getMesh().getBound().getVolume() after scaling.

I noticed that this value is the same before and after scaling. Did I calculate the size correctly?

I was more interested in the X and y extents, but they obviously aren’t very large if the total volume is 69wu3!

Presumably you know the size of your model?

In sketchup it is 10 x 12 meters (unscaled)

What version of the engine are you using?

well, that’s a good question. The SDK info says:

Product Version: jMonkeyEngine SDK 3.0RC2 Java: 1.7.0; Java HotSpot(TM) Server VM 21.0-b17 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (jmonkeyplatform)

I have no idea where the problem might come from.
In order to reproduce it I have made a simple project and a corresponding apk file. It just loads one scene containing the minigolf level and a rotating camera.

http://s3.amazonaws.com/jme/flickeringOnNexus10.apk
http://s3.amazonaws.com/jme/BasicGame.zip

If you run the APK file on the nexus 10 it should flicker heavily. It is also good for testing graphical problems on any other android device as well.

I hope that one of you experienced monkeys or any other experts can analyse it.

i’ll test it on my devices, but I don’t have a nexus 10 though.
I’ll let you know.

@mathias4u said: For me it doesn't make sense to give more information about a graphical problem then making a video about it. What else do you like to know? I do consider answers and rtfm.
See, *I* don't want to know anything, you do. My tip was that it does make sense for you as you are more likely to get answers if you add all information. Just showing the visual output of an application does not show how it works, else I guess you would not have to come here but just look at existing games.

In other words the video is excellent for demonstrating the problem - but it gives no information about how you are doing things “behind the scenes” which we can then use to make some suggestions as to why its producing the problem you are seeing.

So the video is good but we need more information as well.

@mathias4u said: In sketchup it is 10 x 12 meters (unscaled)

How does a meter scale to xyz units? Is one meter one unit or is one centimeter one unit?

Are you sure you dont have a duplicate model or duplicate triangles? That could cause depth fighting between the two models, but for it to show up it would need a different appearance as well.

How does a meter scale to xyz units? Is one meter one unit or is one centimeter one unit?
One meter is one worldunit. So the size is about 10 x 12 worldunits.
@nehon said: i'll test it on my devices, but I don't have a nexus 10 though. I'll let you know.

That’s great! Thank you nehon.

I tested the apk on my asus transformer and it flickers like mad…
On my nexus 4 it crashes at start (you’re probably using RC2).

I looked into the project.

First the level1 model is double sided, meaning back faces are real face which is most likely the source of your issue.
see the picture, I should not be able to see the inside of the model

Android devices often have a 16 bit depth buffer with poor precision so you probably have Z fighting between the 2 faces.
You’ll have to rework your model. If you did it in blender, try to uncheck double-sided in the mesh tab. Then import it again .

I tested your project against last SVN and it works on my nexus 4. But the flickering is still there

1 Like