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 - Enk

Pages: [1]
1
Support / Object3D, matrices and transformations
« on: April 02, 2009, 03:20:52 pm »
Hi, I have some questions that maybe are more related to game engine design than jPCt, but anyway :)

I am currently working on a little 3D-engine in Java using LWJGL just for learning purposes, and the last couple of days I have been reading a lot about 3D-mathematics. I have some questions on how jPCT has implemented translation/rotation-matrices.

I got a working Matrix-class to handle basic 4x4-matrix operations and a simple Vector-class. I've built a little polygon-system on top of that, so currently I can load OBJ-files.

My question is how to implement the translation- and rotation-matrices in my "Object3D"-class. I got functions in my Matrix class for transforming the Matrix (translate, rotate XYZ).

Should I store the location in a Vector and have a translationMatrix in the Object-class, and have a Object3D.translate-function something like this:

Code: [Select]
public void translate(Vector3D trans) {
    this.translationMatrix.translate(trans);
    this.location.mul(translationMatrix);
}

I am very green on this subject and I haven't found any good books/resouces for this (found A LOT of books on Matrices and 3D-math but none about how you actually implements them in your program). So I just wondered how you experienced programmers would do it  ;D


2
Support / Server side collision detection
« on: August 23, 2008, 01:45:56 am »
Hi

I know this is kinda off topic, but it is possible to use jPCT to implement server-side collision detection? Or do I have to actually have a window rendering the world to do it? :P

I am a totally n00b when it comes to multiplayer-programming, but it seems like a good idea to let the collision detection be server side because of client perfomance/security.

3
Support / Texture-coordinates from Blender
« on: August 16, 2008, 12:24:04 am »
Hei, I am having a problem with textures from blender.

I have a heightmap (which is actually just a flat plane). I have assigned a material named "rocks" and a texture to the material named "rocks" (the picture from the car-test example). I have sat x- and y-repeat to 16 and exported it as a 3DS-file, but when I run it the plane is just green (the texture is probably stretched).

In my program I have

Code: [Select]
Texture rocks = new Texture("textures/rocks.jpg");
texture_manager.addTexture("rocks", rocks);

Object3D terrain = map_manager.loadMap("models/map/1.3ds");

Function loadMap:
...
        Object3D[] objs = Loader.load3DS(input, 400);
        if (objs.length > 0) {
            map = new Map(objs[0]);
            map.setTexture("rocks.jpg");
        }
       
        return map;
...

What do I have to do to get the texture-coordinates from blender to work (as in the 3DS-file in the car example).


4
Support / Animation Subsequences
« on: August 14, 2008, 01:25:49 am »
Hei!

Just have to say that jPCT is a really great engine! I just started coding in Java, but jPCT is really easy to use.

I have a question regarding subsequences with MD2-animations.

What does exactly define a subsequence? Is there like 20 keyframes per subsequence or? A


I am using Milkshape for MD2-modelling and Blender for 3DS+++ btw.

Pages: [1]