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

Pages: 1 ... 9 10 [11] 12 13 ... 16
151
Support / Re: Frame rate control
« on: March 28, 2008, 12:27:01 pm »
Quote
In most cases that I have limited fps, it was to keep things from moving too fast.  There are of course other ways to do that without limiting the fps, but this is a much simpler way to do it.

The other thing to consider, is that there is an actual maximum fps that the human eye can detect (it is somewhat higher than the 25 fps previously believed, but it is still a proven phenominum.  I kind of remember reading somewhere that the human eye can detect subtle differences up to 70 fps or so).  So as long as you are limiting the fps to a value higher than that, there should not be a noticable impact on smoothness; only on speed (which, as I mentioned, is generally the factor you are trying to limit).

Quote
One more reason is to release CPU time for other apps...

I see. I never thought of that. Also, I suppose if you got over 70fps that would be overkill and you could spend the cycles doing something else.
Jman

152
Support / Re: Frame rate control
« on: March 28, 2008, 01:17:09 am »
HI,
I was wondering, what is the reason for limiting the fps rate? I thought the more fps you get in the smoother the image will be, but maybe thats not true, huh?

Jman

153
Projects / Re: 3D Sound using lwjgl binding of Open AL
« on: March 26, 2008, 02:23:28 pm »
I'm using a Dell with a SoundMax onboard card as well.

154
Support / Re: sphere and ellipsoid collision work, but ray won't
« on: March 26, 2008, 02:20:37 pm »
Oh, ok.

I got it to work. I'm not sure what exactly what the problem was,I think it was a mixture of things(Config.collideOffset, the setCenter, and maybe some other stuff that i played around with), but the collision now happens. So, I can now move on...

Thanks
Jman

155
Projects / Re: 3D Sound using lwjgl binding of Open AL
« on: March 26, 2008, 12:40:51 pm »
Hi, I tried out the applet. It looks cool all those cubes flying around. :o Is the applet supposed to play sound? I don't hear anything.

Jman

156
Support / Re: sphere and ellipsoid collision work, but ray won't
« on: March 26, 2008, 12:38:15 pm »
I looked in the Config class, but I can't find a name of a setting that would pertain to checking transformed. Could someone tell me what the setting is called?

Also, in the meantime, I have been making calls to setCenter(getTransformedCenter()) before the collision. I added some print statements that print before and after this call the values from transformedcenter. It seams that calling setCenter changes the transformed center of the object based on the transformations applied to the object. ??? I tried it out in a little program, and it does the same thing.

Jman

157
Support / Re: sphere and ellipsoid collision work, but ray won't
« on: March 26, 2008, 03:19:04 am »
Ok,thanks for the suggestion, I'll try out removing the multiplication of -1 on the y value.
Thats what you meant, right?

158
Support / Re: sphere and ellipsoid collision work, but ray won't
« on: March 26, 2008, 12:11:48 am »
Hi, thanks for your quick reply. I tried out making the direction vector only 1 in the y. Doesn't work.

Quote
Are you sure that, when going down the y-axis by the amount of tool.getTransformedCenter().y*-1 units (which is a strange way to give a translation IMHO...are you sure that this is your intention?), there is a collision?

Yes, I'm positive. I can visually see there is one. What I am using this for is in terrain modification. What happens is there is a cylinder at a varying value x, -2100y, and a varying value z. The method checks to see if there is a collision if the cylinder were to move all the way down the y axis. Lying in the xz plane is the terrain that need modified. If there is a collision, the collision listener gets the affected polygons and through a round-about process modifies their vectors.

Using sphere-detection the console prints out the statements in the methods that get called in event of a collision and I can see the results. With the ray-detection nothing happens. Well, the int from the checkForCollision() is -100. So, if I understand correctly, that means no collision. Hope this helps. I am lost...

I change absolutely nothing in any other area of code when I switch from sphere to ray detection. Except for commenting out the sphere call. This should work right?
Jman

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

Quote
      //tool.checkForCollisionSpherical(newSimpleVector(0,(tool.getTransformedCenter().y*-1)+30,0),100);
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?
Jman

160
Support / Re: problem with addTriangle after build
« on: March 20, 2008, 03:32:13 am »
Hey,
Thank-you!! Its works great. This is going to make my life a lot easier!!!  ;D
Jman

161
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.
Quote
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));
   ob.build();
   
   World world = new World();
   world.setAmbientLight(200,200,200);

   world.addObject(ob);
   world.newCamera();
   
   Camera cam = world.getCamera();
   cam.moveCamera(Camera.CAMERA_MOVEOUT,200);
   
   FrameBuffer fb = new FrameBuffer(800,600,FrameBuffer.SAMPLINGMODE_NORMAL );
   fb.enableRenderer(IRenderer.RENDERER_OPENGL);
   fb.disableRenderer(IRenderer.RENDERER_SOFTWARE);

   world.removeObject(ob);
   ob.addTriangle(new SimpleVector(0,-100,0),new SimpleVector(0,0,0),new SimpleVector(100,-100,0));
   ob.build();
   world.addObject(ob);
         while (!org.lwjgl.opengl.Display.isCloseRequested()) {
         fb.clear();
         world.renderScene(fb);
         world.draw(fb);
         
         fb.update();
         fb.displayGLOnly();
         Thread.sleep(10);
      }
      fb.disableRenderer(IRenderer.RENDERER_OPENGL);
      fb.dispose();
      System.exit(0);
   }
}

Does addTriangle only work before calling buil?
Jman

162
Support / Re: Dynamic texture loading?
« on: March 17, 2008, 12:43:08 pm »
Quote
I think I managed to render "the world" onto my model's texture-surface. I can't be sure - it is black at the moment - but I think it's rendering it but all the models are so small or the direction for the camera is wrong and that's the reason I can't see anything.

Try out making a call to setAmbientLight; maybe there is no light in your world? Also, you can tell the camera to lookAt the transformed center of your object. That way you know you are looking at your object.
If you still don't see it, move the camera in or out.
Jman

163
Support / Re: Get vertices of a polygon
« on: March 16, 2008, 08:57:35 pm »
I know you can use getTransformedVertex with an object's polygon manager. Then you could use a vertex controller to look through the mesh until you found the vertex that matches the one from getTransformedVertex. Once you find it, just change its values. I do this constantly.

I think this is what you want. 

164
Support / Re: Projected Textures
« on: March 16, 2008, 06:04:15 pm »
Quote
Yes and no...it's caused by the alpha channel of the projectors being modulated with the plane's one. So the plane is visible only when the result of this operation is !=0, which is only true if all three projectors overlap.
In the final 1.16, i'll change this behaviour in a way that the alpha channel inherits the mode from the texture blending (unless you disable it via a Config-switch or the hardware doesn't support it). I think this behaviour is more what one would expect.

Thats interesting. Its not the behavior I think that would be expected, but it could be an interesting effect for easily creating a spotlight.

Thanks for the help :))

165
Support / Re: Projected Textures
« on: March 16, 2008, 02:44:24 am »
Hey, thanks. I had textures with a blue dot and the surrounding was white. So, that was the problem.
I have just a little question about transparency and projection. Here I have a plane, cube, and sphere all set with a textureinfo and the red dot moving around. The plane does not have any transparency set.


Here is the same example with the plane set to a transparency of 0.


The plane seems to disappear totally from view when the projector does not shine on it. Is this how it is supposed to work? It isn't a problem for me, I was just wondering.
Jman

Hey, by the way, thanks for always helping me out.  ;D

Pages: 1 ... 9 10 [11] 12 13 ... 16