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 ... 777 778 [779] 780 781 ... 823
11671
Projects / Imperio - Galaxy-wide strategy
« on: November 28, 2005, 10:42:35 pm »
Quote from: "meinfilter"
I supposed there was going to be a performance problem about the distant stars background, but I wonder if it could be mitigated somehow, like drawing them like points instead of using a texture, for example (and perhaps not drawing many many stars). By the way, is there a way to draw points instead of polygons? Would it be faster if there was one? To apply a texture on the sphere would be the wiser approach?
Drawing points would still require a zbuffer read/compare. Maybe the best (or at least a reasonable) solution is to use actual objects placed on a sphere instead of the textured sphere. They can be stars, distant galaxies etc...that way, you are saving fillrate and are getting a higher flexibility. At least until you insist on hundreds of stars in the background, which i think you don't.

11672
Support / Re: Featurerequest ;)
« on: November 28, 2005, 08:59:03 am »
Quote from: "Uija"
Is there a way to serialize OcTrees?
Octree implements java.io.Serializable, so you should be able to serialize it using Java's standard serialization methods.

11673
Support / Another Problem, now with checkForCollision
« on: November 27, 2005, 02:19:40 pm »
Quote from: "Uija"
Another thing: My "Map" contains currently 40x40x2 Triangles. when I build a octree with it, I get a stackoverflow. isnt it meant to be used on big objects?
There are situations, where the subdivision of an object fails and the recursion never ends...i can't remember exactly when this happens, but there should be a thread about it IIRC. To prevent this, you may create the octree with a maxDepth (5 or 10 or whatever) by using the corresponding constructor. What's your setting for maxPoly for that tree (shouldn't be lower than 100 IMHO)?

Edit: A little more on this subject: jPCT doesn't split polygons for creating an octree. It just tries to decrease polygon count in a node by subdividing the node if needed. On some objects, this doesn't work, because the polygons already cover the whole node. There is no way to decrease their number by subdividing that node...they will just cover it even more. By limiting the depth, you make jPCT stop at a certain depth.

11674
Support / Another Problem, now with checkForCollision
« on: November 27, 2005, 12:18:48 pm »
Try to adjust Config.collideOffset (and, if that fixes the problem, enable Object3D.setCollisionOptimization() afterwards to get some performance back).
Maybe your plane is too large to be covered by the default setting (most likely, especially if you are already 30 units away from it). Whatever you do, try to make sure that everything in your world takes places in almost the scale or you'll run into accuracy problems sooner or later (for example: don't translate your objects by 100 if your polygons are all one unit in size).

11675
Support / OutOfMemoryError
« on: November 26, 2005, 12:09:28 pm »
I see...your plane is quite huge. ATI's per pixel fog implementation is actually per vertex, which can produce strange results when polygons are quite huge. I've already noticed that but never investigated it further. I suggest to split the plane into smaller ones. The lighter/darker effect you are experiencing has the same source. It's linear interpolated across the polygon. Depending on where the actual vertex of a polygon is located, the result may change.
In a real world application, you shouldn't use planes that large anyway, because it will cause lighting to show similar problems.

11676
Support / OutOfMemoryError
« on: November 25, 2005, 11:23:10 pm »
Quote from: "Uija"

funny thing is: this only happens on my notebook (ATI) and not on my MainPC (NVidia)
Driver problem? Which card/driver version are you using? Can you provide me with a test case for that?

11677
Support / OutOfMemoryError
« on: November 25, 2005, 03:28:32 pm »
If it's the same model (or maybe just with different textures), you can load it once and use cloneObject() in Object3D on it to create your additional instances. That will reuse the mesh and animation data. If the current state of the animation is different for all models, it's additionally required to clone the Mesh because otherwise a call to animate() on Object 1 will influence Object 2. So the idea is basically:

Code: [Select]

Object3D newAnimObj=oldAnimObj.cloneObject();
newAnimObj.setMesh(newAnimObj.getMesh().cloneMesh(true));


In addition, you may set Config.saveMemory=true.
For reference: Paradroidz runs with -Xmx256m and uses around 128m of this . It uses around 3100 Object3Ds which it holds in that memory all the time.
Keyframe animation, however, is expensive in terms of memory usage.

Edit: The current WIP of 1.09 already includes a change suggested by raft that strips some unused information from meshes that are used for animation only. I may add this change to Animation itself somehow. It should help too...

