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 ... 822
11776
Projects / Technopolies
« on: August 10, 2005, 12:47:32 am »
Oops, my fault. Here's the section from Config:

Code: [Select]
/*
Transparency in OpenGL is implemented in a way that tries to mimic the software renderer. If one is using OpenGL only or can live with different output, the offset in the formula used to calculate the actual transparency from an object's transparency value can be changed to broaden the range. The actual formula is trans=offset+objTrans*mul, default for offset is 0.7f. This setting is ignored by the software renderer.
*/
   public static float glTransparencyOffset=0.7f;

/*
Transparency in OpenGL is implemented in a way that tries to mimic the software renderer. If one is using OpenGL only or can live with different output, the multiplicator in the formula used to calculate the actual transparency from an object's transparency value can be changed to broaden the range. The actual formula is trans=offset+objTrans*mul, default for mul is 0.06f. This setting is ignored by the software renderer.
*/
   public static float glTransparencyMul=0.06f;


About the floating decorations: It doesn't happen every time, but quite often. Leaving and reentering the level doesn't fix it.

11777
Support / Reusing Meshes and Colors
« on: August 09, 2005, 04:39:47 pm »
Quote from: "fendres"

Wouldn't this be the fastest method to instanciate several similar objects?
No, it just won't work (as you have noticed). The Mesh is only one part of an Object3D. By creating a (0)-sized object, you are creating an empty object. That doesn't change when setting a mesh. To copy an object, just use the corresponding contructor in Object3D (new Object3D(oldObj)) followed by a setMesh, i.e.:

Code: [Select]
Object3D obj=<your 3ds object>;
Object3D clone=new Object3D(obj);
clone.setMesh(obj.getMesh());


or, without the constructor:

Code: [Select]
Object3D clone=obj.cloneObject();


The Object3D created by cloneObject() will already share the mesh of the cloned object.

11778
Projects / Technopolies
« on: August 09, 2005, 12:18:08 am »
I have noticed a bug with the decorations when switching worlds. After switching from Olbridge to Evergreen Forest, the decorations are floating in the air (http://www.jpct.net/img/proj/technobug.jpg). The settings i used (in case that matters somehow):

game.terrain.animation.enabled=true
game.terrain.decorations.range=90

11779
Support / Reusing Meshes and Colors
« on: August 08, 2005, 05:53:56 pm »
The null pointer exception is caused by the fact that an Object3D with 0 triangles doesn't have a mesh. If it's intentionally to create such objects in your code (i suggest to use createDummyObj() instead which does exactly this, but anyway), it shouldn't be needed to share the mesh instance (even if there were one, it would be emtpy...).
However, i've added some code that should fix this albeit i don't see the point in this operation... :?:
Be aware that you can't use setMesh(<Mesh>) to use the same object with completely different meshes. setMesh() sets vertex and triangle data. It doesn't set the texturing data for example.
About the getter for the color: I've added it. Both changes can be found in this pre-release jar: http://www.jpct.net/download/jpct_108a1.jar

11780
Projects / Technopolies
« on: August 08, 2005, 05:36:36 pm »
A version with the option to change OpenGL's transparency behaviour is here: http://www.jpct.net/download/jpct_108a1.jar (look at Config.glTransparencyOffset and Config.glTransparencyMul). It should also fix the billboarding flaw.

11781
Projects / Technopolies
« on: August 05, 2005, 03:37:16 pm »
What a coincidence...i've just thought about that this morning. I was wondering why no one ever required this option... :wink:
The short answer is: Yes, it is possible...but not in the current version.
The long answer is: The OpenGL renderer tries to mimic the behaviour of the software renderer. The software renderer can't go below ~50% (in fact it's 70% IIRC) for performance reasons. I think that i'll add a setting to Config (glTransparencyOffset or similar) that will allow to adjust the transparency formula for OpenGL only. This means that you'll have to adjust your transparency values when modifying this setting to get the same results as before. But that shouldn't be too much of a problem. I hope to add this on monday.

11782
Projects / Technopolies
« on: August 04, 2005, 10:35:37 pm »
Wireframe...i'm loving this option. How about a fps counter next? Do you have some profiler data for technopolies? I would like to know where most of the processing time (jPCT related) is spent (except for the AWTGLRenderer itself) to see if there are some places where i can apply some optimizations.

BTW: I'm not sure if the auto updater works reliable. I got a class not found exception and had to restart. But maybe i just caught you in the middle of an update...

11783
Projects / Technopolies
« on: August 04, 2005, 12:12:13 am »
:shock:  :shock: Very cool...

11784
News / jPCT on Windows CE
« on: August 03, 2005, 09:34:52 pm »
Just a test to see if it actually works. It does. But at least the PDA i own doesn't have a fpu, so floating point stuff is done in software via emulation, which is dog slow. Anyway, here it is:


11785
News / Version 1.07 has been released!
« on: August 01, 2005, 10:37:03 pm »
It's there! It's very similar to the pre-release versions that i've posted in some threads. Anyway, here are the changes:

http://www.jpct.net/changes.html

Have fun!

11786
Projects / Technopolies
« on: August 01, 2005, 10:16:49 pm »
Quote from: "raft"
maybe gmail is down for that moment and forum engine doesnt retry it  :?:
Maybe. It's on a shared server and i don't have access to the mailer's logs, so i don't really know.

11787
Projects / Technopolies
« on: August 01, 2005, 06:29:11 pm »
Quote from: "raft"

btw, sometimes forum engine doesnt notify about replies
Works for me all the time...couldn't possibly be your spam filter or something?

11788
Support / Re-use multi texturing
« on: July 29, 2005, 03:42:09 pm »
BTW: If you want to modify existing objects' textures on a per polygon base, you can use the PolygonManager which you can obtain from an Object3D by calling getPolygonManager();

11789
Support / Re-use multi texturing
« on: July 29, 2005, 02:36:00 pm »
You can assign different textures to an Object3D with either the 3DS loader (as you you've already mentioned) or with the addTriangle(...)-method in Object3D. Because you are writing a loader, i assume that you are already using one of those. Simply change to one with a textureID as parameter and you should be fine.

11790
Projects / Technopolies
« on: July 28, 2005, 11:48:29 pm »
Why don't you open your own thread for your project? Looks cool btw.
Are you using jPCT's ellipsoid collision detection for this? If so, a deadlock should never happen...the ellipsoid collision detection is a collision avoidance algorithm, so it doesn't really care if used on objects which are already intersecting. There is some code (2 lines to be exact) to try to push such entities out of the intersection but due to the nature of the algorithm, this may or may not work. But there should be no real deadlock. The entities should be able to move out of this situation on their own.

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