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.


Messages - mystara

Pages: 1 [2] 3 4 ... 6
16
Bugs / World.toXML() error
« on: August 27, 2009, 12:43:18 pm »
Hello,

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:

<triangle_list>

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?

Cheers!

17
Support / Re: Uhmm Poser models ?
« on: August 25, 2009, 07:28:19 am »
I was under the impression this still wasn't permitted since you couldn't distribute derivatives of the poser models?

18
Support / Re: Uhmm Poser models ?
« on: August 24, 2009, 10:04:16 am »
Poser models are well known for their enormous numbers of polygons, which are hard to reduce. They're not designed for use in games.

Besides, you're not allowed to distribute the models used in poser. Which means even if you could import them in to JPCT, you couldn't give your program to anyone :(

19
Support / Re: Perpendicular movement bug
« on: August 13, 2009, 08:55:38 pm »
No matter
I have uploaded it to here and you can download it at your leisure. I've zipped it up, so it's only 9 kB.

20
Support / Re: Perpendicular movement bug
« on: August 12, 2009, 11:39:06 pm »
Is it okay to email it to you?

21
Support / Re: Perpendicular movement bug
« on: August 12, 2009, 09:51:05 am »
During the rendering, it makes absolutely no difference if I do:

Code: [Select]
camera.setBack(storedDirection[0].getRotationMatrix().invert3x3());

or

Code: [Select]
camera.setBack(storedDirectionMatrix[0]);

i.e. setting the camera matrix to the stored direction matrix instead of a calculation on the stored direction vector has no effect (which I would expect).

In the swap function (which I previously supplied) the camera matrix is being set by performing a calculation on the vector:
Code: [Select]
camera.setBack(swap2.getRotationMatrix().invert3x3());
.

22
Support / Re: Perpendicular movement bug
« on: August 11, 2009, 09:20:57 pm »
Okay, I changed the swap function to the following:
Code: [Select]
protected void swapCameraWithStoredVariables()
{
// TODO

SimpleVector swap;
SimpleVector swap2;
Matrix otherSwap;

System.out.println("The back of the camera matrix looks like this:");
System.out.println(storedDirectionMatrix[0]);
System.out.println("The vector looks like this:");
System.out.println(storedDirection[0]);
System.out.println("And the adjusted vector looks like this:");
System.out.println(storedDirection[0].getRotationMatrix().invert3x3());

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

swap2 = storedDirection[0];
storedDirection[0] = camera.getDirection();
storedDirectionMatrix[0] = camera.getBack();
camera.setBack(swap2.getRotationMatrix().invert3x3());

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

The value of storedDirectionMatrix[0] is always the same as storedDirection[0].getRotationMatrix().invert3x3()
Thus, the transformation of storedDirection seems to be correct.

Example output:

Code: [Select]
The back of the camera matrix looks like this:
(
0.3522742 0.0 0.9358968 0.0
0.0 1.0 0.0 0.0
-0.9358968 0.0 0.3522742 0.0
0.0 0.0 0.0 1.0
)

The vector looks like this:
(0.9358968,0.0,0.3522742)
And the adjusted vector looks like this:
(
0.3522742 -0.0 0.9358968 0.0
0.0 1.0 0.0 0.0
-0.9358968 0.0 0.3522742 0.0
0.0 0.0 0.0 1.0
)

and

Code: [Select]
The back of the camera matrix looks like this:
(
0.40776044 0.0 0.9130889 0.0
0.0 1.0 0.0 0.0
-0.9130889 0.0 0.40776044 0.0
0.0 0.0 0.0 1.0
)

The vector looks like this:
(0.9130889,0.0,0.40776044)
And the adjusted vector looks like this:
(
0.40776044 -0.0 0.9130889 0.0
0.0 1.0 0.0 0.0
-0.9130889 0.0 0.40776044 0.0
0.0 0.0 0.0 1.0
)

23
Support / Re: Perpendicular movement bug
« on: August 11, 2009, 08:33:12 pm »
I had understood from this thread that the accepted way to set a camera's direction (as provided by getDirection()) was to do: theVector.getRotationMatrix().invert3x3()

That's all I'm really doing here. The same technique has worked in all the other cases that I've provided - even in the FPS example itself
 ???

24
Support / Re: Perpendicular movement bug
« on: August 11, 2009, 03:46:27 pm »
Okay, yes, you were right.
If I use the matrix directly (rather than a modification of the vector) then it works correctly.

I still don't see the problem with the code I have though. My debugging so far suggested that the vector was being correctly preserved. Since the matrix is behaving correctly, I'll see if I can do some debugging this evening to determine why/where/how the matrix is differing from the converted vector.

25
Support / Re: Perpendicular movement bug
« on: August 11, 2009, 11:27:01 am »
The view is inverted in two places. One in which the camera/stored values are swapped (which is called twice) and one in which the scene is rendered.

Removing the invert from the swap function causes the display to flicker between two viewpoints. It looks as if it changes between the camera direction and 90 degrees to the camera angle. But it's hard to tell.

Removing the invert from the rendering function (in gameLoop) reverses the left/right rotation as well as causing the forward/backward controls to strafe left/right.

Removing the invert from both functions causes flickering, similar to the first case.

26
Support / Re: Perpendicular movement bug
« on: August 10, 2009, 09:34:36 pm »
I'm a little confused by your reply.
The matrix is already inverted before being used in setback:

Code: [Select]
camera.setBack(swap2.getRotationMatrix().invert3x3());

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

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();
camera.setPosition(swap);

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

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]
camera.setPosition(storedPosition[0]);
camera.setBack(storedDirection[0].getRotationMatrix().invert3x3());

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.


28
Support / Re: Animation resource usage
« on: August 06, 2009, 09:41:04 am »
<smacks head>
I was imagining that an increased number of frames would increase the complexity of the processing required to animate an object.
i.e. having 1000 frames would take longer to compute each frame for 500 frames.

But that seems unlikely, since you're always carrying out one mesh change per tick. The only one resource increase should be memory (and disk).

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

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 :)

30
Support / Re: Md5 Importer
« on: July 03, 2009, 04:26:11 pm »
Quote
Just noticed this post, unfortunately.  It's very simple to export 3ds key frames using skeletal animation.  I do it all the time.  Skeletal animation would save on file size, though.

Any chance of some hints on how to do this?
I understand the principle of manipulating the model such that they collectively make up frames of a walk, but I really have very little skill with modelling or animation. Is there a trick to making the software do it for me?

Pages: 1 [2] 3 4 ... 6