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.

Topics - mystara

Pages: [1] 2
Projects / AegisQuest
« on: January 03, 2010, 04:16:47 pm »
We've been working on a project known as AegisQuest (, which is a live-action fantasy role playing "game" using the JPCT engine.

It combines full motion chromakey (blue screen) with recorded gameplay using a jpct client/server engine.

There's a trailer of our pilot production available here:

Support / Billboarding causing object to vanish?
« on: December 12, 2009, 12:36:16 pm »
Sorry, this is probably another noob question, but having looking through the javadocs, I cannot seem to find an explanation.

I created a new object (a rectangular plane) by:
Object rectangle = new Object(2);
rectangle.addTriangle(blah); rectangle.addTriangle(blah);

This works fine and I've been able to create a simple rectangle and colour it or apply to a texture to it.

I wanted to use billboarding so that the rectangle would always appear as a rectangle, regardless of the camera angle. However, when I try rectangle.setBillboarding(Object3D.BILLBOARDING_ENABLED) the model disappears.


Support / Unlit, clearly visible object
« on: December 11, 2009, 12:42:55 pm »

Doubtless this is a silly question, but I'm not sure of the answer.

I'm trying to create a plane which is fully lit and yet does not light other objects. Specifically, I want the plane to be consistently lit no matter where the camera is. But I don't want it to create any light (so other nearby objects will not be illuminated) and don't want it to be affected by other light sources.

I think the way to do this is to set an additionalColor to the plane and to set the lighting mode to LIGHTING_NO_LIGHTS.

Is this correct?

Bugs / Camera alignment error?
« on: September 27, 2009, 10:07:47 am »

I've been experiencing a weird effect when I do:
Code: [Select]

In one particular case, it seems to cause the light level of my world to dramatically fall. Objects don't appear unless the camera is pointed directly at them and is close up. For example, the following screenshot occurs by carrying out the camera alignment (above):

If I manually reset and rotate the camera in this way:
Code: [Select]

The shot appears (correctly) like this:

Obviously I've resolved my problem by finding another way to do what I wanted to achieve, so it's not urgent.
But I thought someone here might like to know on the off chance that it's a bug in jpct. I cannot understand how aligning the camera would affect the light levels. But since that's the only line of code I'm changing, I can't see what else it would be.

Bugs / World.toXML() error
« on: August 27, 2009, 12:43:18 pm »

I've spent a little while trying to figure out why some exported XML structures are not producing any triangles when imported. Looking at the XML files themselves, I discovered that the tag:


Is not being exported. I believe that this is a bug and has been introduced in the latest version of JPCT, since the only change I've made to my code is to start using the latest version of JPCT.
The other slightly concerning thing is that the XML importer does not seem to recognise that the XML file is invalid. Shouldn't it notice that the <triangle_list> is missing, and refuse to load it?


Support / Perpendicular movement bug
« on: August 09, 2009, 07:44:23 pm »

I've come across a problem, and I cannot figure out if it's a bug in JPCT or a bug in my code. I've double and triple checked everything and I cannot seem to find the cause of the problem.

I have reproduced the problem by modifying the fps demo. My aim is to store independent camera settings in a set of object array variables. Note that in this example, there is only one setting in the arrays:

Code: [Select]
private SimpleVector[] storedPosition = {new SimpleVector(STARTING_POS)};
private SimpleVector[] storedDirection = {new SimpleVector()};
private Matrix[] storedPlayerDirection = {new Matrix()};

A new function swaps the camera object with one of the values in the settings. Again, for the purposes of this demo, the value which is swapped in is arbitrarily fixed at index 0.

Code: [Select]
protected void swapCameraWithStoredVariables()
SimpleVector swap;
SimpleVector swap2;
Matrix otherSwap;

swap = storedPosition[0];
storedPosition[0] = camera.getPosition();

swap2 = storedDirection[0];
storedDirection[0] = camera.getDirection();

otherSwap = storedPlayerDirection[0];
storedPlayerDirection[0] = playerDirection;
playerDirection = otherSwap;

This function (swapCameraWithStoredVariables ) gets called at the top and bottom of the doMovement() function.

Finally, in gameLoop, I added two lines to set the camera to use the stored values. This occurs immediately before the poll() function:

Code: [Select]

Once more, in this example, the camera is set to display a single camera.

To my knowledge, adding this code should have no effect to the operation of the fps demo. All it does is copy the stored variables in to the current camera to carry out any movement. When the movement is calculated, the values are copied back to the stored variables. When the scene is displayed, the variables are loaded in to the camera object.
Therefore, it should behave as the original fps does.

However, in practice, the forward/backward controls move at right angles to the camera direction. For example, if the camera is pointing straight ahead, the forward/backward controls move the camera left and right (strafing).

I cannot for the life of me, determine why this is happening. Is it a bug in my code, or a bug in jpct?

I can supply the modified fps demo code if required.

Support / Animation resource usage
« on: August 05, 2009, 10:28:26 am »

I was wondering if anyone could give some guidance as to the resource usage of animated models. I'm considering buying some "game ready" animated 3D characters, but I'm not certain whether their use is appropriate for JPCT.

The animation I'm interested in uses 1700 triangles (which seems good). However, it also uses a total of 539 frames.

I'm aware of the excellent thread regarding both the export of max animations to .3ds files and also the stripping of animations. Particularly removing sequences that are of no use.

