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 ... 787 788 [789] 790 791 ... 822
11821
Projects / Technopolies
« on: July 20, 2005, 09:09:39 pm »
Quote from: "rolz"
nice to see you back :)

for 4 type of terrains ( dirt, rocks, grass and sand),  and 10 levels of transitions 62 textures were generated. I used 64x64 images for tile textures.
I was never gone. :wink:
So that means around 1MB of textures...that's not much, i thought it would require more.
I noticed some jPCT/AWTGLRenderer related problems in your client and i spent some time today to get rid of them. I've uploaded a new version that includes this fixes here:

http://www.jpct.net/download/jpct107a2.jar

Changes are:

Fixed a threading issue in the AWTGLRenderer when changing the FOV. Added the option to blit into the backbuffer. This is a fix for a problem that occures when one tries to blit into the background of a over-/undersampled framebuffer. Added on option to modify sorting order of the VisList. Can be helpfull in case of sorting issues with transparent objects. Added on option to Loader to disable vertex sharing (helpfull for loading otherwise unusable keyframes in some cases). Added a new constructor to Texture to create Textures directly from Images. Improved texture loading a little bit.
Some fixes for the AWTGLRenderer: Fixed an occasional class cast exception when setting RGB-Scaling. Fixed a stupid bug that caused green color values to be mapped to green and blue when rendering (i can't believe that this one remained unnoticed). Modified frustum handling to cover a problem that could occur if two or more frames lie between two actually painted ones and the fov has been changed in between. Fixed a bug that prevented the command queue from being resized when needed in some cases which could result in some polygon missing for a frame or two. Fixed a bug that caused queued commands to be removed from the queue in some cases.



However, there still is a problem which i couldn't get fixed and i'm at a point where i'm having my doubts that's its reason can be found in jPCT but in the client. The problem is: Trees are flickering/disappearing (not sure what they really do) sometimes for a frame. I'm not talking about the "normal" sorting problems on transparent objects...this must be something different. To me, it looks like a kind of threading problem (because i had this kind of problems myself on hyperthreading/dual cpu machines). I'm just not sure if it's located in my code (i doubt it because it seems to affect trees only) or in yours. Are you by any chance doing some matrix/object/world/...-manipulation in a different thread than the one that executes the calls to World.renderScene() or World.draw()? Or in other worlds: Is there a chance that rendering and manipulation of the scene and/or objects interfere sometimes?

11822
Projects / Technopolies
« on: July 19, 2005, 11:43:26 pm »
The texture transitions are very well done. How much texture data does this approach produces?
Using OpenGL acceleration for AWT is a bad idea at least on my machine (WinXP, P4HT, Ati X800XT-PE), because it flips RGB to BGR (i.e. the loading screen is blue and the character screen brown (with a blue body)) and the VM crashes hard when i'm clicking into the chat window. It works fine using the normal AWT pipeline. Why are you limiting max. memory to 64MB? Isn't that a bit on the short side?

11823
German corner / Textures ohne X11
« on: July 18, 2005, 10:59:41 pm »
Das Problem liegt bei Java bzw. bei AWT...es läuft unter Unix standardmäßig nicht ohne X11 Server. Um das zu lösen, gibt es mehrere Ansätze.

1. X11-Server installieren (Ja, nicht immer eine gute Lösung...)
2. X11-Dummyserver installieren (z.B. Xvfb)...das soll gehen, ich habe es aber noch nie probiert
3. Java 1.4+ im Headless-Mode betrieben. Dazu muss man einen Aufrufparameter angeben: -Djava.awt.headless=true
Aber auch damit geht nicht alles...manches wirft eine HeadlessException. jPCT als API sollte damit aber gehen.

11824
Support / Changing textures!
« on: July 11, 2005, 09:29:37 am »
The for whole Object3D (i.e. one texture for the whole mesh), use setTexture(...) in Object3D. If you want to modify only parts of the object, things are more complicated and you can use the PolygonManager for this. An example:
Code: [Select]
for (int i=0; i<level.getMesh().getTriangleCount(); i++) {
          level.getPolygonManager().setPolygonTexture(i,TextureManager.getInstance().getTextureID("ql1.jpg"));
}


If you want to modify the texture's pixel data itself, you can use a ITextureEffect for that. But beware that this may be slow when using OpenGL.

Hope this helps.

11825
News / Gooooooogle Adsense
« on: July 08, 2005, 05:18:48 pm »
I've added Google's Adsense to the site. Maybe this helps to cover the hosting costs of jpct.net...but i somehow doubt it. Well, it's worth a try. I hope the ads are not too distracting...

11826
Support / collision detection
« on: July 05, 2005, 12:09:28 am »
Because your models should collide with others objects (models or the level) but each one should act as a collider itself to others, you have to use a combination of both modes on your model(s).
Try:

Code: [Select]
model.setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);

