www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: gpsunjp on June 16, 2006, 10:13:13 am

Title: How to setup a camera?
Post by: gpsunjp on June 16, 2006, 10:13:13 am
Hello

I have a Object with size (800, 1000, 400), and center(200, 400, 500).
How to setup a camera so that the whole object can be displayed?
In my case, It seems that some parts are culled by near and far plane.

Thank You
Sun
Title: How to setup a camera?
Post by: Raven on June 16, 2006, 12:06:30 pm
Well... depends, do you want to be able to see the object from multiple perspectives?

I recommend you check out the movement in the jPCT demo files, they should provide you with a sufficient starting point for moving the camera (e.g. use the FPS demo camera controls and turn the gravity off).

If, however, the problem is only that parts of your object seem to be missing, you can set misc. culling params (farplane, maxpolysvisible, etc..) in the Config class. Check out the jPCT javadocs (http://www.jpct.net/doc/).

-Raven
Title: How to setup a camera?
Post by: Melssj5 on June 16, 2006, 02:36:55 pm
Well, of course that the camera position depends on the angle you want to see the object, in anyway, I move the camera until I got a desired view and took notes about the position to set it on the code. As your object is big I guess that the problem is that part of the object is not being rendered. To fix that just adjust the Config.maxPolysVisible before calling to the world constructor.