11678
Projects / Imperio - Galaxy-wide strategy
« on: November 24, 2005, 11:18:04 pm »
Quote from: "Raven"
Actually, I've been wondering about the same thing. I've pondered as far as using char ASCII values and having a texture with characters at corresponding 'cutout' points similar to the jPCT FPS demo's frames-per-second blitting. Seems tedious, however.

Can anyone point out a better, general way of blitting Strings?

It depends on your needs. If the text doesn't change much, you can render it into a texture and use that. If it changes often, you are better off with the method the fps-example is using. That's because creating a new texture every frame may still be possible when using the software renderer, because there is not much overhead involved when creating a new texture (or modifying an existing one via the ITextureEffect interface), but when using the hardware renderer, performance will suffer very much if you are doing that.
Or you can use standard swing/awt to blit directly onto the canvas when using the software- or the AWTGLRenderer.

11679
Projects / Imperio - Galaxy-wide strategy
« on: November 24, 2005, 11:14:38 pm »
Quote from: "meinfilter"

About drawing distant stars: they are just for decoration; the camera can move around, but I would set a limited volume in which it can do it, so these distant stars would remain always distant.

Then a skybox or -sphere should be sufficient. But that eats up your fill rate for the software renderer. Are you planning to use soft- or hardware rendering?

Quote from: "meinfilter"

Something like using the Java API to draw the characters on an image and then applying the image as a texture on the billboarded quad would be the right approach?
I guess that you'll generate them once and use them from there on? Then you are fine to draw an image using standard Java2d stuff and upload that as a texture. If the text changes a lot, you should compose your texts from various texture parts instead (see below).

11680
Bugs / Geforce 4 and opengl
« on: November 24, 2005, 05:26:54 pm »
Have a look here: http://www.3dcenter.de/downloads/treiber-geforce-w2k.php
It's a german site but driver numbers should be international... :wink:

11681
Projects / Re: Imperio - Galaxy-wide strategy
« on: November 24, 2005, 04:56:33 pm »
Quote from: "meinfilter"

- Drawing distant stars as points (maybe on some huge sphere that contains the whole scene) that must rotate as the scene does.

Possible IMO, but the way i'm thinking of requires some work to do it. Are these stars actually reachable or just for decoration?
Quote from: "meinfilter"

- Drawing each planet's name under it (so I need a way to draw characters that are always looking at the camera, whatever its position).
Possible . You could use a billboarded quad (will grow/shrink depending on the distance, text may be hard to read if too small) or blitted text (will always have the same size, always be readable but doesn't take overlapping into account). It depends on your needs which way is better.

Hope this helps.

11682
Support / Re: Path Finder algorithm
« on: November 23, 2005, 05:19:28 pm »
Quote from: "ale"
I must to use Portals? If yes, it's possible to generate Portals in automatic manner in load model procedure?
Portals in jPCT are for geometry culling only. They won't help you in your case, there is no way to auto-generate them (because it's almost impossible to place them as good as an artist would be able to do it) and i don't recommend to use them. The code base they rely on hasn't been tested by anyone for ages now. Use octrees instead.
However, for A* use the grid approach that rolz mentioned. Paradroidz (albeit not using A*) is doing the same thing. It works grid based only (for AI, collision detection, movement) for entities that are invisible and uses a combination of grid/geometry based for entities that are. Works just fine.

Edit: Inspired by this thread, i've changed Paradroidz' path finding to a slightly modified A*...works better than before now.

11683
News / New logo!
« on: November 23, 2005, 04:48:08 pm »
Here's the hires version: http://www.jpct.net/download/jPCT_logo.png

11684
Projects / Raven's projects
« on: November 22, 2005, 05:38:08 pm »
I just found this thread about game timing. Maybe it helps: http://forums.indiegamer.com/showthread.php?t=5192

11685
Projects / Technopolies
« on: November 21, 2005, 11:43:53 pm »
Quote from: "rolz"
Regarding mac os - i had similar problems and i thought they are somehow connected with javagamesfactory which goes down sometimes. Try again today
Javagamesfactory in its current is unusable IMHO. It's down very often. And if it isn't, just try to upload your files once or twice and see it stop responding. The administration is buggy as hell. I'm usually tearing my hair out to make it do what i want it to do. The JNLP created most be from hell. The only thing it does reliable is to blame others for their stupidity (have a look at the html sources). I would never rely on JGF alone to host my stuff. I love the idea behind it though.

Pages: 1 ... 777 778 [779] 780 781 ... 823