Blender 2.58.1 (factory settings)
JME updated to very latest (Aug 15, 8:25AM)
Ubuntu (also most up to date stable version)
Summary :
Four tests (1-4), comparing 2 separate meshes (in .obj and .j3o formats), using direct or ambient lighting. (all fail)
Two tests with materials (5-6).
Source code at bottom.
TEST 1 :
robot5.obj with robot5.mtl and rocks1.jpg in the same directory
lighting setup :
AmbientLight light_amb = new AmbientLight();
rootNode.addLight(light_amb);
spatial setup :
Spatial robot = assetManager.loadModel("Models/robot5.obj");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
(clean, build, run)
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
(resized the texture to 256x256 in gimp, clean, build, run, begin moving away, robot begins to be visible, crashes)
Output :
Building jar: /home/jason/jMonkeyProjects/BasicGame7/build/assets.jar
init:
deps-jar:
Updating property file: /home/jason/jMonkeyProjects/BasicGame7/build/built-jar.properties
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/classes
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/empty
Compiling 1 source file to /home/jason/jMonkeyProjects/BasicGame7/build/classes
compile:
run:
Aug 15, 2011 9:02:14 AM com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
Aug 15, 2011 9:02:15 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #1: file:/usr/local/jmonkeyplatform/jmonkeyplatform/libs/
Aug 15, 2011 9:02:15 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #2: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:02:15 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #3: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:02:15 AM com.jme3.system.Natives extractNativeLib
WARNING: Cannot locate native library: linux/libbulletjme.so
Aug 15, 2011 9:02:15 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.7.1
Aug 15, 2011 9:02:15 AM com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 1200 x 900 x 0 @0Hz
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: null
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 2.1.2 NVIDIA 173.14.22
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: GeForce FX 5200/AGP/SSE2
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.20 NVIDIA via Cg compiler
Aug 15, 2011 9:02:16 AM com.jme3.system.lwjgl.LwjglTimer
INFO: Timer resolution: 1,000 ticks per second
Aug 15, 2011 9:02:16 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
Aug 15, 2011 9:02:16 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
INFO: Caps: [FrameBuffer, FrameBufferMultisample, OpenGL20, OpenGL21, ARBprogram, GLSL100, GLSL110, GLSL120]
Aug 15, 2011 9:02:16 AM com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.
Aug 15, 2011 9:02:16 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:02:16 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:02:16 AM com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
Aug 15, 2011 9:02:16 AM com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
Aug 15, 2011 9:02:16 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Aug 15, 2011 9:02:16 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Aug 15, 2011 9:02:16 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 1
Aug 15, 2011 9:02:17 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Unshaded
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Gui Node)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (Statistics View) attached to this node (Gui Node)
Aug 15, 2011 9:02:17 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Phong Lighting
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader createGeometry
WARNING: OBJ mesh robot5-geom-0 doesnt contain normals! It might not display correctly
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-geom-0) attached to this node (robot5-objnode)
Aug 15, 2011 9:02:17 AM com.jme3.scene.plugins.OBJLoader createGeometry
WARNING: OBJ mesh robot5-geom-1 doesnt contain normals! It might not display correctly
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-geom-1) attached to this node (robot5-objnode)
Aug 15, 2011 9:02:17 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-objnode) attached to this node (Root Node)
Aug 15, 2011 9:02:18 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_VertexColor is not declared in shader.
Aug 15, 2011 9:02:20 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_CameraPosition is not declared in shader.
Aug 15, 2011 9:02:20 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_WorldMatrix is not declared in shader.
Aug 15, 2011 9:02:20 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_UseMaterialColors is not declared in shader.
Aug 15, 2011 9:02:21 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[language=GLSL100, numSources=2, numUniforms=15, shaderSources=[ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment]]] info:Fragment info
(126) : warning C7050: "$temp22" might be used before being initialized
Internal error: assembly compile error for fragment shader at offset 1932:
-- error message --
line 61, column 20: error: invalid operand variable
line 74, column 13: error: invalid operand variable
-- internal assembly text --
!!FP1.0
# cgc version 2.0.0018, build date Nov 8 2009 21:26:53
# command line args:
#vendor NVIDIA Corporation
#version 2.0.1.18
#profile fp30
#program main
#semantic g_LightDirection
#semantic m_AlphaDiscardThreshold
#semantic m_Shininess
#var float2 texCoord : : : -1 : 0
#var float3 AmbientSum : $vin.TEX0 : TEX0 : -1 : 1
#var float4 DiffuseSum : $vin.TEX1 : TEX1 : -1 : 1
#var float3 SpecularSum : $vin.TEX2 : TEX2 : -1 : 1
#var float4 g_LightDirection : : : -1 : 1
#var float3 vPosition : : : -1 : 0
#var float3 vViewDir : $vin.TEX3 : TEX3 : -1 : 1
#var float4 vLightDir : $vin.TEX4 : TEX4 : -1 : 1
#var float3 lightVec : $vin.TEX5 : TEX5 : -1 : 1
#var float3 vNormal : $vin.TEX6 : TEX6 : -1 : 1
#var float m_AlphaDiscardThreshold : : : -1 : 1
#var float m_Shininess : : : -1 : 1
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var 4 $kill_0000 : $vout.$kill : $kill : -1 : 0
DECLARE m_AlphaDiscardThreshold;
DECLARE g_LightDirection;
DECLARE m_Shininess;
DP3R R0.y, g_LightDirection, g_LightDirection;
RSQR R0.y, R0.y;
DP3R R0.x, f[TEX5], f[TEX5];
MULR R1.xyz, R0.y, g_LightDirection;
RSQR R0.x, R0.x;
MULR R0.xyz, R0.x, f[TEX5];
DP3R R0.x, -R0, R1;
MOVR R1.w, {0, 0, 0, 0}.x;
FRCR R0.y, g_LightDirection.w;
FLRR R0.z, g_LightDirection.w;
MADR R0.z, R0, {0.001, 0, 0, 0}.x, -R0.y;
ADDR R0.y, R0.x, -R0;
MOVR R0.x, {1, 0, 0, 0};
RCPR R0.z, R0.z;
MOVXC RC.x, g_LightDirection.w;
MULR R0.x(NE), R0.y, R0.z;
SLER H0.z, R0.x, {0, 0, 0, 0}.x;
MOVR R0.y, {0, 0, 0, 0}.x;
SNER H0.y, g_LightDirection.w, R0;
SEQX H0.x, H0.z, {0, 0, 0, 0};
MULXC HC.x, H0.y, H0;
MOVR R0.w, R0.x;
MOVR_SAT R0.w(NE.x), R0.x;
DP3R R0.y, f[TEX4], f[TEX4];
RSQR R0.y, R0.y;
MULR R1.xyz, R0.y, f[TEX4];
MOVX H0.x, {0, 0, 0, 0};
MULXC HC.y, H0, H0.z;
MOVR R0.x, {1, 0, 0, 0};
SLER H0.y, m_Shininess.x, R0.x;
MOVH H0.x(EQ.y), {1, 0, 0, 0};
MULXC HC.x, H0, H0.y;
MOVX H0.y, {0, 0, 0, 0}.x;
MOVR o[COLR].xyz, o[COLR];
DP3R R0.x, f[TEX6], f[TEX6];
RSQR R0.x, R0.x;
MOVR R1.w(EQ.x), R2.x;
MULR R0.xyz, R0.x, f[TEX6];
DP3R R2.x, R0, R1;
MOVH H0.y(EQ.x), {1, 0, 0, 0}.x;
MULR R0.xyz, -R2.x, R0;
MADR R0.xyz, -R0, {2, 0, 0, 0}.x, -R1;
DP3R R0.x, R0, f[TEX3];
MAXR R0.x, R0, {0, 0, 0, 0};
MULXC HC.x, H0, H0.y;
POWR R1.w(NE.x), R0.x, m_Shininess.x;
MOVR R0.x, o[COLR].w;
MAXR R1.x, R2, {0, 0, 0, 0};
MULR R1.y, R1.x, R1.w;
MULR R1.xy, R1, f[TEX4].w;
MULR R0.zw, R1.xyxy, R0.w;
MULR R1.xyz, f[TEX1], R0.z;
MOVXC RC.x, H0;
MOVR R0.y, f[TEX1].w;
MOVR R0.x(NE.y), f[TEX1].w;
MOVR R0.y(EQ.x), R0.x;
MOVR o[COLR].xyz(NE.y), f[TEX0];
ADDR R1.xyz, R1, f[TEX0];
MADR o[COLR].xyz(NE.x), f[TEX2], R0.w, R1;
SLTRC HC.x, f[TEX1].w, m_AlphaDiscardThreshold;
KIL NE.x;
MOVR o[COLR].w, R0.y;
END
# 62 instructions, 3 R-regs, 1 H-regs
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1108)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1143)
at com.jme3.material.Material.renderMultipassLighting(Material.java:792)
at com.jme3.material.Material.render(Material.java:1009)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:656)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:363)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:912)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:849)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1125)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1162)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:264)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:218)
at java.lang.Thread.run(Thread.java:636)
BUILD SUCCESSFUL (total time: 7 seconds)
END TEST 1
TEST 2
Same setup as test 1, but with robot5.j3o
(note : converted .obj -> .j3o with no issues)
spatial setup :
Spatial robot = assetManager.loadModel("Models/robot5.j3o");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
lighting setup :
DirectionalLight light_dir = new DirectionalLight();
light_dir.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(light_dir);
(clean, build, run)
(program starts, begin to back up, crashes when robot begins to be be visible)
Output :
Building jar: /home/jason/jMonkeyProjects/BasicGame7/build/assets.jar
init:
deps-jar:
Updating property file: /home/jason/jMonkeyProjects/BasicGame7/build/built-jar.properties
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/classes
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/empty
Compiling 1 source file to /home/jason/jMonkeyProjects/BasicGame7/build/classes
compile:
run:
Aug 15, 2011 9:07:00 AM com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
Aug 15, 2011 9:07:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #1: file:/usr/local/jmonkeyplatform/jmonkeyplatform/libs/
Aug 15, 2011 9:07:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #2: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:07:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #3: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:07:00 AM com.jme3.system.Natives extractNativeLib
WARNING: Cannot locate native library: linux/libbulletjme.so
Aug 15, 2011 9:07:01 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.7.1
Aug 15, 2011 9:07:01 AM com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 1200 x 900 x 0 @0Hz
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: null
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 2.1.2 NVIDIA 173.14.22
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: GeForce FX 5200/AGP/SSE2
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.20 NVIDIA via Cg compiler
Aug 15, 2011 9:07:02 AM com.jme3.system.lwjgl.LwjglTimer
INFO: Timer resolution: 1,000 ticks per second
Aug 15, 2011 9:07:02 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
Aug 15, 2011 9:07:02 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
INFO: Caps: [FrameBuffer, FrameBufferMultisample, OpenGL20, OpenGL21, ARBprogram, GLSL100, GLSL110, GLSL120]
Aug 15, 2011 9:07:02 AM com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.
Aug 15, 2011 9:07:02 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:07:02 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:07:02 AM com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
Aug 15, 2011 9:07:02 AM com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
Aug 15, 2011 9:07:02 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Aug 15, 2011 9:07:02 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Aug 15, 2011 9:07:02 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 1
Aug 15, 2011 9:07:02 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Unshaded
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Gui Node)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (Statistics View) attached to this node (Gui Node)
Aug 15, 2011 9:07:03 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Phong Lighting
Aug 15, 2011 9:07:03 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-objnode) attached to this node (Root Node)
Aug 15, 2011 9:07:03 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_VertexColor is not declared in shader.
Aug 15, 2011 9:07:05 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_CameraPosition is not declared in shader.
Aug 15, 2011 9:07:05 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_WorldMatrix is not declared in shader.
Aug 15, 2011 9:07:05 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_UseMaterialColors is not declared in shader.
Aug 15, 2011 9:07:05 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[language=GLSL100, numSources=2, numUniforms=15, shaderSources=[ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment]]] info:Fragment info
(126) : warning C7050: "$temp22" might be used before being initialized
Internal error: assembly compile error for fragment shader at offset 1932:
-- error message --
line 61, column 20: error: invalid operand variable
line 74, column 13: error: invalid operand variable
-- internal assembly text --
!!FP1.0
# cgc version 2.0.0018, build date Nov 8 2009 21:26:53
# command line args:
#vendor NVIDIA Corporation
#version 2.0.1.18
#profile fp30
#program main
#semantic g_LightDirection
#semantic m_AlphaDiscardThreshold
#semantic m_Shininess
#var float2 texCoord : : : -1 : 0
#var float3 AmbientSum : $vin.TEX0 : TEX0 : -1 : 1
#var float4 DiffuseSum : $vin.TEX1 : TEX1 : -1 : 1
#var float3 SpecularSum : $vin.TEX2 : TEX2 : -1 : 1
#var float4 g_LightDirection : : : -1 : 1
#var float3 vPosition : : : -1 : 0
#var float3 vViewDir : $vin.TEX3 : TEX3 : -1 : 1
#var float4 vLightDir : $vin.TEX4 : TEX4 : -1 : 1
#var float3 lightVec : $vin.TEX5 : TEX5 : -1 : 1
#var float3 vNormal : $vin.TEX6 : TEX6 : -1 : 1
#var float m_AlphaDiscardThreshold : : : -1 : 1
#var float m_Shininess : : : -1 : 1
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var 4 $kill_0000 : $vout.$kill : $kill : -1 : 0
DECLARE m_AlphaDiscardThreshold;
DECLARE g_LightDirection;
DECLARE m_Shininess;
DP3R R0.y, g_LightDirection, g_LightDirection;
RSQR R0.y, R0.y;
DP3R R0.x, f[TEX5], f[TEX5];
MULR R1.xyz, R0.y, g_LightDirection;
RSQR R0.x, R0.x;
MULR R0.xyz, R0.x, f[TEX5];
DP3R R0.x, -R0, R1;
MOVR R1.w, {0, 0, 0, 0}.x;
FRCR R0.y, g_LightDirection.w;
FLRR R0.z, g_LightDirection.w;
MADR R0.z, R0, {0.001, 0, 0, 0}.x, -R0.y;
ADDR R0.y, R0.x, -R0;
MOVR R0.x, {1, 0, 0, 0};
RCPR R0.z, R0.z;
MOVXC RC.x, g_LightDirection.w;
MULR R0.x(NE), R0.y, R0.z;
SLER H0.z, R0.x, {0, 0, 0, 0}.x;
MOVR R0.y, {0, 0, 0, 0}.x;
SNER H0.y, g_LightDirection.w, R0;
SEQX H0.x, H0.z, {0, 0, 0, 0};
MULXC HC.x, H0.y, H0;
MOVR R0.w, R0.x;
MOVR_SAT R0.w(NE.x), R0.x;
DP3R R0.y, f[TEX4], f[TEX4];
RSQR R0.y, R0.y;
MULR R1.xyz, R0.y, f[TEX4];
MOVX H0.x, {0, 0, 0, 0};
MULXC HC.y, H0, H0.z;
MOVR R0.x, {1, 0, 0, 0};
SLER H0.y, m_Shininess.x, R0.x;
MOVH H0.x(EQ.y), {1, 0, 0, 0};
MULXC HC.x, H0, H0.y;
MOVX H0.y, {0, 0, 0, 0}.x;
MOVR o[COLR].xyz, o[COLR];
DP3R R0.x, f[TEX6], f[TEX6];
RSQR R0.x, R0.x;
MOVR R1.w(EQ.x), R2.x;
MULR R0.xyz, R0.x, f[TEX6];
DP3R R2.x, R0, R1;
MOVH H0.y(EQ.x), {1, 0, 0, 0}.x;
MULR R0.xyz, -R2.x, R0;
MADR R0.xyz, -R0, {2, 0, 0, 0}.x, -R1;
DP3R R0.x, R0, f[TEX3];
MAXR R0.x, R0, {0, 0, 0, 0};
MULXC HC.x, H0, H0.y;
POWR R1.w(NE.x), R0.x, m_Shininess.x;
MOVR R0.x, o[COLR].w;
MAXR R1.x, R2, {0, 0, 0, 0};
MULR R1.y, R1.x, R1.w;
MULR R1.xy, R1, f[TEX4].w;
MULR R0.zw, R1.xyxy, R0.w;
MULR R1.xyz, f[TEX1], R0.z;
MOVXC RC.x, H0;
MOVR R0.y, f[TEX1].w;
MOVR R0.x(NE.y), f[TEX1].w;
MOVR R0.y(EQ.x), R0.x;
MOVR o[COLR].xyz(NE.y), f[TEX0];
ADDR R1.xyz, R1, f[TEX0];
MADR o[COLR].xyz(NE.x), f[TEX2], R0.w, R1;
SLTRC HC.x, f[TEX1].w, m_AlphaDiscardThreshold;
KIL NE.x;
MOVR o[COLR].w, R0.y;
END
# 62 instructions, 3 R-regs, 1 H-regs
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1108)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1143)
at com.jme3.material.Material.renderMultipassLighting(Material.java:782)
at com.jme3.material.Material.render(Material.java:1009)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:656)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:363)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:912)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:849)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1125)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1162)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:264)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:218)
at java.lang.Thread.run(Thread.java:636)
BUILD SUCCESSFUL (total time: 6 seconds)
END TEST 2
Test 3
Perhaps its the model, so I make a new blender model. It is a cube with a pink material. I load the .obj file.
spatial setup :
Spatial robot = assetManager.loadModel("Models/myCube.obj");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
lighting setup :
DirectionalLight light_dir = new DirectionalLight();
light_dir.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(light_dir);
(clean, build, run, begin to back up, crash)
Output :
Building jar: /home/jason/jMonkeyProjects/BasicGame7/build/assets.jar
init:
deps-jar:
Updating property file: /home/jason/jMonkeyProjects/BasicGame7/build/built-jar.properties
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/classes
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/empty
Compiling 1 source file to /home/jason/jMonkeyProjects/BasicGame7/build/classes
compile:
run:
Aug 15, 2011 9:22:00 AM com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
Aug 15, 2011 9:22:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #1: file:/usr/local/jmonkeyplatform/jmonkeyplatform/libs/
Aug 15, 2011 9:22:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #2: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:22:00 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #3: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:22:00 AM com.jme3.system.Natives extractNativeLib
WARNING: Cannot locate native library: linux/libbulletjme.so
Aug 15, 2011 9:22:01 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.7.1
Aug 15, 2011 9:22:01 AM com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 1200 x 900 x 0 @0Hz
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: null
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 2.1.2 NVIDIA 173.14.22
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: GeForce FX 5200/AGP/SSE2
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.20 NVIDIA via Cg compiler
Aug 15, 2011 9:22:02 AM com.jme3.system.lwjgl.LwjglTimer
INFO: Timer resolution: 1,000 ticks per second
Aug 15, 2011 9:22:02 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
Aug 15, 2011 9:22:02 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
INFO: Caps: [FrameBuffer, FrameBufferMultisample, OpenGL20, OpenGL21, ARBprogram, GLSL100, GLSL110, GLSL120]
Aug 15, 2011 9:22:03 AM com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.
Aug 15, 2011 9:22:03 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:22:03 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:22:03 AM com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
Aug 15, 2011 9:22:03 AM com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
Aug 15, 2011 9:22:03 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Aug 15, 2011 9:22:03 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Aug 15, 2011 9:22:03 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 1
Aug 15, 2011 9:22:03 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Unshaded
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Gui Node)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (Statistics View) attached to this node (Gui Node)
Aug 15, 2011 9:22:04 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Phong Lighting
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader readLine
WARNING: Unknown statement in OBJ! o
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader createGeometry
WARNING: OBJ mesh robot5-geom-0 doesnt contain normals! It might not display correctly
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-geom-0) attached to this node (robot5-objnode)
Aug 15, 2011 9:22:04 AM com.jme3.scene.plugins.OBJLoader createGeometry
WARNING: OBJ mesh robot5-geom-1 doesnt contain normals! It might not display correctly
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-geom-1) attached to this node (robot5-objnode)
Aug 15, 2011 9:22:04 AM com.jme3.scene.Node attachChild
INFO: Child (robot5-objnode) attached to this node (Root Node)
Aug 15, 2011 9:22:05 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_VertexColor is not declared in shader.
Aug 15, 2011 9:22:08 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_CameraPosition is not declared in shader.
Aug 15, 2011 9:22:08 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform g_WorldMatrix is not declared in shader.
Aug 15, 2011 9:22:08 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation
INFO: Uniform m_UseMaterialColors is not declared in shader.
Aug 15, 2011 9:22:08 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[language=GLSL100, numSources=2, numUniforms=15, shaderSources=[ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment]]] info:Fragment info
(126) : warning C7050: "$temp22" might be used before being initialized
Internal error: assembly compile error for fragment shader at offset 1932:
-- error message --
line 61, column 20: error: invalid operand variable
line 74, column 13: error: invalid operand variable
-- internal assembly text --
!!FP1.0
# cgc version 2.0.0018, build date Nov 8 2009 21:26:53
# command line args:
#vendor NVIDIA Corporation
#version 2.0.1.18
#profile fp30
#program main
#semantic g_LightDirection
#semantic m_AlphaDiscardThreshold
#semantic m_Shininess
#var float2 texCoord : : : -1 : 0
#var float3 AmbientSum : $vin.TEX0 : TEX0 : -1 : 1
#var float4 DiffuseSum : $vin.TEX1 : TEX1 : -1 : 1
#var float3 SpecularSum : $vin.TEX2 : TEX2 : -1 : 1
#var float4 g_LightDirection : : : -1 : 1
#var float3 vPosition : : : -1 : 0
#var float3 vViewDir : $vin.TEX3 : TEX3 : -1 : 1
#var float4 vLightDir : $vin.TEX4 : TEX4 : -1 : 1
#var float3 lightVec : $vin.TEX5 : TEX5 : -1 : 1
#var float3 vNormal : $vin.TEX6 : TEX6 : -1 : 1
#var float m_AlphaDiscardThreshold : : : -1 : 1
#var float m_Shininess : : : -1 : 1
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var 4 $kill_0000 : $vout.$kill : $kill : -1 : 0
DECLARE m_AlphaDiscardThreshold;
DECLARE g_LightDirection;
DECLARE m_Shininess;
DP3R R0.y, g_LightDirection, g_LightDirection;
RSQR R0.y, R0.y;
DP3R R0.x, f[TEX5], f[TEX5];
MULR R1.xyz, R0.y, g_LightDirection;
RSQR R0.x, R0.x;
MULR R0.xyz, R0.x, f[TEX5];
DP3R R0.x, -R0, R1;
MOVR R1.w, {0, 0, 0, 0}.x;
FRCR R0.y, g_LightDirection.w;
FLRR R0.z, g_LightDirection.w;
MADR R0.z, R0, {0.001, 0, 0, 0}.x, -R0.y;
ADDR R0.y, R0.x, -R0;
MOVR R0.x, {1, 0, 0, 0};
RCPR R0.z, R0.z;
MOVXC RC.x, g_LightDirection.w;
MULR R0.x(NE), R0.y, R0.z;
SLER H0.z, R0.x, {0, 0, 0, 0}.x;
MOVR R0.y, {0, 0, 0, 0}.x;
SNER H0.y, g_LightDirection.w, R0;
SEQX H0.x, H0.z, {0, 0, 0, 0};
MULXC HC.x, H0.y, H0;
MOVR R0.w, R0.x;
MOVR_SAT R0.w(NE.x), R0.x;
DP3R R0.y, f[TEX4], f[TEX4];
RSQR R0.y, R0.y;
MULR R1.xyz, R0.y, f[TEX4];
MOVX H0.x, {0, 0, 0, 0};
MULXC HC.y, H0, H0.z;
MOVR R0.x, {1, 0, 0, 0};
SLER H0.y, m_Shininess.x, R0.x;
MOVH H0.x(EQ.y), {1, 0, 0, 0};
MULXC HC.x, H0, H0.y;
MOVX H0.y, {0, 0, 0, 0}.x;
MOVR o[COLR].xyz, o[COLR];
DP3R R0.x, f[TEX6], f[TEX6];
RSQR R0.x, R0.x;
MOVR R1.w(EQ.x), R2.x;
MULR R0.xyz, R0.x, f[TEX6];
DP3R R2.x, R0, R1;
MOVH H0.y(EQ.x), {1, 0, 0, 0}.x;
MULR R0.xyz, -R2.x, R0;
MADR R0.xyz, -R0, {2, 0, 0, 0}.x, -R1;
DP3R R0.x, R0, f[TEX3];
MAXR R0.x, R0, {0, 0, 0, 0};
MULXC HC.x, H0, H0.y;
POWR R1.w(NE.x), R0.x, m_Shininess.x;
MOVR R0.x, o[COLR].w;
MAXR R1.x, R2, {0, 0, 0, 0};
MULR R1.y, R1.x, R1.w;
MULR R1.xy, R1, f[TEX4].w;
MULR R0.zw, R1.xyxy, R0.w;
MULR R1.xyz, f[TEX1], R0.z;
MOVXC RC.x, H0;
MOVR R0.y, f[TEX1].w;
MOVR R0.x(NE.y), f[TEX1].w;
MOVR R0.y(EQ.x), R0.x;
MOVR o[COLR].xyz(NE.y), f[TEX0];
ADDR R1.xyz, R1, f[TEX0];
MADR o[COLR].xyz(NE.x), f[TEX2], R0.w, R1;
SLTRC HC.x, f[TEX1].w, m_AlphaDiscardThreshold;
KIL NE.x;
MOVR o[COLR].w, R0.y;
END
# 62 instructions, 3 R-regs, 1 H-regs
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1108)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1143)
at com.jme3.material.Material.renderMultipassLighting(Material.java:782)
at com.jme3.material.Material.render(Material.java:1009)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:656)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:363)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:912)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:849)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1125)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1162)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:264)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:218)
at java.lang.Thread.run(Thread.java:636)
BUILD SUCCESSFUL (total time: 10 seconds)
END TEST 3
Test 4
Same as test 3, but I load the cube after converting it to .j3o.
Spatial setup :
Spatial robot = assetManager.loadModel("Models/myCube.j3o");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
Lighting setup :
DirectionalLight light_dir = new DirectionalLight();
light_dir.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(light_dir);
(clean, build, run, begin to back up, insta crash)
(note : I think its insta crash because the model is visible before you back up some)
Output :
Building jar: /home/jason/jMonkeyProjects/BasicGame7/build/assets.jar
init:
deps-jar:
Updating property file: /home/jason/jMonkeyProjects/BasicGame7/build/built-jar.properties
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/classes
Created dir: /home/jason/jMonkeyProjects/BasicGame7/build/empty
Compiling 1 source file to /home/jason/jMonkeyProjects/BasicGame7/build/classes
compile:
run:
Aug 15, 2011 9:26:16 AM com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
Aug 15, 2011 9:26:16 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #1: file:/usr/local/jmonkeyplatform/jmonkeyplatform/libs/
Aug 15, 2011 9:26:16 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #2: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:26:16 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #3: /home/jason/jMonkeyProjects/BasicGame7
Aug 15, 2011 9:26:16 AM com.jme3.system.Natives extractNativeLib
WARNING: Cannot locate native library: linux/libbulletjme.so
Aug 15, 2011 9:26:16 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.7.1
Aug 15, 2011 9:26:16 AM com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 1200 x 900 x 0 @0Hz
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: null
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 2.1.2 NVIDIA 173.14.22
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: GeForce FX 5200/AGP/SSE2
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.20 NVIDIA via Cg compiler
Aug 15, 2011 9:26:17 AM com.jme3.system.lwjgl.LwjglTimer
INFO: Timer resolution: 1,000 ticks per second
Aug 15, 2011 9:26:17 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
Aug 15, 2011 9:26:17 AM com.jme3.renderer.lwjgl.LwjglRenderer initialize
INFO: Caps: [FrameBuffer, FrameBufferMultisample, OpenGL20, OpenGL21, ARBprogram, GLSL100, GLSL110, GLSL120]
Aug 15, 2011 9:26:18 AM com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.
Aug 15, 2011 9:26:18 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:26:18 AM com.jme3.renderer.Camera
INFO: Camera created (W: 1,200, H: 900)
Aug 15, 2011 9:26:18 AM com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
Aug 15, 2011 9:26:18 AM com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
Aug 15, 2011 9:26:18 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Aug 15, 2011 9:26:18 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Aug 15, 2011 9:26:18 AM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 1
Aug 15, 2011 9:26:18 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Unshaded
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Gui Node)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (null) attached to this node (Statistics View)
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (Statistics View) attached to this node (Gui Node)
Aug 15, 2011 9:26:18 AM com.jme3.material.MaterialDef
INFO: Loaded material definition: Phong Lighting
Aug 15, 2011 9:26:18 AM com.jme3.scene.Node attachChild
INFO: Child (myCube-geom-0) attached to this node (Root Node)
Aug 15, 2011 9:26:19 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[language=GLSL100, numSources=2, numUniforms=15, shaderSources=[ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment]]] info:Fragment info
(126) : warning C7050: "$temp22" might be used before being initialized
Internal error: assembly compile error for fragment shader at offset 1932:
-- error message --
line 61, column 20: error: invalid operand variable
line 74, column 13: error: invalid operand variable
-- internal assembly text --
!!FP1.0
# cgc version 2.0.0018, build date Nov 8 2009 21:26:53
# command line args:
#vendor NVIDIA Corporation
#version 2.0.1.18
#profile fp30
#program main
#semantic g_LightDirection
#semantic m_AlphaDiscardThreshold
#semantic m_Shininess
#var float2 texCoord : : : -1 : 0
#var float3 AmbientSum : $vin.TEX0 : TEX0 : -1 : 1
#var float4 DiffuseSum : $vin.TEX1 : TEX1 : -1 : 1
#var float3 SpecularSum : $vin.TEX2 : TEX2 : -1 : 1
#var float4 g_LightDirection : : : -1 : 1
#var float3 vPosition : : : -1 : 0
#var float3 vViewDir : $vin.TEX3 : TEX3 : -1 : 1
#var float4 vLightDir : $vin.TEX4 : TEX4 : -1 : 1
#var float3 lightVec : $vin.TEX5 : TEX5 : -1 : 1
#var float3 vNormal : $vin.TEX6 : TEX6 : -1 : 1
#var float m_AlphaDiscardThreshold : : : -1 : 1
#var float m_Shininess : : : -1 : 1
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var 4 $kill_0000 : $vout.$kill : $kill : -1 : 0
DECLARE m_AlphaDiscardThreshold;
DECLARE g_LightDirection;
DECLARE m_Shininess;
DP3R R0.y, g_LightDirection, g_LightDirection;
RSQR R0.y, R0.y;
DP3R R0.x, f[TEX5], f[TEX5];
MULR R1.xyz, R0.y, g_LightDirection;
RSQR R0.x, R0.x;
MULR R0.xyz, R0.x, f[TEX5];
DP3R R0.x, -R0, R1;
MOVR R1.w, {0, 0, 0, 0}.x;
FRCR R0.y, g_LightDirection.w;
FLRR R0.z, g_LightDirection.w;
MADR R0.z, R0, {0.001, 0, 0, 0}.x, -R0.y;
ADDR R0.y, R0.x, -R0;
MOVR R0.x, {1, 0, 0, 0};
RCPR R0.z, R0.z;
MOVXC RC.x, g_LightDirection.w;
MULR R0.x(NE), R0.y, R0.z;
SLER H0.z, R0.x, {0, 0, 0, 0}.x;
MOVR R0.y, {0, 0, 0, 0}.x;
SNER H0.y, g_LightDirection.w, R0;
SEQX H0.x, H0.z, {0, 0, 0, 0};
MULXC HC.x, H0.y, H0;
MOVR R0.w, R0.x;
MOVR_SAT R0.w(NE.x), R0.x;
DP3R R0.y, f[TEX4], f[TEX4];
RSQR R0.y, R0.y;
MULR R1.xyz, R0.y, f[TEX4];
MOVX H0.x, {0, 0, 0, 0};
MULXC HC.y, H0, H0.z;
MOVR R0.x, {1, 0, 0, 0};
SLER H0.y, m_Shininess.x, R0.x;
MOVH H0.x(EQ.y), {1, 0, 0, 0};
MULXC HC.x, H0, H0.y;
MOVX H0.y, {0, 0, 0, 0}.x;
MOVR o[COLR].xyz, o[COLR];
DP3R R0.x, f[TEX6], f[TEX6];
RSQR R0.x, R0.x;
MOVR R1.w(EQ.x), R2.x;
MULR R0.xyz, R0.x, f[TEX6];
DP3R R2.x, R0, R1;
MOVH H0.y(EQ.x), {1, 0, 0, 0}.x;
MULR R0.xyz, -R2.x, R0;
MADR R0.xyz, -R0, {2, 0, 0, 0}.x, -R1;
DP3R R0.x, R0, f[TEX3];
MAXR R0.x, R0, {0, 0, 0, 0};
MULXC HC.x, H0, H0.y;
POWR R1.w(NE.x), R0.x, m_Shininess.x;
MOVR R0.x, o[COLR].w;
MAXR R1.x, R2, {0, 0, 0, 0};
MULR R1.y, R1.x, R1.w;
MULR R1.xy, R1, f[TEX4].w;
MULR R0.zw, R1.xyxy, R0.w;
MULR R1.xyz, f[TEX1], R0.z;
MOVXC RC.x, H0;
MOVR R0.y, f[TEX1].w;
MOVR R0.x(NE.y), f[TEX1].w;
MOVR R0.y(EQ.x), R0.x;
MOVR o[COLR].xyz(NE.y), f[TEX0];
ADDR R1.xyz, R1, f[TEX0];
MADR o[COLR].xyz(NE.x), f[TEX2], R0.w, R1;
SLTRC HC.x, f[TEX1].w, m_AlphaDiscardThreshold;
KIL NE.x;
MOVR o[COLR].w, R0.y;
END
# 62 instructions, 3 R-regs, 1 H-regs
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1108)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1143)
at com.jme3.material.Material.renderMultipassLighting(Material.java:782)
at com.jme3.material.Material.render(Material.java:1009)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:656)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:363)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:912)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:849)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1125)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1162)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:264)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:218)
at java.lang.Thread.run(Thread.java:636)
BUILD SUCCESSFUL (total time: 5 seconds)
END TEST 4
Test 5
What happens if I load myCube.j3o and manually set the material?
Setup :
Spatial robot = assetManager.loadModel("Models/myCube.j3o");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
robot.setMaterial(mat);
rootNode.attachChild(robot);
DirectionalLight light_dir = new DirectionalLight();
light_dir.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(light_dir);
(clean, build, run)
Result :
Untextured, white cube.
END TEST 5
Test 6 :
What happens if I set the material to the .mat file when loading the .obj? (I thought loading the model took care of loading the material automagically, but Im currious how this will turn out anyway)
Setup :
Spatial robot = assetManager.loadModel("Models/myCube.obj");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
robot.setLocalTranslation(0f,0f,0f);
Material mat = new Material(assetManager, "Models/myCube.mtl");
robot.setMaterial(mat);
rootNode.attachChild(robot);
Output :
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ClassCastException: com.jme3.material.MaterialList cannot be cast to com.jme3.material.MaterialDef
(aparently, .mtl is a MaterialList)
END TEST 6
----SOURCE CODE
[java]package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;
import com.jme3.math.FastMath;
import com.jme3.system.AppSettings;
import com.jme3.light.*;
/**
* test
* @author normenhansen //HI NORMEN!
*/
public class Main extends SimpleApplication {
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);//leave this true
settings.setResolution(1200,900);
settings.setTitle("Hi there");
Main app = new Main();
app.setSettings(settings);
app.setShowSettings(false);
app.start();
}
@Override
public void simpleInitApp() {
viewPort.setBackgroundColor(ColorRGBA.Blue);
Spatial robot = assetManager.loadModel("Models/robot5.j3o");
robot.scale(1f, 1f, 1f);
robot.rotate(0f,FastMath.PI,0f);
//robot.setLocalTranslation(0f,-30f,-60f);
robot.setLocalTranslation(0f,0f,0f);
//Material mat = new Material(assetManager, "Models/target.mtl");
//Material mat = new Material(
// assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
//mat.setTexture("ColorMap",
// assetManager.loadTexture("Textures/bluetiles1.jpg"));
//disc.setMaterial(mat);
rootNode.attachChild(robot);
DirectionalLight light_dir = new DirectionalLight();
light_dir.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(light_dir);
//AmbientLight light_amb = new AmbientLight();
//rootNode.addLight(light_amb);
flyCam.setMoveSpeed(70);
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}[/java]