11731
Support / Re: Question: Models, lighting, and more.
« on: October 28, 2005, 02:51:54 pm »Quote from: "Raven"
1. I've been playing around with loading various 3ds models. After realizing that objects must be merged, everything works great except that with complex models everything slows *extremely* down when I look at them. Even down to 2FPS in worst cases. This can hardly be due to processing power since I'm running a 2x2.5ghz 64bit powermac with 2GBRAM.
- So what am I doing wrong? (I load the models the same way as the levels are loaded in the FPS demo).
I think that the models you are using are simply too complex for the engine to handle. jPCT is not a "polygon pusher" due to the way it works internally. For real time 3D graphics, you should opt for low poly models, not for these great looking, but huge things that can be found on most free model sites. How many polygons do the models have that are causing the problems? You may also set Config.glVertexArrays to true (or download jPCT 1.08 which does this by default). It may help a little, but as said: Use lower poly models for real time stuff.
Quote from: "Raven"
2. Regarding levels in the FPSdemo. How is the playerPosition originally calculated, as well as the lighting?
I assigned a key to Camera.getPosition(), walked through the level, pressed that key where i wanted to add a lightsource and wrote down the position...
Quote from: "Raven"
In Paradroidz, the Player-instance includes a light that moves with the player (i.e. i'm setting it's position to the player's one). So no, Object3D can't emit light, but you can move the lights so that it looks like that.
3. Can objects emit light? For example, could I create a Flashlight object?
Quote from: "Raven"
4. I still haven't been able to try object animations; I don't know yet how to animate 3D and I can't find any md2 files -- does anyone know where I can find an example MD2 file to test animation?
Have a look at http://www.planetquake.com. They once had a nice collection of MD2s. MD2s are Quake2 models. I hope they are still offering it. If not, let me know. I can send you some models for testing purposes.
Edit: The site seems to be gone...what a pity! I'll upload some md2-files to http://www.jpct.net/download/md2 for you...
Quote from: "Raven"
To a degree, but only by using a strange combination of hardware and software rendering which includes texture uploading and stuff. That's because jPCT doesn't support "render to texture". Basically, you would have to render the monitor image using the software renderer in a different FrameBuffer, copy that into a texture and render the scene with that texture using the hardware renderer. Could be a little slow depending on how often you are planning to update the monitor's image.
5. Just for interests sake: You can have more than once instances of a camera, right? Would it be possible to project the input of one camera to an object in game? An example of the usage: 'Security' cameras placed in a map can be viewed by the player on Monitor Objects?