11827
Support / Background Images
« on: July 04, 2005, 09:20:17 pm »
I've added a new constructor to Texture that offers a possibility to create a Texture directly from an Image. Now you can do something like this to load and rescale your image before making it a texture:

Code: [Select]

Image image=Toolkit.getDefaultToolkit().getImage(<yourfile>);
MediaTracker myTracker=new MediaTracker(new Canvas());
myTracker.addImage(image, 0);
try {
    myTracker.waitForAll();
} catch (Exception e) {
   // do stuff here
}
image=image.getScaledInstance(512, 512, image.SCALE_SMOOTH);
TextureManager.getInstance().addTexture(<name>, new Texture(image));


I hope this helps to solve your problem. You can download this version by clicking the link i provided above. I've updated the jar.

11828
Projects / Technopolies
« on: June 29, 2005, 01:15:02 am »
Works fine (except for the bat directing to jre\...which doesn't work on my system), but i don't have a clue how to attack the NPCs. They are all standing around doing nothing (not even moving) but i don't know how to attack them... :?:

11829
News / Forum? 2.0.16!
« on: June 29, 2005, 01:06:05 am »
Yep! There are more updates for phpbb than there are for jPCT.

11830
Support / Background Images
« on: June 24, 2005, 12:25:37 pm »
What do you mean by "size"? Size in memory or size when loading? If it's about file size, i have an idea about how to do the scaling yourself in the applet. Let me know, if you are interested.

11831
Support / Background Images
« on: June 23, 2005, 06:24:01 pm »
Ok, i've added a fix for this...i'm not really satisfied with it, but it's the best i could come up with. The fixed JAR can be found here: http://www.jpct.net/download/jpct107a1.jar

Is has a new method in FrameBuffer to set the blitting target and it's used like this:

Code: [Select]
buffer.clear();
buffer.setBlittingTarget(FrameBuffer.BLITTING_TARGET_BACK);
buffer.blit(TextureManager.getInstance().getTexture("rocks"),0,0,0,0,256,256,FrameBuffer.OPAQUE_BLITTING);
buffer.setBlittingTarget(FrameBuffer.BLITTING_TARGET_FRONT);
theWorld.renderScene(buffer);


All you have to take care of yourself is, that the blitting texture will now be scaled according to the sampling mode, i.e. if you are blitting a 256*256 quad into the back buffer and are using OGSS, it will result in a downsampled 128*128 quad on screen. Or in other words: You need different texture sizes for the different sampling modes if you want them to look the same in the final image.

11832
Support / Background Images
« on: June 23, 2005, 02:55:28 pm »
Now i see...the problem is the use of oversampling in your application. It should work when you are using SMAPLINGMODE_NORMAL instead. However, that's not a real solution if you really want to use oversampling (or undersampling). The problem is, that when using X-sampling, there are two buffers and blitting happens in the output buffer. In this case, the docs are actually telling the truth...i have to think a bit about how to solve this...

11833
Projects / Technopolies
« on: June 22, 2005, 09:34:57 pm »
A small flaw: The 3d.bat misses a ; after the %CLASSPATH%

11834
Bugs / NPE in world.renderScene()
« on: June 20, 2005, 10:15:00 am »
Well, jPCT is not thread safe, so i wouldn't consider this behaviour as a bug. You'll most likely run into trouble like that whenever you are manipulating the world or objects while rendering them.
I suggest to use a kind of queue and process it in the "render"-thread or do the synchronization between your threads yourself (i.e. wait with manipulating the world until the renderScene() has finished).

11835
Support / Background Images
« on: June 16, 2005, 05:44:13 pm »
Well, it still works this way. Just try it. But i agree that the docs are a bit confusing. Must be a relic from the times where MemoryImageSource was the only kind of frame buffer that jPCT supported. What it actually meant was, that the blitting has to be applied after the newPixels()-call for the rendered image if the blitted content should lay on top of it. I'll remove or reword the front buffer part from the docs in the next version to avoid this confusion in the future.

Pages: 1 ... 787 788 [789] 790 791 ... 822