Problems with textures

Hi,



i cant get textures work properly.



I always get warnings for the shader:



WARNUNG LwjglRenderer 14:10:12 Uniform m_SphereMap is not declared in shader.

WARNUNG LwjglRenderer 14:10:12 Uniform m_Texture is not declared in shader.

WARNUNG LwjglRenderer 14:10:12 Uniform m_VertexColor is not declared in shader.



Thanks for any hints.

My system is a win/xp with an ati x1950 xt with latest driver

Can you post the jme.log file inside your project directory? Also, the source code that you're trying to run.

The jme.log is:



INFO JmeSystem 19:29:03 Running on jMonkey Engine 3 ALPHA 0.50

INFO Natives 19:29:03 Extraction Directory #1: file:/F:/jmonkeyplatform/jmonkeyplatform/libs/

INFO Natives 19:29:03 Extraction Directory #2: F:workspaceJMonkeyDev

INFO Natives 19:29:03 Extraction Directory #3: F:workspaceJMonkeyDev

FEIN Natives 19:29:03 Copied lwjgl.dll to F:workspaceJMonkeyDevlwjgl.dll

FEIN Natives 19:29:03 Copied OpenAL32.dll to F:workspaceJMonkeyDevOpenAL32.dll

INFO LwjglAbstractDisplay 19:29:03 Using LWJGL 2.4.2

INFO LwjglDisplay 19:29:03 Selected display mode: 640 x 480 x 0 @0Hz

INFO LwjglAbstractDisplay 19:29:05 Display created.

FEIN LwjglAbstractDisplay 19:29:05 Running on thread: LWJGL Renderer Thread

INFO LwjglAbstractDisplay 19:29:05 Adapter: ati2dvag

INFO LwjglAbstractDisplay 19:29:05 Driver Version: 6.14.10.6925

INFO LwjglAbstractDisplay 19:29:05 Vendor: ATI Technologies Inc.

INFO LwjglAbstractDisplay 19:29:05 OpenGL Version: 2.1.8545 Release

INFO LwjglAbstractDisplay 19:29:05 Renderer: Radeon X1950 Series

INFO LwjglAbstractDisplay 19:29:05 GLSL Ver: 1.20

INFO LwjglTimer 19:29:05 Timer resolution: 1000 ticks per second

FEINER LwjglRenderer 19:29:05 VTF Units: 0

FEINER LwjglRenderer 19:29:05 Texture Units: 16

FEINER LwjglRenderer 19:29:05 Vertex Uniforms: 512

FEINER LwjglRenderer 19:29:05 Fragment Uniforms: 512

FEINER LwjglRenderer 19:29:05 Vertex Attributes: 16

FEINER LwjglRenderer 19:29:05 Varying Floats: 44

FEINER LwjglRenderer 19:29:05 Subpixel Bits: 4

FEINER LwjglRenderer 19:29:05 Preferred Batch Vertex Count: 2.147.483.647

FEINER LwjglRenderer 19:29:05 Preferred Batch Index Count: 16.384

FEINER LwjglRenderer 19:29:05 Maximum Texture Resolution: 4.096

FEINER LwjglRenderer 19:29:05 Maximum CubeMap Resolution: 4.096

FEINER LwjglRenderer 19:29:05 FBO RB Max Size: 4.096

FEINER LwjglRenderer 19:29:05 FBO Max renderbuffers: 4

FEINER LwjglRenderer 19:29:05 FBO Max Samples: 6

FEINER LwjglRenderer 19:29:05 FBO Max MRT renderbuffers: 4

FEINER LwjglRenderer 19:29:05 Samples: 0

INFO Camera 19:29:05 Camera created (W: 640, H: 480)

INFO LwjglMouseInput 19:29:05 Mouse created.

INFO LwjglKeyInput 19:29:05 Keyboard created.

FEINER LwjglAudioRenderer 19:29:06 Audio Vendor: OpenAL Community

FEINER LwjglAudioRenderer 19:29:06 Audio Renderer: OpenAL Soft

FEINER LwjglAudioRenderer 19:29:06 Audio Version: 1.1 ALSOFT 1.7.411

FEINER DesktopAssetManager 19:29:06 Loaded Common/MatDefs/Gui/Gui.j3md with J3MLoader

FEINER DesktopAssetManager 19:29:06 Loaded Interface/Fonts/Default.png with AWTLoader