However, I'm curious as to whether JPCT would be up to importing the entire animation and displaying it 3 or 4 times in a scene. Since each frame would have to be exported as a separate mesh, can I expect an enormous file size and crippled heap?

Is there some way of storing in the animation in a smaller space?
Is it perhaps even possible for a proprietary JPCT format which only stores the changes involved in each vertex to reach the next keyframe? Thus allowing a reduction of heap/disk space.

Sorry for all the questions, I just want to check that it's going to do what I want before I start spending money :)

Support / Md5 Importer
« on: January 17, 2009, 06:59:35 pm »

After many months of failing to find good MD2 models for humanoid animation, I started looking in to MD5s.
Has anyone manager to product a JPCT importer for MD5 models? Or are there any plans to include one in JPCT in the near future?

I had a go at porting the jMonkey MD5Importer. By removing all the jMonkey references, and using a couple of classes from Cyberkilla's skeletal API, I've managed to make most of the classes compile. But I just don't know enough about JPCT to complete it.

Support / Animatable humanoid model
« on: June 01, 2008, 02:18:34 pm »

Any ideas for where I might find an animatable 3D humanoid model suitable for JPCT? Preferably as generic as possible, not holding a gun and so on.


Support / Argh! setScale collisions!
« on: May 16, 2008, 08:52:29 pm »

I have a 3DS model of a hollowed out area.

I've imported it at scale 1 and exported it to XML (file1).
I've then taken the same model, imported it at scale 17 and exported it to XML (file 2).

If I open file2, everything behaves as it should. I can move my camera around and checkCameraCollisionEllipsoid produces something sensible when I collide with things.
I can produce exactly the same appearance/view if I import file1 and use .setScale(17) on the resulting model. However, if I set the camera to exactly the same location, checkCameraCollisionEllipsoid continually detects collisions. Even when there's nothing visibly colliding with the camera.

I'm not quite sure why this should happen, am I doing something wrong with setScale? Do I need to do something else after calling it? The only thing that I can think of that might cause this problem is that the original model of file1 is still present, even after calling setScale(17) and only the resulting modification of the model after calling .setScale is visible.

Any clues? It's really hurting my brain :(

Bugs / Scaling bug with XML export?
« on: May 10, 2008, 05:45:13 pm »

If I import a model, and then use .setScale on the corresponding Object3D, the scale of a model can be set.
If I export the world using World.toXML(), however, the XML file stores the scale of the original model file, not the scale as set by the .setScale command.

Is this intentional behaviour? I would have expected the exported XML file to reflect the scale set with the .setScale command.

Support / Identifying the dummy textures?
« on: May 06, 2008, 08:17:02 pm »

Is there any way to determine, in the texture manager, which textures are dummies and which textures have already been loaded? I notice that I can get the current dummy texture, but how can I tell which references in the texture manager were created when I loaded some structure and which point to some actual texture in memory?

I assume it's not sufficient to do an equlity test with the current dummy texture, as they each have different names. I also notice an "isEnabled" function for Textures, but I'm not exactly sure what this represents and when it's set.

Specifically, I'm trying to load a structure from XML and then load the textures that are referenced by the XML document. I don't want to load the textures in advance.

Bugs / OutOfMemoryError
« on: May 03, 2008, 05:24:32 pm »

I've been experiencing OutOfMemory (heap) errors in my application when I repeatedly create a new world object and populate it (with the same objects each time). To my knowledge, this can only really be caused by some kind of memory leak. As the memory used before and after the world is recreated should be identical.

In trying to track down this problem, the only clue I've discovered is that preventing rendering of my world object seems to remove the OutOfMemory error. The function which, when removed from my main loop, eliminates the OutOfMemoryError is as follows:

Code: [Select]
public void renderWorld()
if (switchMode != 0)

World theWorld = gstate.getWorld();


if (!wireframe)
theWorld.drawWireframe(buffer, Color.white);


Any clues as to why this might be causing problems if the world and camera are changed by another object? Anything obviously amiss?
Or any ideas as to how to find this stupid error?

Other hints welcome :P

Support / Terrains, caves and editors
« on: October 01, 2007, 10:02:37 am »

I'm trying to find a quick way of making the insides of some caves in JPCT.

Might anyone have a good idea of any tool which might be available to make this fast and relatively pain free? I've seen various terrain editors, but they usually only operate on a single plane. I've also considered building one, but I'm not entirely confident of my algorithmic polygon skills :)

Any ideas?


Support / UV Texturing
« on: July 11, 2007, 11:30:58 am »

Another newbie-ish question I'm afraid. Hopefully not too hard.

I have a fairly complex model in 3DS format and I'm trying to wrap a texture around it. Unless I'm much mistaken, I think I'm trying to do UV texturing.

I was under the impression from forum postings and javadocs that jpct is able to do this to some degree, and I've tried the following code:

Object3D[] bits = Loader.load3DS(filename, 10f);
Texture tex = new Texture("images/2.jpg");
texMan.addTexture("text", tex);


As well as a number of variations (merging the Object3D[] together and applying the texture to that, applying the texture to each element of the Object3D[]) but without any luck. When the area is rendered, everything has the dummy (plain white) texture. I've called calcTextureWrap and recreateTextureCoords after setting the texture and before building it. I haven't got any envmapping stuff anywhere (which I understand would ruin things).

Have I made the faulty assumption that JPCT can do this for me? Or is it something I need to do in my model editor to make this work?

I'm rendering with openGL if that makes any difference :)

Pages: [1] 2