jME3 Model with light

Hi… If I load a 3d model in jme3 (.obj, created with maya), there is a default light. (these multi colors…) How can I take the light wich I created in my 3d modeling programm (Autodesk Maya)? thx

Guy, you have to export your scene if you wanna get the light. The .obj format stores just the mesh.

so with an .obj I want get light? so in wich format should I export my model?

You have to see the 3d maya’s exporter scripts that does it. I don’t know the 3d maya’s exporter scripts. You can tell me what the 3d maya’s exporter scripts so i can check them.



assetManager.registerLocator(“Model/”, FileLocator.class.getName());

wall = assetManager.loadModel(“WALL.obj”);

Material mat_default = new Material(

assetManager, “Common/MatDefs/Misc/ShowNormals.j3md”);



Why I don’t see the texture I gave to my object? It appears blue…??

you have to create uv texture cordinates to your model into your 3d maya.

@TheKing i don’t think obj file format exports lights.

You’ll have to create a light inside JME3.

For your code example the objects appears blue because you chose the showNormals material.

I suggest you read the HelloMaterial tutorial

It explains the material system and has a light initialization example.