Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - acfabro

#1
Support / Re: how to load the model
April 27, 2012, 06:15:03 PM
Thanks Egon, i did that, but something entirely different happened -- the model appeared to revolve around an orbit.

Actually I solved my problem, I just to align the camera to the object then looked at it.


cam = world.getCamera();
cam.setPosition(sphere.getTransformedCenter().x, sphere.getTransformedCenter().y, -5);
cam.lookAt(sphere.getTransformedCenter());


I'm using the JPCT-AE Hello World code but changed the part where I load terra.asc in place of Primitives.getCube().

So I'm assuming when the model from terra.asc was loaded, it's center wasn't at 0,0,0 which is why I had to align the camera first. Is that correct?

I really appreciate this, I've just started to learn to use this stuff.
#2
Support / Re: how to load the model
April 24, 2012, 12:58:59 PM
Quote from: EgonOlsen on November 02, 2011, 09:58:08 PM
3.) IIRC, terra.asc has proper texture coordinates for a sperical texture, i.e. if you take for example this image and rescale it to 512*256 or something, it should look fine: http://celestia.h-schmidt.net/earth-vt/unshaded1024.jpg

Loading terra.asc and applying a 512x256 texture worked for me, thanks! However, when I try rotateY() and rotateX() on the Object3D object, the center seems off -- what I mean to say is it looks like it is rotating around an axis which is not in the center of the sphere. When I used Primitives.getSphere() to generate the sphere, the rotation seems fine. Do you have any recommendations?

TIA