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.

Topics - JavaMan

Pages: [1] 2
Support / Double-Sided Wireframe
« on: July 15, 2015, 11:28:57 pm »
Hi all,
It's great to see JPCT still active! I was using it back in '08 and glad to see its continued to be updated. So much for the "Java is dead" talk.  ;D

So, I'm doing some wireframe rendering and thought there was a way to get double-sided rendering for a wireframe. That is the wireframe is rendered irrespective of the rotation within the camera's view.

Anyone have suggestions on how to achieve this other than adding triangles twice?


Feedback / Object3D Editor file anywhere?
« on: January 26, 2012, 10:48:46 pm »
Hi all,
I haven't been around in awhile. Nice to see jpct is continuing to be developed! There are quite a few nice looking projects. :)
Awhile back I wrote a program: the "Object3D Editor.",1003.msg6185.html#msg6185
I unfortunately lost the software on my own computer in the middle of some cleaning of my files and would like to know if anyone has a copy on their computer. If someone does, I'd love to get a copy.

Feedback / What does the average user have, as in graphical power?
« on: May 31, 2009, 07:16:20 pm »
Hey all,
I am thinking about developing an applet for my church website, and using 3D graphics(jpct) in it. People that access this website, though aren't necessarily gamers, and therefore don't necessarily have high-end graphics equipment. So, has there ever been a "survey" to find out how much graphical power the average web visitor has? Or, maybe is there some site that does this periodically?
I want the applet to look good, but I don't want to put so much in that most people won't be able to run it.
Anybody know where this info may be available?

Well, after piddling around for I think two years, I finally have something in the area of simulation to post on the project forums.

I put this little "thing" together this morning for my mom.
Here's a screen shot. The island mass and house calmly rotate around the y axis.

Her favorite spot in the world would be on a beach, so I thought why not use my favorite graphics engine to put her there? All in crappy textures. ;D

If you want to try it out. Here it is. The main class is Main and I ran it with -Xmx300m
The jar file does not have the main class specified in the manifest so you have to run it in the command line with say

java -cp jpct.jar;lwjgl.jar;MD.jar -Xmx300m Main

assuming jpct,lwjgl,MD and the lwjgl dll are all in the local directory.;13738529;/fileinfo.html

Feedback / Anyone know about DeVry University?
« on: February 06, 2009, 03:16:54 am »
Hi everyone,
I haven't been very active in a while, so I hope its ok with everyone with me asking on here. Ok, on to my question.
I am applying to various universities. One of them is DeVry University for the online BS in CIS program. I was wondering, has anyone had any experience with DeVry? I have read some horrible things about DeVry, and some good things, but thought maybe some real programmers may know about it.
Thank-you for any help!

Support / skydome or skybox
« on: September 14, 2008, 03:35:27 pm »
I am starting to build some models for a game, and I want to create a sky. So, which is usually more realistic skydome or skybox?

Support / Question on shadows
« on: June 15, 2008, 08:17:40 pm »
Hi everyone,

I have been learning how to use shadow mapping in jpct, and I am using the ShadowHelper class to do it. I tried out setting my objects as both casters and receivers so that it would look like things in the real world. Unfortunately, the shadows are very poor quality. Here is a screen shot.

Are you not supposed to set an object as a caster and a receiver? I have the projector moving around in a circle in the world, and the animation of the shadows is smooth, but the shadows are poor.

When I set an object as a receiver or just a caster, the shadows appear smooth.


Support / good sizes for people, terrain?
« on: June 08, 2008, 02:08:10 pm »
HI everyone,
I am making some terrain, but I am a little unsure on what is a "good" size for things in a game. I would like to represent the ground under a human with two triangles that form a square. What do you think is a "good" length for one of the sides of the square? What is usually used for something like that? Also, how "tall" should a person be?

I haven't ever done any game programming, and I don't really know about what is good sizes for stuff like this. Any sites describing this can help, or any tips! Thanks


Support / Another problem with addTriangle?
« on: April 18, 2008, 01:53:47 pm »
I am trying to take the triangles from a primitive object (cube, sphere, pyramid)
and add them into another object. I can add the triangles from a cube, sphere, pyramid
just fine, but when the object that receives the triangles is rendererd an ArrayOutOfBounds
exception is thrown whenever I had added more than 60 triangles. Here is the code that adds
the triangles.

