John: By any chance does Starfire Research make a loader for trueSpace files?
Hal Martin ----- Original Message ----- From: "John Wright" <[EMAIL PROTECTED]> To: <JAVA3D-INTEREST@JAVA.SUN.COM> Sent: Sunday, May 01, 2005 2:30 PM Subject: Re: [JAVA3D] Animation and the Loader3DS > That's correct, the Starfire Research 3DS loader does not attempt to > load any animation data from a 3DS file. We recommend you load parts > and implement your own animation in Java 3D code. > > - John Wright > Starfire Research > > Johannes Boy wrote: > > Hello everyone, > > I wanted to create a little Programm that, so far, imports a 3DS max scene > > and a model (with animation). The Scene is imported ok, the model itself > > too, but it just doesnt show any sign of animation... > > Btw, I'm using the loader as you can find it on jd3.org. The one found on > > www.starfireresearch.com doesnt create any Behaviour nodes (i guess you need > > them for animation...) > > Heres the code... > > > > public class SuperApp { > > public static Universum universum; > > public static Loader3DS loader; > > //.. > > > > public SuperApp() { > > //.... > > BranchGroup szene = create(); > > universum.addBranchGraph(szene); > > universum.goLive(); > > > > window.setVisible(true); > > } > > > > public BranchGroup create() { > > BranchGroup ret = new BranchGroup(); > > ret.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); > > Scene scene = null; > > Scene ball=null; > > > > try { > > System.out.println("loading...."); > > scene = loader.load("room1.3DS"); > > System.out.println("raum done"); > > > > > > ball = loader.load("ball_animation.3ds"); > > System.out.println("ball fertig"); > > > > Behavior[] behavs = ball.getBehaviorNodes(); > > if(behavs == null) > > System.out.println("no behaviours...!"); > > else > > System.out.println("number behaviours: "+behavs.length); > > > > } catch (Exception e) { > > System.out.println(e); > > System.exit(1); > > } > > if(scene != null) > > ret.addChild(scene.getSceneGroup()); > > if(ball != null) > > ret.addChild(ball.getSceneGroup()); > > > > ret.compile(); > > return ret; > > } > > } > > > > public class Universum extends SimpleUniverse { > > //... > > public BranchGroup navigators; > > public BranchGroup lights; > > > > public Universum(Canvas3D canvas) { > > super(canvas); > > navigators= new BranchGroup(); > > navigators.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); > > > > lights = new BranchGroup(); > > lights.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); > > } > > > > public void goLive() { > > //keyboard navigatior > > TransformGroup gr = getViewingPlatform().getViewPlatformTransform(); > > KeyNavigatorBehavior kbnav = new KeyNavigatorBehavior(gr); > > kbnav.setSchedulingBounds(new BoundingSphere(new Point3d(0,0,0), > > 1000.0)); > > navigators.addChild(kbnav); > > getViewer().getView().setBackClipDistance(BACK_CLIP_DISTANCE); > > > > > > createLights(); > > > > > > navigators.compile(); > > lights.compile(); > > addBranchGraph(navigators); > > addBranchGraph(lights); > > } > > > > public void createLights() { > > headlight = new AmbientLight(); > > headlight.setCapability(Light.ALLOW_STATE_WRITE); > > headlight.setColor(new Color3f(1, 1, 1)); > > headlight.setInfluencingBounds(LIGHT_BOUNDS); > > lights.addChild(headlight); > > } > > > > } > > > > =========================================================================== > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > > of the message "signoff JAVA3D-INTEREST". For general help, send email to > > [EMAIL PROTECTED] and include in the body of the message "help". > > > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA3D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".