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 ... 785 786 [787] 788 789 ... 791
11791
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...

11792
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...

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

11794
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...).

11795
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.

11796
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/

11797
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.

11798
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.

11799
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).

11800
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.

11801
Feedback / Still Another Suggestion...
« on: March 10, 2003, 08:01:13 pm »
I understand your point, but i'm undecided if i should support it that way. The thing is, that making setAdditionalColor() support the transparency as well somehow collides with the naming of this method (because the transparency isn't an additional color at all...it's a basic property of the Object3D and it should be treated like that IMO). Maybe i'll add another method that does this combined setting instead...any suggestions for the naming of this thing?
I've added the setScale()-method you requested and it will be included in the next release that should surface within some days (at least i hope so). Anyway, the scale()-method is buggy in 0.84...the normals will be screwed up if more than one scaling is applied to the same object. Ever noticed that as a problem?

11802
Feedback / Another Suggestion
« on: March 07, 2003, 01:57:07 am »
I'll have a look at it when my new system (P4-3GHz...  :D ) is ready and all my Java development stuff has been installed again.

11803
Feedback / Feature Suggestion
« on: March 04, 2003, 09:14:19 pm »
Ok, i've added removeAllObjects(), removeAllLights(), removeAll() (as a shortcut for both), getObjects() and (while i was there) removeObject(Object3D). I haven't tested them much though, so please let me know if they do what you want them to do.
The new version is online, but i haven't changed the version number for that...it's a silent update. :D

11804
Feedback / Re: Feature Suggestion
« on: March 03, 2003, 10:56:56 pm »
Quote from: "PrimordialSoup"
I need a way to iterate over all the Object3D's that are attached to a particular World instance.  I saw no way to do that in jPCT's API.
   I guess for now I'll just have to keep an external LinkedList to do this, but I just thought I'd make the request.  Preferably I would like to have an iterator object to work with.
   In addition, a method to remove all objects from a world would be extremely helpful to me.
On a side note (for curiousity's sake) I was wondering how does jPCT's World class store it's references to Object3D's?

The references are stored in a Vector (plain and simple...and slow...but ok for the world because it's not a bottleneck at all). So i can either return this Vector (not that good IMO...) or its elements in an Enumeration. I can't use an Iterator, because that would be Java2 only and i don't want to break 1.1 compatibility. Can you live with that?
Should the "remove()"-method only empty the collection of objects or should it empty the whole world (incl. lights...)?

11805
News / Version 0.84 has been released!
« on: February 27, 2003, 09:09:24 pm »
0.84 features some performance improvements and a new possibility to tweak the tranformations' performance for (semi-)static objects.
The 3ds can now load texture coords correctly (at least i hope it does...).

Pages: 1 ... 785 786 [787] 788 789 ... 791