FEINER DesktopAssetManager 19:29:06 Loaded Interface/Fonts/Default.fnt with BitmapFontLoader

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Gui Node)

FEINER DesktopAssetManager 19:29:06 Loaded Interface/Fonts/Console.png with AWTLoader

FEINER DesktopAssetManager 19:29:06 Loaded Interface/Fonts/Console.fnt with BitmapFontLoader

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (BitmapFont) attached to this node (Statistics View)

INFO Node 19:29:06 Child (Statistics View) attached to this node (Gui Node)

INFO Camera 19:29:06 Camera created (W: 1, H: 100000000)

FEINER DesktopAssetManager 19:29:06 Loaded Common/MatDefs/Light/Reflection.j3md with J3MLoader

INFO Node 19:29:06 Child (Sun) attached to this node (Sun)

FEINER DesktopAssetManager 19:29:06 Registered locator: FileLocator

WARNUNG DesktopAssetManager 19:29:06 Cannot locate resource: sonne_512.jpg

INFO Node 19:29:06 Child (Sun) attached to this node (Solarsystem)

INFO Node 19:29:06 Child (Merkur) attached to this node (Merkur)

FEINER DesktopAssetManager 19:29:08 Loaded textures/planet/mercury/mercury.jpg with AWTLoader

INFO Node 19:29:08 Child (Merkur) attached to this node (null)

INFO Node 19:29:08 Child (null) attached to this node (Solarsystem)

FEINER DesktopAssetManager 19:29:08 Loaded Common/MatDefs/Misc/SolidColor.j3md with J3MLoader

FEINER DesktopAssetManager 19:29:08 Loaded /Common/Materials/WhiteColor.j3m with J3MLoader

INFO Node 19:29:08 Child (null) attached to this node (Station)

INFO Node 19:29:08 Child (Station) attached to this node (null)

INFO Node 19:29:08 Child (null) attached to this node (Merkur)

INFO Node 19:29:08 Child (Venus) attached to this node (Venus)

FEINER DesktopAssetManager 19:29:08 Loaded textures/planet/venus/venus.jpg with AWTLoader

INFO Node 19:29:08 Child (Venus) attached to this node (null)

INFO Node 19:29:08 Child (null) attached to this node (Solarsystem)

INFO Node 19:29:08 Child (null) attached to this node (Station)

INFO Node 19:29:08 Child (Station) attached to this node (null)

INFO Node 19:29:08 Child (null) attached to this node (Venus)

INFO Node 19:29:08 Child (Earth) attached to this node (Earth)

FEINER DesktopAssetManager 19:29:10 Loaded textures/planet/earth/earth.png with AWTLoader

INFO Node 19:29:10 Child (Earth) attached to this node (null)

INFO Node 19:29:10 Child (null) attached to this node (Solarsystem)

INFO Node 19:29:10 Child (null) attached to this node (Station)

INFO Node 19:29:10 Child (Station) attached to this node (null)

INFO Node 19:29:10 Child (null) attached to this node (Earth)

INFO Node 19:29:10 Child (Moon) attached to this node (Moon)

FEINER DesktopAssetManager 19:29:11 Loaded textures/planet/earth/moon.png with AWTLoader

INFO Node 19:29:11 Child (Moon) attached to this node (null)

INFO Node 19:29:11 Child (null) attached to this node (Earth)

INFO Node 19:29:11 Child (Mars) attached to this node (Mars)

FEINER DesktopAssetManager 19:29:11 Loaded textures/planet/mars/mars_shaded2048x1024.jpg with AWTLoader

INFO Node 19:29:11 Child (Mars) attached to this node (null)

INFO Node 19:29:11 Child (null) attached to this node (Solarsystem)

INFO Node 19:29:11 Child (null) attached to this node (Station)

INFO Node 19:29:11 Child (Station) attached to this node (null)

INFO Node 19:29:11 Child (null) attached to this node (Mars)

INFO Node 19:29:11 Child (Jupiter) attached to this node (Jupiter)

FEINER DesktopAssetManager 19:29:12 Loaded textures/planet/jupiter/jupiter.jpg with AWTLoader

INFO Node 19:29:12 Child (Jupiter) attached to this node (null)

INFO Node 19:29:12 Child (null) attached to this node (Solarsystem)

INFO Node 19:29:12 Child (null) attached to this node (Station)

