Imported .obj model flickering

Hello all,



I just started using JME3. After the frustrating task of trying to export OgreXML files from blender 2.62, I decided to just go with the .obj export.

I import the model using the following code:

[java]

Spatial test;

[…]

DirectionalLight dl = new DirectionalLight();

dl.setDirection(new Vector3f(-2f, -2f, -2f).normalizeLocal());

rootNode.addLight(dl);



test = assetManager.loadModel(“Models/Tiles/default0/default.obj”);

test.setLocalScale(0.5f);



rootNode.attachChild(test);

[/java]

I then run and go with the default settings. However, although I can see the model, it flickers really fast. It doesn’t seem to matter where i put the light source or what the model looks like. (Except for two-dimensional models, I cannot see those at all.)



As mentioned, I’m really new to this, so I figure I must be making some beginner’s mistake. I tried Google, but without success. Thanks for your time!



Sincerely

Arivor

Stupid question, but did you watch Export from Blender?



The link is listed under Drag & Drop Help on the right side of the screen.

Can you describe the flickering better? Maybe with a screenshot or video?

@t0neg0d said:
Stupid question, but did you watch Export from Blender?

The link is listed under Drag & Drop Help on the right side of the screen.

That's not a stupid question, it's one that has to be asked. I knew that video, but unfortunately there doesn't seem to be an OgreXML plugin for blender 2.62.

@Lockhead said:
Can you describe the flickering better? Maybe with a screenshot or video?

Okay, I tried three different screen cast programs, and none of them were able to capture the jmonkey window. KSnapshot doesn't see it either. I'm stumped.
For testing, I took the default cube from blender. It flickers in that it goes from a plain grey square to a color gradient: The upper left is light grey, and to the right and down that changes to black. Plain color and gradient alternate by shading off into each other. When rotating the cube, you can see the very same behavior on all the sides.
Sorry, I dunno how to describe it better. Hope that's at least a little understandable?

Okay, back to checking out screen capture programs. One of those has to work!

Sincerely
Arivor

just do [java]stateManager.attach(new VideoRecorderAppState());[/java] in simpleInit(); it will record for you



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:capture_audio_video_to_a_file

@wezrule said:
just do [java]stateManager.attach(new VideoRecorderAppState());[/java] in simpleInit(); it will record for you

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:capture_audio_video_to_a_file

Okay, you can tell I'm a noob ;)
So here's the video:
http://www.youtube.com/watch?v=c3pTs8_qAs8&feature=youtu.be


Sincerely
Arivor

Can you post a test case showing the issue?

Have you tried just creating a cube using the JME3 primitives and dropping that in your scene? That will confirm whether it’s something to do with the model or something else.

As that cube is imported and you use lighting, try generating tangents for it (using TangentBinormalGenerator).