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

Pages: 1 ... 780 781 [782] 783 784 ... 786
11716
Support / Deployment Problem
« on: April 04, 2003, 03:41:06 pm »
Quote from: "Neoteric"

And onother question, wow easy would it be to use a model with bones?
For doing animations?

11717
Support / Deployment Problem
« on: March 31, 2003, 11:20:58 pm »
I'm always using the JAR-utility that comes with the JDK. I once tried to include a project's classes and all associated libs into a jar using JBuilder and i failed (not saying that it isn't possible though), so i reverted to the JDK's JAR-utility.

11718
Support / Re: Ok thanks
« on: March 27, 2003, 05:40:26 pm »
Quote from: "Anonymous"
Thanks for the added functionality.  One question though.  Does the cloneMatrix() function create a new Object everytime therefore causing pauses in the garbage collector?  Or do you think it wont cause a problem.
It does, but that shouldn't be too much of a problem. There are others ways that can be taken to avoid this (rotate the camera, do the alignment, rotate it back for example). But as i said: You usually don't need to do this, if you are happy with alignment with the z-axis (which should be the normal case for rockets, lasers etc.).
BTW: Albeit it does create a new matrix, i don't think that you'll ever notice pauses or hickups caused by the gc because of this.

11719
Support / Some helpful Object3D,Camera, and SimpleVector functions
« on: March 26, 2003, 11:58:32 pm »
0.86 is out and it comes with three align()-methods. Two in Object3D and one in Camera. Keep in mind that alignment always happens with the z-axis of either the camera or the object (depending on the method), i.e. if you want to make the camera facing into the direction of another axis than z, the rotation (from z to ...) has to be applied to the camera afterwards:
Code: [Select]

camera.align(obj); // the camera is now aligned with the positive z-axis of obj (transformed into worldspace)
camera.rotateY((float) Math.PI/2f); // Now it's aligned with the positive x-axis of obj
...


Something similar is required to align an object with another camera-axis than z. Here's an example of just one possibility:

Code: [Select]

// tmpCam is a temporary camera initialized somewhere and reused here
tmpCam.setBack(camera.getBack().cloneMatrix()); // clone it, to ensure that the rotation does not modify the normal camera
tmpCam.rotateY((float) Math.PI/2f);
obj.align(tmpCam); //The object's positive z-axis is now aligned to camera's negative x-axis


This may look more complicated then it actually is. In your case, you don't have to deal with these cases anyway, i assume. I just wanted to mention them here to show that it's possible even if the standard align()-behaviour is a kind of z-axis-matching. I hope that these new methods are helping you out. If not or if any other questions arrise, please let me know.

11720
News / Version 0.86 has been released!
« on: March 26, 2003, 11:39:56 pm »
I've added some align-methods for objects and the camera as requested. In addition, i added some methods to SimpleVector and faster (but more limited) invert()-method to Matrix.

11721
Support / Some helpful Object3D,Camera, and SimpleVector functions
« on: March 19, 2003, 11:14:27 pm »
No, we are both confused now  :wink:  What you are describing is what i understood too. Maybe my wording wasn't that good...
Anyway, i'll think about it..next week or so...

11722
Support / Some helpful Object3D,Camera, and SimpleVector functions
« on: March 19, 2003, 07:47:41 am »
I guess what you want to do is to align a projectile (or another object) in a way so that it points into the direction of the camera (or an Object3D). Like firing a rocket from your ship into the ship's direction!?
I'll think about it later (don't have much time now...maybe next week).
About this part of your code:

Code: [Select]
forward=zaxis.toArray();
sphere1.translate(forward[0]*.2f,forward[1]*0.2f,forward[2]*0.2f);


...calling toArray() is not needed here. The x, y and z components of a SimpleVector are public members (for performance reasons), so you can access them directly like this:

Code: [Select]
sphere1.translate(zaxis.x*.2f, zaxis.y*0.2f, zaxis.z*0.2f);

Edit: I think i'm going to add the requested scale()-method to SimpleVector anyway...

