[SOLVED]Content is black

Hello everyone , I will get straight to the point. I have made a small building mesh in 3ds max, with one animation, no bones/skeleton, and I checked all the appropriate options in OgreMax 3ds. This model has a UV, but I did not put it in the materials in 3ds max, because I want to script them in rather than have them there by default. In any case, I exported the scene and my files are here, .material,.mesh,.mesh.xml,.scene. In the OgreWinViewer, the anims show up, everything is fine. However, onceI import to jMP, the model ingame only shows up black. I added the lighting and everything. Here is my code. Please help.

[java]Material mat_lit = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");

mat_lit.setTexture("DiffuseMap",

assetManager.loadTexture("Textures/MauryaCommand/MauryaCommand_Diffuse.jpg"));

mat_lit.setTexture("NormalMap",

assetManager.loadTexture("Textures/MauryaCommand/MauryaCommand_Normal.jpg"));

mat_lit.setFloat("Shininess", 1f); // [0,128]

AnimChannel channel;

AnimControl control;

Node player;

player = (Node)assetManager.loadModel("Models/MauryaCommand/MauryaCommand.j3o");

player.setLocalTranslation(results.getCollision(0).getContactPoint());

player.setMaterial(mat_lit);

player.setLocalScale(1f);

rootNode.attachChild(player);

//control = player.getControl(AnimControl.class);

//control.addListener(this);

//channel = control.createChannel();

//channel.setAnim("OpenGate");

//channel.setLoopMode(LoopMode.Loop);

DirectionalLight sun = new DirectionalLight();

sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));

rootNode.addLight(sun); [/java]

Also, it seems jMP is not reading my animations, the channel = control.createChannel() is giving a null pointer, I guess player.getControl(AnimControl.class) is returning null.

Try first importing it without changing the translation or scale of the model or camera also try using an ambient Light.



I am unfamiliar with the max and maya exporters but did you try selecting the animations to export?



Also why load the materials separately i am pretty sure you can still change the materials once imported into jme if template switching is your gain

I dont know how to add ambient light, and I did select the anims, the OgreMax viewer shows the animation playing, its just the script that crashes. Also, I tried loading the materials in 3ds max and exporting, the .material file exported properly but even that did not work.



It seems the issue was point light, but now my UVs are mismatched, also when I import my texture (.jpg) into jME3 it loads fine, but when I try and import it into the material creator, .j3m file, it is flipped over the X axis. Even if I check FLIP on the properties, it is not flipping on the model at all.

Can you please provide the problematic model file?

Also, how come you’re using animation without a skeleton?

I didnt know you NEED a skeleton, but I managed to figure out why my UVs are messing up, it seems because my model is made up of seperate “Editable Polys” in 3ds max, it messed up my entire building, is there any way I can do this though, multiple objects in a 3ds max scene all with one UVW Unwrap exported through OgreMax exporter? If I combine my meshes, then it recognized my UV’s properly.’



EDIT Ok I figured out the issue lol, it seemed that because I chose all objects in my scene and under Object Settings, I gave them all one name, cuz I hated how it generated like 3000 files . In any case, I got rid of that and allowed it to generate seperate files for all the meshes, and now the UV and model import properly and spawn using simple code :). Thank you!