That thing has an insane scale, which is why it's way off from the origin after loading and it's HUGE, so that you would have to move out thousands of units to see something. But you can set a prescale factor when loading it, so i did that and voila...
import java.awt.*;
import org.lwjgl.opengl.*;
import com.threed.jpct.*;
import com.threed.jpct.util.*;
public class CraneTest {
public static void main(String[] args) throws Exception {
CraneTest mt = new CraneTest();
mt.doIt();
}
private void doIt() throws Exception {
FrameBuffer fb = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
fb.enableRenderer(IRenderer.RENDERER_OPENGL);
fb.disableRenderer(IRenderer.RENDERER_SOFTWARE);
World w = new World();
w.setAmbientLight(50, 50, 50);
Light light=new Light(w);
light.setAttenuation(-1);
light.setIntensity(255, 0, 0);
Object3D[] crane = Loader.load3DS("3ds/Crane/Crane.3DS", 0.01f);
for (Object3D obj : crane) {
obj.build();
obj.compile();
w.addObject(obj);
}
w.getCamera().setPosition(crane[0].getTransformedCenter());
w.getCamera().moveCamera(Camera.CAMERA_MOVEOUT, 500);
w.getCamera().lookAt(crane[0].getTransformedCenter());
long s = System.currentTimeMillis();
int fps = 0;
while (!Display.isCloseRequested()) {
fb.clear(Color.BLUE);
w.renderScene(fb);
fps++;
w.draw(fb);
fb.displayGLOnly();
if (System.currentTimeMillis() - s > 1000) {
System.out.println("FPS: " + fps);
fps = 0;
s = System.currentTimeMillis();
}
}
fb.disableRenderer(IRenderer.RENDERER_OPENGL);
System.exit(0);
}
}