class MoldIn {
   private Object3De in;
   private Object3D from;
   private PolygonManager man;
   private static int index=0;
   public MoldIn(Object3De into, Object3D source){

   public void mold(){
      System.out.println("-----IN MOLD() "+index+"--------");
      man = from.getPolygonManager();
      int id = man.getMaxPolygonID();;
      for(int i = 0; i<id; i++){
         System.out.println("Copy " + k + "|" + i);
         //System.out.println("" + man.getTransformedVertex(place,0) + " " + man.getTransformedVertex(place,1) + " " + man.getTransformedVertex(place,2) + " ");
      System.out.println("_________DONE WITH MOLD()_______");


Object3De is just a class that extends Object3D. Any ideas why I can't
add more than 60 in? Actualy I can add a cube's trian. 7 times to the
object but after I add the 8th the exception is thrown??
Any ideas?


Here is the exception that is thrown during the rendering.

Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 56
        at com.threed.jpct.Object3D.transformVertices(Unknown Source)
        at com.threed.jpct.World.renderScene(Unknown Source)
        at Controller.renderNow(
        at Source)

Feedback / Suggestion for a new method in PolyManager
« on: April 01, 2008, 03:34:16 pm »
Would it be possible to have a setTransformedVertex method for the PolygonManager in the next jpct? There is already a getTransformedVertex, but could there be a method that sets the vertex too? Or, is this not even feasible? I know the same thing can be done with a vertexcontroller, but it would be much easier with just a method.


Support / sphere and ellipsoid collision work, but ray won't
« on: March 25, 2008, 10:15:04 pm »
Hi, I was using sphere detection collision in an area of my code, but I decided to change to ray collision. The sphere works ok, but the ray type doesn't get a collision. The objects I used the sphere type are the same I am using for the ray-but it won't work. Here is the area where it is called.

int obh = tool.checkForCollision(new SimpleVector(0,2,0),(tool.getTransformedCenter().y*-1));

When I uncomment the spherical and comment the ray, I get a collision, but when I run the code how it is here, I get no collision???
Config.collideOffset is 300. Any ideas?

Support / problem with addTriangle after build
« on: March 19, 2008, 10:48:16 pm »
Hi, I am trying to add triangles to an object after the object has been built. I noticed that the addTriangle method call works fine, but when the object is renderered it throws an exception. Here is some code to demonstrate.
import com.threed.jpct.*;

class AddTriTest {

   public static void main(String args[])throws Exception{

   Object3D ob = new Object3D(30);
   ob.addTriangle(new SimpleVector(0,0,0),new SimpleVector(0,100,0),new SimpleVector(100,0,0));;
   World world = new World();

   Camera cam = world.getCamera();
   FrameBuffer fb = new FrameBuffer(800,600,FrameBuffer.SAMPLINGMODE_NORMAL );

   ob.addTriangle(new SimpleVector(0,-100,0),new SimpleVector(0,0,0),new SimpleVector(100,-100,0));;
         while (!org.lwjgl.opengl.Display.isCloseRequested()) {

Does addTriangle only work before calling buil?

Support / Projected Textures
« on: March 13, 2008, 03:47:53 pm »
How do I get this affect? How the texture appears to move over the bump there.

Could I have a little example, or maybe what class(es) is used for this?

Support / Getting TexutreInfo from polygon
« on: March 12, 2008, 01:53:47 pm »
Is there anyway to get the textureinfo of a certain polygon through the polygonmanager,or another way? I see the method for getting a texture, but I want the textureinfo.

Support / Help with CollisionDetection !!!
« on: March 11, 2008, 04:06:12 am »
Hi, I am learning about collision detection. I have looked around for help with it, and I thought this code would make box1 move until it runs into box2 then stop, but the box just keeps moving with no collision. Why?
import java.awt.*;
import javax.swing.*;
import com.threed.jpct.*;
import org.lwjgl.opengl.*;
class CanTest {
   public static void main(String args[])throws Exception{
   final JPanel top = new JPanel();

   final World w = new World();
   Object3D o = new Object3D(200);
   Object3D box1 = Primitives.getCube(60);
   Object3D box2 = Primitives.getCube(60);;;
   box1.addCollisionListener(new Lis());
   box2.addCollisionListener(new Lis());



   Camera cam = w.getCamera();

   final FrameBuffer b = new FrameBuffer(800,600,FrameBuffer.SAMPLINGMODE_NORMAL);
   b.enableRenderer(IRenderer.RENDERER_OPENGL,FrameBuffer.SAMPLINGMODE_NORMAL );


   int i = 0;
   SimpleVector v = box1.checkForCollisionSpherical(new SimpleVector(-10f,0,0),10f);
   System.out.println("" + v.x + " " + v.y + " " + v.z);


class Lis implements CollisionListener {
   public void collision(CollisionEvent e){

   public boolean requiresPolygonIDs(){
      return false;

Thanks for any help! I really am stumped. ???

Pages: [1] 2