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 ... 784 785 [786] 787 788 ... 791
11776
News / Version 0.88 has been released!
« on: April 23, 2003, 07:19:49 pm »
Optimized OcTree generation and added some methods to Interact2D. Fixed a bug in getWorldTransformation() when using lazy transformations, modified some small parts of the documentation...that's it for now... :wink:

11777
Support / A few questions...
« on: April 22, 2003, 09:54:06 pm »
Quote from: "GP"
Well, let's say I have a unit of 20 warriors. In my game they will just be 20 boxes with textures on their front and back faces on 20 bases (just like old tabletop games like D&D, but I'm getting off-topic). I want the player to be able, holding Shift or Caps Lock, for example, to display information over the units, under the form of 2D icons (I could do it with 3D objects hovering on the unit, but they wouldn't be well visible from every angle), for example an icon if the unit is fleeing.


I see...instead of doing 2D blitting, it is also possible to use billboarded 3d objects. But that may be overkill. Doing it the 2D way should be a fine solution.

Quote from: "GP"
So what I need is a method like : public Point get2DPosition(Camera c, 3DObject targetObject), (with -1 or something representing offscreen positions), for determining object center in the scene. Alternatively, any point in the world could be fine...
I think i'll head for the "center"-way of doing it. It's easier to understand for "non-3ders".

Quote from: "GP"
I'm moving objects with only "rotate" and "translate" and not by "setOrigin", does that mean I can treat object- and world-coordinates as the same thing?
No, the object-space never changes (unless you are using the unfamous rotateMesh() and translateMesh() methods). However, a center of (0,0,0) will be virtually translated to (0+xt,0+yt,0+zt) if you translate the object by (xt,yt,zt)...so if your object's center is at the origin (in object-space) and you are doing translations only (or the rotation pivot is at the origin too), then your approach should work, but i like the idea of directly projecting the center more.

Quote from: "GP"
Ah, I was forgetting! A simple, non-vital thing this time  :) I'm implementing the sidebar blitting it from texture. It covers a quarter of the screen, wasting quite a lot of processing time... I remember that in OpenGL you can specify a subset of the frame buffer for rendering (i.e. a smaller rectangle), this way one can display a static image without performance loss. Is that possible to specify, at least in the OpenGL hardware renderer?
I'm not sure about that...blitting in OpenGL is actually done using textured quads, so limiting the output for rendering would kill your blitted bitmap too. For the software renderer, it may be possible. I'll think about it later.

I hope to release a version featuring the projection-thingy within the next few days.

11778
Support / A few questions...
« on: April 22, 2003, 05:59:13 pm »
Quote from: "GP"
If such a method does not exist, I think I'll have to do the math myself using tan's and sin's... would you have any suggestions?
That won't work (and especially not by using trigonometric functions), because you would need some internal Camera-stuff for doing it. It shouldn't be a problem to add such a method for you to jPCT but the question is: What should it project into 2d? I can imagine the center of an Object3D, the rotation pivot (less likely to be usefull) or any point you throw at the method. But this would have to be a point in world-space, while the center is in object-space. Or in other words: Using the center takes the objects' transformations into account while using a point in world-space can't. I may add both methods as well. What do you want to use the method for exactly?

11779
Support / A few questions...
« on: April 19, 2003, 06:25:20 pm »
The int[]-method is only slower when using OpenGL. When using software rendering, both methods should perform the same. Another way to do it, is to use the "texture-method" and implement your output-code using ITextureEffect. By implementing this interface in a class of your own, you have direct access to the texture's binary data. Problem with this is, that for OpenGL, a texture upload has to take place everytime the texture-effect has been applied. The good thing with this is, that the upload takes place only after the texture has been changed and not for every blit. Another way would be to use the int[]-method and set "glUseIgnorantBlits" in Config to "true"...but be carefull with this, because it prevents any texture-upload from any int[] until you set it back to false.
I suggest to go with the ITextureEffect-approach and see how it performs.
Anyway, i suggest to precompute as much as possible to avoid costly conversions at runtime.

11780
Support / Deployment Problem
« on: April 09, 2003, 04:00:25 pm »
Quote from: "Neoteric"
Are the LWJGL-team working on problem 1?
They mentioned it some time ago, but i think the priority is not very high. They seem to favour Java WebStart instead.

11781
Support / Deployment Problem
« on: April 07, 2003, 06:35:45 pm »
Quote

Does the openGL version offer any speed up yet? Last I remember it didn't.
:shock: ...??...but...but..it should... :wink: The hardware support via LWJGL is way faster than the software modes. If it isn't, OpenGL may run in software emulation (done by the OpenGL implementation, not by jPCT) for some reason but i doubt that this will even work. There are three rendering modes in jPCT: software legacy (default), software OpenGL-look-a-like (a bit slower than legacy but using OpenGL's lighting model) and finally the hardware OpenGL renderer itself. Try the terrain example in OpenGL. It should be much faster (around 10 times on my machine) than the software rendered version.
Two problems with LWJGL though:

1.) It doesn't work in an applet (a security problem which has to fixed by the LWJGL-team...nothing i can about it)
2.) No support for AWT/Swing stuff in the OpenGL window (a design decision of LWJGL)

Does this answer your question somehow?

11782
News / Version 0.87 has been released
« on: April 06, 2003, 06:25:01 pm »
Not much has changed in this version...anyway: The culling may be a little faster now (in some situations), the accuracy of some SimpleVector methods is higher now as well as the accuracy of the Camera's lookAt()-method (has much improved...the "shaking" should be gone now).
Oh, and a method to query an object about collisions that took place is in.
Have fun!

11783
Support / Deployment Problem
« on: April 06, 2003, 04:59:36 pm »
Are the textures/models part of the JAR? If so, you may have to use the "InputStream"-methods/contructors  to access them. Or, if they aren't part of the JAR, the methods/contructors with "URL" are what you need. Either that or try adjusting the applet-params like setting codebase="." or something.

Edit: Another thing that may fool you: Windows in not case-sensitive, so loading "HuRz.Jpg" will work even if the file is named "hurz.jpg" on the HD. On a webserver, this won't work though. Just a thought...

Edit2: OT: A new version (0.87) is out which major improvement is a much more accurate lookAt()-method. If you're using (or plan to use) this method, you should get the update.

11784
Support / Deployment Problem
« on: April 05, 2003, 01:19:36 pm »
Quote from: "Neoteric"

Your classes but I think the problem is my end, everything is included in the archive fine, it can find the classes, but on frame buffer instantiation it throws the exception. I think it's a packgage problem.

Are you sure that you've included BufferedImageBuffer and MemoryImageBuffer into the JAR? jPCT doesn't do very much in the instantiation of a FrameBuffer that may cause this exception but it dynamically loads one of these classes depending on the VM (Memory... for 1.1 and Buffered...for 1.2+). Maybe this fails because the classes are not there? Does it output some blah before it crashes? Like "java version is:"??

11785
Support / Deployment Problem
« on: April 05, 2003, 02:28:16 am »
Quote from: "Neoteric"

yep.
jPCT doesn't support this ATM. However, it supports keyframed animations either directly loaded from a MD2-file (quake2 model format) or done "by hand". I suggest to convert the animations into keyframes and let jPCT interpolate between them. Support for other kinds of animation is on my list, but with a very low priority, so don't count on it.

Quote

I'm getting there deploying, but when I load the JAR explorer is saying there's a null pointer exception for some reason.
That's a bit too vague...in your code or in mine?

11786
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?

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

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

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

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

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