well, when i export a object from Blender to JME, it was getting upside down, I don't remember how but i managed to get the object in the correct position. However, the lighting is still upside down T.T
here is the importing code(partly copied from a tutorial):
public class OBJImporter {
static final String path = "file:" + System.getProperty("user.dir")+ "/resources/";
public static Spatial importer(ResourcePath p) throws MalformedURLException{
URL folder= new URL(path + p.getPath());
URL model = new URL(path + p.getPath() + p.getName());
FormatConverter converter=new ObjToJme();
converter.setProperty("mtllib", folder);
converter.setProperty("texdir", folder);
ByteArrayOutputStream BO=new ByteArrayOutputStream();
try {
converter.convert(model.openStream(), BO);
map=(Spatial) BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
map.setLocalScale(4f);
map.setModelBound(new BoundingBox());
map.updateModelBound();
return map;
} catch (Exception e) {
System.out.println("Damn exceptions! O_o n" + e);
e.printStackTrace();
System.exit(0);
}
return null;
}
private static Spatial map;
}
so.. how do i make the lighting get above and not below my objects? moving the ligght source haven't helped, here is the light code(copied from the same source as above code):
PointLight light = new PointLight();
light.setDiffuse( new ColorRGBA( 0.75f, 0.75f, 0.75f, 0.75f ) );
light.setAmbient( new ColorRGBA( 200f, 200f, 200f, 1.0f ) );
light.setLocation( new Vector3f( 12, 12, 0 ) );
light.setEnabled( true );
lightState = display.getRenderer().createLightState();
lightState.setEnabled( true );
lightState.attach( light );
rootNode.setRenderState( lightState );
thx in advance ;D