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 ... 780 781 [782] 783 784 ... 790
Support / Wireframe
« on: September 23, 2003, 12:27:46 am »
Your idea with the VertexController is something i came up with too, but it would require a complete construction of a transformation matrix for EVERY VERTEX if the method to do the projection would be as simple as project3D2D(SimpleVector...). Another option would be to transform a whole bunch of vertices with one call but this isn't cheap nor very elegant either. That, and the VertexController doesn't give you information about how the vertices are connected. So you are ending up with a soup of projected vertices but you wouldn't know how to connect them to form triangles.
To make you understand why there is no wireframe support in jPCT: There is no line-algorithm in jPCT...simply because you don't need one for the things jPCT is doing. However, there is one in Java, but i can't use it because it can't be used on a MemoryImageSource and therefor i would break 1.1 compatibility if i would use it. Another point is, that the OpenGL wireframe mode draws something like textured and lit outlines of the polygons and not just simple "white lines". To emulate this behaviour in software, i would have to use the texturemapper with a kind of degenerated triangles...i tried this once, but it didn't work too well on flat edges.
As you can see, there are some problems with wireframe... :wink:
How important is wireframe mode for your project  :?:

Edit: Would it be sufficient to draw the whole scene in wireframe or are you talking about "wireframing" certain objects only?

Support / Re: conversion
« on: September 22, 2003, 07:15:11 pm »
Quote from: "Barrah Switzer"
So how did you convert the Quake3 map??   deep exploration or some other way??
There's a converter for Q3 to VRML, which i used to convert the geometry. I unzipped the textures from the *.pk3 and converted them with Deep Exploration into JPGs. I then loaded the VRML-file of the level into DE (with the textures in the same dir so that it could use them). I then exported it into *.rh (don't know what exactly this is), because it can include the textures into the file and replaces the names with "levelname"x...Finally, i loaded this file and exported it to 3DS-format (including the textures). Why the *rh-step you may ask...well, 3DS can only store 12 chars for naming a material's texture but DE doesn't export the textures that way, i.e. you'll end up with a 3DS-file with a material pointing to "blahblah_is_" but the actual filename is still "blahblah_is_a_great_thing.jpg" save me from renaming bazillions of files by hand or writing a program to do this, i added the *.rh step... :wink:

Support / Re: Conversion
« on: September 22, 2003, 06:53:32 pm »
Quote from: "Barrah Switzer"
it's called 3d exploration, it's about 2 years old.  I downloaded it from some guys web page.   I found out later that it has become 'Deep Exploration' .   Which is a commercial product.    I don't know if the version I have is a freeware/shareware, a crack or what.   I haven't tried it yet, but I will in the next couple of days.  I'll let you know how it works.
Deep Exploration can load Half-Life maps?  :shock:
I know that it can load Half-Life models but i'm unsure about the map-format itself...
Too bad that i don't have any Half-Life maps ATM to try that, because i do own Deep Exploration (but only 2.0...3.0 is current). It's a GREAT tool...i just love it.

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: It's based on a much more recent version of jPCT than the old jPCT-demo. How fast does it run on your machine?

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):
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)


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.

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.

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's fixed now and i've uploaded the fixed version as a "silent update"...

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:

and the online-docs can be found here:

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:

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.

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

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.

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 can only do so much and there are still other things to do (like working on lighting performance... :wink: )

Support / How does jPCT handle lighting in OGL?
« on: September 04, 2003, 07:46:35 pm »
I've seen Mazer 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 practice, performance starts to drop when you are overusing light).

I guess you've already seen the "viewer"-test-app i posted on 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:

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:

Have fun!

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]


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

Pages: 1 ... 780 781 [782] 783 784 ... 790