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 ... 804 805 [806] 807 808 ... 822
12076
Support / jPCT for an engineering type app?
« on: April 20, 2004, 08:55:05 pm »
Quote from: "xander"
It would be nice in fact to do all of the following: line, arc, circle, ellipse, polyline.
I agree that this would be a helpfull addition in some situations, but it's not jPCT's main goal to offer such things. If you really need it, you can either use the Java2D-stuff on top of a software rendered image (works for Java2 only, because a MemoryImageSource doesn't provide you with a usable Graphics-instance) or render the lines and circles in an int[]-array and blit that into the rendered image (works with OpenGL too).

12077
Support / picking to 3d coordinate
« on: April 19, 2004, 10:47:21 pm »
Quote from: "Anonymous"
some research turned out it to be the # triangle added - without zerosizetriangles (and maybe other other unnessescary triangles :)  )
Yes, that's the way jPCT behaves. I could say "at the moment" and that this behaviour may change sometimes...but that won't be the case...it's pretty save to rely on this behaviour.
However, a better solution would be to make each tile of the board an individual object. The overhead introduced by this should be neglectable as long as the board doesn't consist of thousands of tiles. That's much more flexible and allows to implement additional effects easier (like letting the board "explode" or something like that).
jPCT is mostly object based, not triangle based. I'll add some addional stuff for handling objects on the triangle level better in the next release, but its main focus are still objects.

12078
Support / Re: jPCT for an engineering type app?
« on: April 19, 2004, 10:39:32 pm »
Quote

1. I assume I can render the image inside a JPanel (or similar) to allow JButtons, etc next to the scene? Lightweight or Heavyweight?


As you've already mentioned, this is possible with the software renderer. jPCT will render into an Image, so whatever can be done with an Image can be done with the rendered output (getOutputBuffer() in FrameBuffer will help you here). You may try to use OpenGL instead of software and get the rendered output in the same way, but that's most likely very slow and you'll still have an OpenGL-window lying around on your desktop...so that sounds like a bad idea.

Quote

2. How do I render a simple 5-sided polygon with a hole somewhere where the polygon, sides and hole are selecteble? Maybe publishing of some of the sample primitives will answer this question?


You have to model the 5-sided polygon with the hole by using triangles. Either by finding an algorithm that can do it or by using some 3d editor. Picking the polygons is easy, picking the sides...no idea at the moment but should be achievable somehow. Picking the hole is currently impossible, because you can't pick "nothing". A workaround would be to build the hole out of transparent polygons and pick that object instead.

Quote

3. Since I probably need to draw selectable 3D Lines and Points, I imagine I can use the Sphere primitive for the points but what about the Lines? Maybe use a very thin Cylinder?


You can easily build some primitives for that yourself. A cylinder should work too, but may be polygonal overkill.

Quote

4. I will most likely have 3 simultaneous views on the same model. Does jPCT support multiple simultaneous cameras?


Yes, you can do that. Either by modifying the camera itself for each view or by creating yourself 3 cameras and replace the camera in World with the right one for each view. PrimordialSoup did that. You can see the results in this thread: http://www.jpct.net/forum/viewtopic.php?t=15

Hope this helps.

12079
Support / picking to 3d coordinate
« on: April 18, 2004, 10:11:04 pm »
You can get the polygon number by throwing the result of pickPolygon into getPolygonNumber(int[]). What you won't get ATM is the intersection point. Do you really need this information?

12080
News / LWJGL 0.9 is out!
« on: April 17, 2004, 12:40:09 pm »
You can get it here: http://www.lwjgl.org

The current jPCT release (0.99) won't work with it, but the next one will.

12081
Support / A few questions...
« on: April 08, 2004, 12:00:44 am »
You can blit bitmaps over the rendered image using the blit()-methods in FrameBuffer. That's what the fps-demo does...When using the software renderer only, it's also possible to use AWT/Swing in combination with the rendered image but in respect to (possible) OpenGL support, i won't advise you to do so. If you use the blit()-methods in FrameBuffer, make sure to use the one that operates on Textures instead of int[]. It's usually much faster.
It's possible to "pick" an object with the mouse. Just add a MouseListener to your Component (our use the LWJGL was of doing it...it all depends if you decide to use OpenGL or not) and have a look at Interact2D. It offers methods for picking objects with the mouse.
Hope this helps.

12082
Support / 3D points/lines and polygon normals
« on: April 05, 2004, 05:54:54 pm »
Quote from: "Musurca"
Some sort of "TriangleController" would definitely be a welcome addition.
Yes, it would. I'll try to add this feature if i find the time. Anyway, here's the (premature) source of my "Car"-class. It contains the basic math i'm using to place the car on the terrain. It's not documented and still unfinished but maybe it helps somehow: http://www.jpct.net/stuff/Car.java

12083
Support / 3D points/lines and polygon normals
« on: April 04, 2004, 05:35:44 pm »
No, i never had a look at the Spacecrafter API. If jPCT is similar to it, it's a just a coincidence. I tried to get a copy of the Spacecrafter API to have a look, but it's obviously not available anymore.

To your questions: Currently, there's no option to plot simple points. What is possible, is to define an object as billboarded and use simple, single triangle objects as particles (transparent and textured). However, i'm not sure how fast this would be but it think it should be fine. It's much more powerful than simple points too. Maybe you can implement your particles that way and let me know if it's ok or too slow.

Abusing the VertexController in the way you suggested won't work IMO, because it can only gives you the vertex normals and not the face normals. There's a another thread here somewhere, where i mentioned the possibility of a TriangleController to access face normals and some other properties of a polygon but i'm not sure if i really should do that.
I've just implemented the effect you want to achieve in a new example (will be included in the next release (i hope)...have a look at the news-section for a screenshot of it). In this example, i'm using calcMinDistance on all four wheels of my "car" and calculate the rotation angles using these values (Math.atan() is your friend here). When using octrees for your terrain, this should be very fast. At least i wasn't able to notice a slowdown caused by this method. This will also handle some cases better where the method using the face normals will most likely fail, so i think it's the better approach.

Hope this helps. If it doesn't, please let me know and i'll think about this topic again.

12084
News / Working on new example
« on: April 02, 2004, 12:30:14 am »
I'm currently working on a new example that shows how to make a vehicle follow a surface (=terrain) with jPCT. Here's a preview of how the current version looks like (the thingy in the middle is the vehicle... :wink: ).


12085
News / Version 0.99 has been released!
« on: March 22, 2004, 09:37:49 pm »
This is a minor release that includes some optimizations, a rewritten transformation code for lights (should be unnoticable) and support for vertex arrays when using OpenGL. Changes are documented here:

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

Have fun!

12086
Support / Re: Sorry.. hardware rendering.
« on: March 09, 2004, 10:50:10 pm »
Quote from: "Jubile"
BTW: I have a little problem. I have an arena positioned inside a sphere. The problem is the lighting of the sphere looks very odd. The bottom is completely lit and so is a strip down one of the sides.
Maybe the light is discarded before reaching the sphere. If you based you work on the fps-example, this is very likely to happen, because the example modifies the discard distance. Have a look at Config.lightDiscardDistance...maybe it helps. Keep in mind that performance will decrease the higher this value is set. How much depends on your polycount.
About the render-to-texture: If you are using OpenGL, this is not really possible. It could be done if the rendering to a texture happens only once or at least very seldom, but for frequent updates, there's no way ATM.

12087
Support / Is it possible to render to a texture?
« on: March 09, 2004, 05:13:05 pm »
Using the software or the hardware renderer? It's not possible by calling a method that does it or similar, but it's somehow possible to achieve it when using the software renderer (hence my question).

12088
News / Webstart
« on: March 03, 2004, 12:19:56 am »
I've uploaded a little demo that uses webstart. It supports software and hardware rendering (Windows and Linux only ATM). Switch between the two modes by pressing 'x' (the video-mode selection for hardware needs improvement, so hardware may fail on some setups).

http://www.jpct.net/webstart/demo.php

or, if the version doesn't work try this:

http://www.jpct.net/webstart/demo2.php

or this:

http://www.jpct.net/webstart/demo3.php

Note that you need to have a JRE 1.3 or higher with Webstart installed.

12089
Support / lightmaps
« on: February 28, 2004, 05:48:00 pm »
We had a little discussion about how to do lighting in jPCT here:

http://www.jpct.net/forum/viewtopic.php?t=70

As you can see from the thread above, lightmaps (or multiple u/v-coordinates) are not supported ATM. You may ask yourself, why both features you asked for are not present in the current version. Maybe this thread can answer this:

http://www.jpct.net/forum/viewtopic.php?t=89

Hope this helps.

12090
German corner / Wie installiere ich jpct ?
« on: February 28, 2004, 05:39:15 pm »
?? Da kann man so eigentlich nichts direkt installieren oder starten. Starten kannst du höchsten die Batch-Dateien im examples-Verzeichnis, um die Beispiele anzuschauen.
jPCT ist eine API zum Entwickeln von Java-Applikationen oder Applets (wenns Sinn macht von mir aus auch Servlets), d.h. du brauchst ein JDK von Sun dazu und/oder eine entsprechende Entwicklungsumgebung, zumindest aber einen Texteditor und Java-Kenntnisse.
Falls du das alles hast, musst du nicht viel tun. Im lib-Verzeichnis findest du nach dem Auspacken die jpct.jar und die Windows-Variante von LWJGL. Zumindest die jpct.jar musst du in den Klassenpfad einbinden (oder im Falle einer Entwicklungsumgebung wie JBuilder (siehe auch den anderen Thread in diesem Forum) ins Projekt aufnehmen) und dann kannst du z.B. die Quellen im examples-Verzeichnis neu kompilieren und ändern.
Ich hoffe, das hilft...oder habe ich deine Frage falsch verstanden?

Pages: 1 ... 804 805 [806] 807 808 ... 822