11723
Bugs / Re: version .85 bug
« on: March 18, 2003, 06:51:42 pm »
Quote from: "PrimordialSoup"
my program scales all objects in universe about 30 times a second
It's so amazing, which options people are actually using and which options i thought they might use. I remember that, when i added the scaling-method, i thought that no one will ever use this... :wink:

11724
Bugs / version .85 bug
« on: March 18, 2003, 06:59:44 am »
Well...yes...i've missed this one somehow. I've uploaded a fixed version (at least i hope it's fixed...i'm in a hurry right now...).

11725
News / Version 0.85 has been released!
« on: March 17, 2003, 07:43:56 pm »
Yeah, right: I decided to release 0.85 today even if not all the features i wanted to add made it into this release. I just wanted to release something that works with the new LWJGL 0.5. In addition, a new scaling method and a simulated flat-shading were added as well as some minor changes to the documentation.
Please note: This version requires LWJGL 0.5 if OpenGL should be used. It won't work with 0.4.

Edit: An updated version of 0.85 has been uploaded that removes the debugging output mentioned in the "bugs"-forum.

11726
News / LWJGL 0.5 is out!
« on: March 17, 2003, 06:54:03 pm »
FYI: A new version of LWJGL (the lib jPCT uses for the OpenGL binding) is out. jPCT 0.84 won't work with this version though, but 0.85 (to be released...) will.
If you are interested in LWJGL, grab it here: http://java-game-lib.sourceforge.net/

11727
Feedback / Still Another Suggestion...
« on: March 14, 2003, 12:13:56 am »
I think i like the setTransparentColor()-idea the most. I think i'll add it. I don't know when the next release will be ready though. My new machine and my dev. environment are fine now, but i thougt it might be a good idea to put some Cyanacrylat glue (no...don't ask how this happened) into my left eye...this makes it quite difficult to see things clear...:cry:
Anyway, normals are used for lighting and backface culling and similar stuff. Every vertex of a Object3D is associated with a normal vector, which is rotated and translated together with the object. When scaling is used, the normals are scaled too...but they shouldn't because they have to be normalized (length==1)...hence the name. So they have to be adjusted afterwards. In 0.84 (and all former versions) this rescaling is buggy. The result is, that the object appears too bright or dark, depending on scaling. 0.85 will fix this.

11728
Support / Object Manipulation and Matricies
« on: March 12, 2003, 05:18:10 pm »
I don't quite understand...!? Do you want this rotation/translation to be permanent, i.e. manipulate the object after it has been loaded? If so, at least for rotations there is a way to achieve this by using the rotateMesh()-method. Just set up the rotation matrix in the way you want it to be and call rotateMesh() to execute this on the object's mesh data (don't forget to reset the rotation matrix afterwards). The bounding box needs to be recalculated afterwards, but the method already takes care of this. If this is what you want, i can add a translateMesh()-method as well. If not, please let me know...
Edit: Please keep in mind that this is intended to be done at startup, not during runtime, because it's not as cheap as "normal" transformations are.

11729
Feedback / shading types
« on: March 11, 2003, 07:48:13 pm »
The next release (0.85) will most likely contain the feature you requested. As mentioned, flat shading will be emulated by feeding face normals into the gouraud shader instead of vertex normals, so it won't be any faster than gouraud.
In addition, it disables the usage of triangle strips, so it's even slower when using OpenGL support (not noticeable on nVidia hardware, quite noticeable on ATI cards).

11730
Feedback / shading types
« on: March 11, 2003, 05:52:47 pm »
build() averages the normals of polygons whose vertices are (very very) close to another. I've never added flat-shading, because i considered it to be useless nowadays. It should be possible to "hack" it into the normal-calculation by taking the surface normal as a vertex normal for all the vertices of a polygon. If you really need it, i'll think about that. What i won't do is to implement a flat-shaded-only renderer, i.e. there won't be a performance gain when using flat-shading done in this way.

Pages: 1 ... 780 781 [782] 783 784 ... 786