INFO Node 19:29:12 Child (Station) attached to this node (null)

INFO Node 19:29:12 Child (null) attached to this node (Jupiter)

INFO Node 19:29:12 Child (Solarsystem) attached to this node (Root Node)

FEINER DesktopAssetManager 19:29:13 Loaded mod/ship/federationantares2.obj with OBJLoader

INFO Camera 19:29:13 Camera created (W: 1, H: 10000000)

INFO Node 19:29:13 Child (mod/ship/federationantares2.obj) attached to this node (ship)

INFO Node 19:29:13 Child (null) attached to this node (ship)

INFO Node 19:29:13 Child (null) attached to this node (ship)

INFO Node 19:29:13 Child (null) attached to this node (ship)

INFO Node 19:29:13 Child (ship) attached to this node (Root Node)

INFO Node 19:29:13 Child (null) attached to this node (Root Node)

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Light/Reflection.vert with GLSLLoader

FEINER DesktopAssetManager 19:29:13 Loaded Common/ShaderLib/Optics.glsllib with GLSLLoader

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Light/Reflection.frag with GLSLLoader

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Light/Reflection.vert compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Light/Reflection.vert, defines, type=Vertex]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Light/Reflection.frag compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Light/Reflection.frag, defines, type=Fragment]

FEIN LwjglRenderer 19:29:13 shader link success

AM FEINSTEN GLObjectManager 19:29:13 Registered: Shader[language=GLSL100, numSources=2, numUniforms=4]

WARNUNG LwjglRenderer 19:29:13 Uniform g_NormalMatrix is not declared in shader.

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Misc/SolidColor.vert with GLSLLoader

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Misc/SolidColor.frag with GLSLLoader

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Misc/SolidColor.vert compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Misc/SolidColor.vert, defines, type=Vertex]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Misc/SolidColor.frag compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Misc/SolidColor.frag, defines, type=Fragment]

FEIN LwjglRenderer 19:29:13 shader link success

AM FEINSTEN GLObjectManager 19:29:13 Registered: Shader[language=GLSL100, numSources=2, numUniforms=2]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=72]

AM FEINSTEN GLObjectManager 19:29:13 Registered: Texture2D[name=textures/planet/jupiter/jupiter.jpg, img=4096x2048-BGR8]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Light/Reflection.vert compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Light/Reflection.vert, defines, type=Vertex]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Light/Reflection.frag compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Light/Reflection.frag, defines, type=Fragment]

FEIN LwjglRenderer 19:29:13 shader link success

AM FEINSTEN GLObjectManager 19:29:13 Registered: Shader[language=GLSL100, numSources=2, numUniforms=6]

WARNUNG LwjglRenderer 19:29:13 Uniform g_NormalMatrix is not declared in shader.

WARNUNG LwjglRenderer 19:29:13 Uniform m_SphereMap is not declared in shader.

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Static, elements=4680]

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Gui/Gui.vert with GLSLLoader

FEINER DesktopAssetManager 19:29:13 Loaded Common/MatDefs/Gui/Gui.frag with GLSLLoader

AM FEINSTEN GLObjectManager 19:29:13 Registered: Texture2D[name=Interface/Fonts/Default.png, img=256x256-RGBA8]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Gui/Gui.vert compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Gui/Gui.vert, defines, type=Vertex]

FEIN LwjglRenderer 19:29:13 Common/MatDefs/Gui/Gui.frag compile success

AM FEINSTEN GLObjectManager 19:29:13 Registered: ShaderSource[name=Common/MatDefs/Gui/Gui.frag, defines, type=Fragment]

FEIN LwjglRenderer 19:29:13 shader link success

AM FEINSTEN GLObjectManager 19:29:13 Registered: Shader[language=GLSL100, numSources=2, numUniforms=4]

WARNUNG LwjglRenderer 19:29:13 Uniform m_VertexColor is not declared in shader.

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=204]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=136]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=272]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=102]

AM FEINSTEN GLObjectManager 19:29:13 Registered: Texture2D[name=Interface/Fonts/Console.png, img=256x256-RGBA8]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=144]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=96]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=192]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=72]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=156]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=104]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=208]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=78]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=144]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=96]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=192]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=72]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=132]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=88]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=176]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=66]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=180]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=120]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=90]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=180]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=120]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=90]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=180]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=120]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=90]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=192]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=128]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=256]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=96]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=192]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=128]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=256]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=96]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=192]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=128]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=256]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=96]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=160]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=320]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=120]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=160]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=320]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=120]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=Position, usage=Dynamic, elements=240]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=Float, type=TexCoord, usage=Dynamic, elements=160]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedByte, type=Color, usage=Dynamic, elements=320]

