Hi,
Xith:
JME
The model has around 30000 polygons, I was experimenting with large models coz I am working on a visualization system that will have high res models.
I can’t provide the source code for the Xith demo coz it is big, but it is pretty much the same concept as the jME test, I loaded all the objects in to the scene graph, added one light source and moved the camera. Xith objects were loaded from 3DS file while on jME side I used MilkShape loader. I have coded my own camera movement in Xith app, while on jME side I used the default stuff.
I just found that I used Spot Light in Xith, and Point Light in jME, could that make such a big difference?
and here is a jME code…
public class TestMilkLoader extends SimpleGame{
public static void main(String[] args) {
TestMilkLoader app=new TestMilkLoader();
app.setDialogBehaviour(ALWAYS_SHOW_PROPS_DIALOG);
app.start();
}
// The new loader
protected void simpleInitGame() {
// Idealy this could be replaced by
// Loader mi=new AutoCadLoader(); ect
LWJGLCullState s = new LWJGLCullState();
Loader mi=new MilkLoader();
//mi.setLoadFlag(Loader.LOAD_CONTROLLERS);
mi.setLoadFlag(Loader.PRECOMPUTE_BOUNDS);
URL MSFile=TestMilkLoader.class.getClassLoader().getResource(
"jmetest/data/model/msascii/body.ms3d");
mi.setBase(TestMilkLoader.class.getClassLoader().getResource(
"jmetest/data/model/msascii/"));
Node mi1=mi.load(MSFile);
//mi1.setLocalScale(.1f);
//mi1.getController(0).setSpeed(10f);
// ((MilkAnimation) mi1.getController(0)).setSkipRate(.01f);
rootNode.attachChild(mi1);
s.setCullMode(CullState.CS_BACK);
s.setEnabled(true);
Node mi2=mi.load(MSFile);
Node mi3=mi.load(MSFile);
Node mi4=mi.load(MSFile);
Node mi5=mi.load(MSFile);
Node mi6=mi.load(MSFile);
Node mi7=mi.load(MSFile);
Node mi8=mi.load(MSFile);
Node mi9=mi.load(MSFile);
Node mi10=mi.load(MSFile);
Node mi11=mi.load(MSFile);
Node mi12=mi.load(MSFile);
Node mi13=mi.load(MSFile);
Node mi14=mi.load(MSFile);
Node mi15=mi.load(MSFile);
Node mi16=mi.load(MSFile);
Node mi17=mi.load(MSFile);
Node mi18=mi.load(MSFile);
Node mi19=mi.load(MSFile);
mi19.setLocalTranslation(new Vector3f(0,0,-360));
mi18.setLocalTranslation(new Vector3f(0,0,-340));
mi17.setLocalTranslation(new Vector3f(0,0,-320));
mi16.setLocalTranslation(new Vector3f(0,0,-300));
mi15.setLocalTranslation(new Vector3f(0,0,-280));
mi14.setLocalTranslation(new Vector3f(0,0,-260));
mi13.setLocalTranslation(new Vector3f(0,0,-240));
mi12.setLocalTranslation(new Vector3f(0,0,-220));
mi11.setLocalTranslation(new Vector3f(0,0,-200));
mi10.setLocalTranslation(new Vector3f(0,0,-180));
mi9.setLocalTranslation(new Vector3f(0,0,-160));
mi8.setLocalTranslation(new Vector3f(0,0,-140));
mi7.setLocalTranslation(new Vector3f(0,0,-120));
mi6.setLocalTranslation(new Vector3f(0,0,-100));
mi5.setLocalTranslation(new Vector3f(0,0,-80));
mi4.setLocalTranslation(new Vector3f(0,0,-60));
mi3.setLocalTranslation(new Vector3f(0,0,-40));
mi2.setLocalTranslation(new Vector3f(0,0,-20));
// ((MilkAnimation) mi2.getController(0)).setSkipRate(.05f);
// mi2.setLocalScale(.5f);
rootNode.attachChild(mi2);
rootNode.attachChild(mi3);
rootNode.attachChild(mi4);
rootNode.attachChild(mi5);
rootNode.attachChild(mi6);
rootNode.attachChild(mi7);
rootNode.attachChild(mi8);
rootNode.attachChild(mi9);
rootNode.attachChild(mi10);
rootNode.attachChild(mi11);
rootNode.attachChild(mi12);
rootNode.attachChild(mi13);
rootNode.attachChild(mi14);
rootNode.attachChild(mi15);
rootNode.attachChild(mi16);
rootNode.attachChild(mi17);
rootNode.attachChild(mi18);
rootNode.attachChild(mi19);
//rootNode.attachChild(new Box("axisX",new Vector3f(5,0,0),5f,.1f,.1f));
//rootNode.attachChild(new Box("axisY",new Vector3f(0,5,0),.1f,5f,.1f));
//rootNode.attachChild(new Box("axisZ",new Vector3f(0,0,5),.1f,.1f,5f));
rootNode.setRenderState(s);
}
and there you go…