www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: JayJay on January 08, 2006, 11:58:26 am

Title: Objects which disappear
Post by: JayJay on January 08, 2006, 11:58:26 am
Hello !

I am using jPCT to render stellar systems, but I have a problem : some objects disappear...
Here are 2 screenshots :

The system contains 2 planets, a sun and an asteroid belt :
(http://fallengalaxy.free.fr/autres/system1.jpg)

And with a translation along Y axis (bottom of the screen), some asteroids disappear :
(http://fallengalaxy.free.fr/autres/system2.jpg)

I guess I have to change a parameter, but I haven't found which one...
Any ideas ?

BTW, congrats for the software renderer, very powerful and useful ;)
Title: Objects which disappear
Post by: EgonOlsen on January 08, 2006, 02:22:07 pm
Are you getting a message that too many polygons have been added to the VisList (or similar...)? Try to change Config.maxPolysVisible to..let's say 10000 and see if that fixes the problem.
Title: Objects which disappear
Post by: JayJay on January 08, 2006, 03:08:17 pm
You are right, I guess there were too many polygons to render (but I didn't get any message from jPCT...)

Actually, I have a class StellarSystem which extends World, and I changed Config.maxPolysVisible in the constructor of this class. I tried to put the call before building the object, and now it works :)

Just an advice : add in the Javadoc that Config.maxPolysVisible should be set before building World instance ;)

And thanks for your help !
Title: Objects which disappear
Post by: EgonOlsen on January 08, 2006, 05:35:58 pm
Quote from: "JayJay"
You are right, I guess there were too many polygons to render (but I didn't get any message from jPCT...)

Just an advice : add in the Javadoc that Config.maxPolysVisible should be set before building World instance ;)
Strange...you should get that message unless you've turned logging off or are using a slightly older version. Which version of jPCT are you using?
The behaviour is documented. It says in Config: "This value has to be modified before constructing a world."
Title: Objects which disappear
Post by: JayJay on January 08, 2006, 06:43:22 pm
I was using an old version jPCT (1.06) that I used few months ago for a game, that's why the Javadoc wasn't updated and I didn't get any warning...

Sorry, my fault, I shall pay more attention next time  ;)