AM FEINSTEN GLObjectManager 19:29:13 Registered: VertexBuffer[fmt=UnsignedShort, type=Index, usage=Dynamic, elements=120]

FEIN Application 19:29:18 Closing application: model.GameModel

INFO LwjglMouseInput 19:29:18 Mouse destroyed.

INFO LwjglKeyInput 19:29:18 Keyboard destroyed.

INFO LwjglAbstractDisplay 19:29:18 Display destroyed.



The texture and material is:



//for the texture loading

GameModel.getInstance().getAssetManager().registerLocator(

"c:/src", FileLocator.class.getName());



Material mat = new Material(GameModel.getInstance().getAssetManager(), "Common/MatDefs/Light/Reflection.j3md");



Texture tex = GameModel.getInstance().getAssetManager().loadTexture(s); // s is the string locates to the texture

if (tex != null) {

mat.setTexture("m_Texture", tex);

mat.setBoolean("m_SphereMap", true);

}


The spheres are reflecting but no texture is displayed.
I'm trying to get the texture on a sphere and i also tried other mat-defs including the m_SphereMap variable.


Thx, Henning.

The warnings don't really matter. The issue here is that the Reflection material will "reflect" the texture you set on it, rather than display it on an object.

If you want to display a texture on an object, rather than reflect a texture, you should use either the SimpleTextured.j3md material or Lighting.j3md. See TestBox for simple texturing or TestBumpMapping for lit texturing.

I tried SimpleTexture an some other mats described in the tests but all i can see is a gray or orange sphere with solid color not a textured one.



The textures are definitively loaded, and i tried to set them m_ColorMap, m_Texture and other things.



I will continue trying, perhaps you have other hints, for me.



Thx for your help.

For SimpleTextured, the texture parameter is called "m_ColorMap", while for the Lighting.j3md, its called "m_DiffuseMap".

I figured out that the texture is on it, but in gray color , not the color the texture has. Perhaps there's something wrong with my code or i'm missing a special method i have to call or png isnt supported this way.

So here is the code i use once again.



Sphere mesh = new Sphere(40, 40, radius);

Geometry g=new Geometry(name,mesh);



Material mat = new Material(GameModel.getInstance().getAssetManager(), "Common/MatDefs/Misc/SimpleTextured.j3md");



Texture tex = GameModel.getInstance().getAssetManager().loadTexture("textures/planet/earth/earth.png");

mat.setTexture("m_ColorMap", tex);



g.setMaterial(mat);

attachChild(g);   //the object (this) is type of Node

setModelBound(new BoundingSphere(radius , new Vector3f()));

updateModelBound();

Can you post the texture?

The problem here seems to deal with the image size. If i bring it down to 1024x512 the texture is drawn correctly.

If i have 2048x1024 or higher the texture is drawn gray. Don't know if it is a bug, but in jme2 the 4096x2048 image was possible.



Sry for the late post, i was off for a week and thx for your time.



P.S. don't know how to add the image here without having an extern server to upload it.

When replying, press "Addition options…" and then you can browse to attach a file.

The textures which don't work are too big to upload here, cause they have more than 512 KB.

Okay I upped the max size to 10 MB. That should be enough I guess?

Still a problem:

"Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.



Please consult your server administrator for more information."

just pack it on rapidshare, megaupload ect pp then ^^ dirty solution but working

Yeah, imageshack.us is good too.

actually I have not named any imagehoster, because they tend to modify the texture, so it might not be the best idea in this case.


Lutherion said:

Still a problem:
"Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

Please consult your server administrator for more information."


Yeh, it's often the case that the server doesn't allowed files bigger than 2MB to be uploaded, even though SMF does.

(Kirill, if you remember back at Radakan, our web developer started building an upload web app that split the file up into 2MB files to upload, and then repackage together, and it was because of this problem.)

I uploaded it on imageshack -> http://img638.imageshack.us/img638/2909/earthl.png.

No idea what is going on here?



The 2048 texture looks like this: