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 ... 794
11776
Support / problems problems...
« on: September 22, 2003, 06:26:56 pm »
How slow is "slow"? From the code you presented, i can't find anything wrong with your approach. It's basically the same what i'm doing in jPCT (albeit i'm interpolating v,r,g,b too...just like in the code i've posted in your last thread).
A wild guess would be, that your ZBuffer[] in not int[] but float[] or whatever which would cause an implicit conversion all the time, but i doubt that... :wink:
What VM are you using? Have you tried the (unfinished) demo i posted here: http://www.jpct.net/forum/viewtopic.php?t=75? It's based on a much more recent version of jPCT than the old jPCT-demo. How fast does it run on your machine?

11777
Support / Re: map to 3ds
« on: September 22, 2003, 06:16:35 pm »
Quote from: "Barrah Switzer"
I have a conversion program that says it will convert it to 3ds.  Once it's converted I should be able to load it as a 3ds object???  Then is it just  a matter of collosion detection and controlling the camera??
Basically yes! I'm currently writing some example code that shows how to start (the collision detection isn't perfect in this example and you can't shot anything, but anyway...).
I've uploaded a demo of it here (still without sources, but they'll follow once it's finished):
http://www.jpct.net/download/fpsdemo.zip
Controls go like this:
Code: [Select]

Commandline parameters:

width=xxx  : The width of the framebuffer
height=xxx : The height of the framebuffer
fullscreen : Force the engine to use fullscreen modes
16bit      : Try to get a videomode with 16bit color (instead of 32)


Controls:

cursor-keys : Moving around
PGUP/PGDWN  : Looking up/down
ESC         : Exit
x           : Switch between Software/LWJGL mode (may have some problems in fullscreen mode!)


BTW: I'm very interested in the HL->3DS converter (the level i'm using for the demo has been converted from Q3 format), because i was always looking for such thing but couldn't find anything good (that worked!).

Hope this helps.

11778
Support / Re: Wireframe
« on: September 22, 2003, 06:06:17 pm »
Quote from: "Anonymous"
Is there a way to render wireframe?  If not, is there a method that will convert a 3d point to a point on the screen?
To answer your first question: No, there isn't (not yet). jPCT isn't targeted to that kind of rendering. Anyway, i've already thought about adding support for it...i just have to have a look at the software renderer if it would fit in there without much hassle. Are you using software or OpenGL mode? In the later case, i can offer to add a temporary solution that would work in OpenGL (i.e. hardware rendering) mode only (this is basically one line of code to add).
What exactly do you have in mind with your second question? There is a method to project and object's center from 3D into 2D, but there isn't a method to project all vertices of an object in that way.

11779
News / Version 0.93 has been released!
« on: September 16, 2003, 06:25:59 pm »
I've noticed a flaw in the GLRenderer that was caused by the fact that LWJGL0.7 behaves slightly different than 0.6...it's fixed now and i've uploaded the fixed version as a "silent update"...

11780
News / Download jPCT
« on: September 15, 2003, 10:47:29 pm »
I just realized that maybe not everybody who reads about the new versions here knows where to download them. So here's the link:

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

and the online-docs can be found here:

http://www.jpct.net/doc

11781
News / Version 0.93 has been released!
« on: September 15, 2003, 10:45:21 pm »
The topic says it all (almost)...the change-log can be found here:

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

As you can see, this version supports LWJGL 0.7. It comes with a slightly newer version of the LWJGL-DLLs (0.71a) than the last official release of LWJGL does.

Finally, here's a shot showing how the new RGB-scale option for Lights may look like...this is vertex lighting only and as you may have noticed, the colors are looking quite rich though.


11782
News / Version 0.92 has been released!
« on: September 15, 2003, 06:55:58 pm »
Thank you and feel free to post bugs/feature request or simply questions regarding jPCT in this forums.
Oh, and while i'm here in the news-section: jPCT 0.93 is on its way, supporting an improved lighting (look in the support forum for more details) and LWJGL0.7 support as well as some smaller fixes and enhancements. I'm just waiting for a problem i'm having with LWJGL to be sorted out by the LWJGL guys and then we go...

11783
Support / How does jPCT handle lighting in OGL?
« on: September 09, 2003, 10:02:55 pm »
Related to this: The upcoming version 0.93 will (most likely) have support for RGB-scaling which can improve lighting quality/appearance. Here are some examples...


No scaling (this is what 0.92 would render)


2x scaling


4x scaling

While this isn't exactly what the software renderer offers (overbright lighting), it comes close to it. The software renderer will support the scaling too, of course.

11784
Support / How does jPCT handle lighting in OGL?
« on: September 05, 2003, 05:36:49 pm »
Quote from: "erikd"

You mentioned that although in theory the number of lightsources is unlimited, one will experience slow downs with large numbers of lights. I suppose this is to be expected, but is there some occlusion/visibility culling regarding lighting to help here? Or maybe I'll have to implement that myself?
Per default, jPCT will take every active lightsource in a scene into account even if it only adds 0.0000000000001 of intensity. However, you can configure the engine, so that it discards lightsources that are too far away from a polygon (0.93 will improve the performance of this discarding a little bit). If you decide to use jPCT, we'll see what happens and if some more improvements are necessary in this area.  Anyway, i think it's quite fast the way it is now.

I already thought about adding multitexturing in one way or another but the OpenGL-only-way doesn't please me and adding it to the software renderer is possible (and not even that hard) but it would require to split the software renderer again into a multitexturing and a singletexturing one, because otherwise the performance of singletextured polygons will drop significantly too. That would make three of them at least... :?
Maybe i'll add it anyway one day or another, because i did that with most of the stuff i was undecided about (like OpenGL-support, the 3DS-loader, animations, texture-tiling...all things that weren't that much fun to do and because i'm lazy, i avoided adding them for some time but finally they made it into jPCT... :wink: ).
However, don't count on it to happen within the next few months...one can only do so much and there are still other things to do (like working on lighting performance... :wink: )

11785
Support / How does jPCT handle lighting in OGL?
« on: September 04, 2003, 07:46:35 pm »
I've seen Mazer before...as well as the zBuffer-flaws the lighting implementation causes... :wink:

To answer your question: jPCT can't to lightmaps, because it can't do multitexturing. This limitation comes from the fact that it's not hardware only but offers a software renderer too. Multitexturing in software is so expensive, that i decided against it and because the feature-set of both renderers should be as equal as possible, there is not support for it at all.
However, it does have its own T&L pipeline and offers a lighting similar to the native OpenGL lighting (i.e. vertex lighting). It supports ambient, specular (in two slightly different implementations) and diffuse lighting with an unlimited amount of lightsources (in theory...in practice, performance starts to drop when you are overusing light).

I guess you've already seen the "viewer"-test-app i posted on javagaming.org. What you see there is all vertex-lighting using some more or less randomly placed lightsources...and i think it looks quite well for vertex-lighting, so maybe this is still an option for your game.

BTW.: The software renderer supports overbright lighting, which increases the possibilities of vertex-lighting very much (i.e. the maximum light intensity per channel is not 1 but 32 in this case). Sadly, no current consumer hardware can do this, so the OpenGL renderer can't make use of it. The 3dfx Rampage would have supported it, if 3dfx would have just survived... :cry:

11786
News / Version 0.92 has been released!
« on: August 28, 2003, 05:47:20 pm »
This is major update compared to the previous ones. Most important: it adds a new restriction...the height of textures used by the software renderer has to be a power of 2 now. This allows the software renderer to support texture tiling (finally).
However, a lot of other things have been done, so have a look at the changes-document here: http://www.jpct.net/changes.html

Have fun!

11787
Support / Orbiting camera
« on: August 27, 2003, 05:29:07 pm »
Fixed it...try the updated version using the same link as above. I was mixing up the coordinates in the method, so the results were totally wrong *most* of the time, but somehow not in my test-case...
Anyway, it should work now. I got it working like this:

Code: [Select]

       cube=Primitives.getCube(20);
       cube.setEnvmapped(Object3D.ENVMAP_ENABLED);
       theWorld.addObject(cube);
       cube.build();

       dummy=Object3D.createDummyObj();
       dummy.setCenter(new SimpleVector(0,-40,-100));
       dummy.setRotationPivot(new SimpleVector(0,0,0));


The thing is, that it works this way, but without any other objects in the scene, you won't notice it (except for the fact that the lighting will change).
Anyway, what i basically did was to offset the center of the dummy so that it starts at the point where the camera should be placed in the beginning. You have to make sure, that the RotationPivots of the dummy and the player are describing the same position in WORLDSPACE after doing the transformation (despite the rotation pivot never actually get transformed...). This can be tricky if they differ in OBJECTSPACE...which they don't in this example (they are both placed at the origin). However, maybe drawing this on a piece of paper helps...at least it helped me. There may be other options to get the same effect, but this should work. Then again, i haven't stressed this method very much, so i'm not sure which fancy tricks it will allow for and which not.
I hope it was somehow understandable what i tried to explain...

11788
Support / Orbiting camera
« on: August 27, 2003, 02:23:11 pm »
First, you can't do that:

Code: [Select]
cameraHolder.setRotationPivot(player.getTransformedCenter());

because you are mixing worldspace and object-space coordinates here, which isn't what you want.
Second, it seems to be my fault...the getTransformedCenter() seems to be fishy. I'm at work, so i could only do some small tests and don't have the source available, but the returned center seems to be a screwed up variant of the actual center. I really wonder why it worked in my short test yesterday... :?:
I got the thing you want working even with the buggy method, but i had to swap coordinates in the SimpleVector and rotate the dummy object around x instead of y....strange...
I'll have a look at the problem, but i'm not sure if i manage to do so today.

11789
News / LWJGL 0.7 is out!
« on: August 26, 2003, 07:52:52 pm »
Get it here: http://www.lwjgl.org/

Anyway, jPCT won't support it until 0.93 or 0.94. I'll wait some days before starting to port jPCT to 0.7, because quite a lot has changed and i want to see how things go first (well, that and i'm lazy... :D )

11790
Support / Orbiting camera
« on: August 26, 2003, 07:33:05 pm »
The beta of the new version available for download here:

EDIT: Removed the link. This version is now official.

The docs and the manual are still in need of some work and that's why this is not an "official" release, but this way you can already test the features you requested. This version is a major update, because some internals have changed and some obsolete stuff from Config has been removed. So in case of problems, please let me know.
Here's a list of the changes until now:

0.92 - Extended matrix-locking to cover the camera too (if locking is used). Worked on Matrix and SimpleVector to increase performance of some methods slightly. Removed unused transparency constants from Object3D. Added support for tiled textures (i.e. texture coordinates below zero and larger than 1) for the SoftGL-renderer. This requires that even the textures used for software-rendering only have to have a height of a power of 2 (jPCT will convert non-power-of-2-textures). Added some methods to SimpleVector, Camera and World to support first-person-shooter-like navigation better. Fixed a bug in the OcTree that caused collisions detection to fail in multi-threaded applications in some rare cases. Fixed a bug in the ray/polygon-collision detection in combination with octrees. Added an algorithm to automatically speed-up collision detection. Modified z-Sorting to ensure a defined sorting order (per frame) even for polygons with equal depth. Removed some unused or now useless configuration variables from Config (public and non-public ones). Reworked both software-renderers to be more pixel-perfect. Removed artifacts from the OptiZ-algorithm. It should work flawless in every situation now. Added the possibility to retrieve an object's center in worldspace.

Oh, and thanx for trying to call calcCenter() on a dummy-object... :lol:  It was bugged because it caused a division by zero in this case. Why the VM thinks that setting it to NaN instead is a better idea than throwing the exception, is still beyond my understanding. But it sometimes does this and after it, floating point code slows down to a crawl... :?

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