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 ... 823
11716
Support / using camera.lookAt
« on: October 31, 2005, 11:08:55 pm »
I can't verify this. How exactly are you moving the camera, i.e. moveCamera(int mode, float speed) or moveCamera(SimpleVector direction, float speed)?

11717
Support / Unsatisfied Link Error when swiching rendering modes.
« on: October 31, 2005, 11:07:41 pm »
You have to include the native libs too. Either put them in the current directory (should work...) or use the -Djava.library.path=<your dir>-switch to tell the VM where to look for the native libs.

11718
News / Version 1.08 has been released!
« on: October 31, 2005, 08:55:38 pm »
Ok, i've hopefully found the bug and fixed it. Corrected version should run on your machine. The problem was that i was initializing vertex arrays for non-present texture stages on lower end hardware.

11719
News / Forum is at 2.0.18 now!
« on: October 31, 2005, 08:54:19 pm »
Topic says it all.

11720
News / Problem with sending notification mails!
« on: October 31, 2005, 08:42:37 pm »
Notification should work fine again.

11721
Projects / Technopolies
« on: October 31, 2005, 11:53:27 am »
Quote from: "MFJ"
I believe JPCT is 1.1 compatible?
For the software renderer path, yes. But OpenGL support requires at least 1.4.

11722
News / Version 1.08 has been released!
« on: October 30, 2005, 01:21:47 am »
Ok, so only the "normal" GLRenderer seems to have a problem on your machine. I'll check it out on monday. I have a GF4MX somewhere...will try to track the problem down with that. Thanx for testing.

11723
News / Version 1.08 has been released!
« on: October 29, 2005, 08:09:33 pm »
Strange...looks like i'm doing something in the renderer that isn't allowed in that state. Problem is, that this should be the case on every hardware/driver but i can't verify it. It's a damn case of "works for me".

Can you please (if time permits it):

1. Make sure that you have the latest version (i.e. download it again)
2. Try to run the example, press '1' to disable rgb scaling, switch to OpenGL and see if that works
3. Compile the example above and see if that works

Many thanx.

11724
Support / Re: Question: Models, lighting, and more.
« on: October 29, 2005, 10:59:05 am »
Quote from: "Raven"
However, I'm wondering if there is a way to make the light one-directional? I can't find any documentation on that, so I guess not. In that case, is the simplest solution to position the lightsource inside a hollow cylinder object? Or would the light shine through that cylinder?
No, directional lighting is not possible with standard vertex lighting, which is what jPCT is using. There's no way to let other objects block the light either. jPCT is following OpenGL's specs when it comes to lighting.
For a spotlight, it may be possible to fake it by using a transparent object als light cone, but i'm not sure how good that will look...maybe not too good... :wink:

11725
News / Problem with sending notification mails!
« on: October 29, 2005, 10:19:12 am »
The forum currently has some problems with sending notification mails. The mail header is somehow corrupted and you may see (depending on your client) an encoded text instead of the correct mail.
I'll let you know, when it's fixed...

11726
Support / How to improve the textures!
« on: October 29, 2005, 10:17:14 am »
What do you mean by "awfull"? The software renderer can't do mip mapping let alone trilinear filtering, so you may see some aliasing artifacts. Maybe you don't like the effect the faked bilinear filter creates (disable it with Config.texelFilter). Usualy, software benefits from low contrast textures, because that will reduce the aliasing.

11727
News / Version 1.08 has been released!
« on: October 29, 2005, 09:59:46 am »
Quote from: "Melssj5"
then i got an exception and the program crashes.
Which exception?

11728
Bugs / Geforce 4 and opengl
« on: October 29, 2005, 09:58:59 am »
Java (NOT Lwjgl itself) is having problems with forcing AntiAliasing for Direct3D in the drivers on some (most?) machines. On ATI cards, this results in crashes or black screens. On NVidia cards, it results in very jerky behaviour. Please check if you are forcing AA in the driver settings.

11729
Support / Question: Models, lighting, and more.
« on: October 28, 2005, 06:04:54 pm »
The nullpointer is in your code, as the stacktrace indicates. Judging from the two code snippets, i would say that either you are doing the loading in the gameLoop()-method (unlikely...) or that there are two "demons". One global and one local in the method that loads the animation and the global one isn't initialized, just the local one!?

Index always goes from 0 to 1. 0 is first key frame, 1 the last. The sequence numbers start at 1 (with 0 being the whole animation) and match to the sequences printed out while loading, i.e. in your example:

pigstand=1
pigwalk=2
...

Have a look at the Animation-class for more information on animations. There's also a method to get the sequence count from an Animation.
You may get the Animation of an Object3D by calling Object3D.getAnimationSequence(); (silly name, i should deprecate it and replace it with getAnimation();...anyway...)

11730
News / Version 1.08 has been released!
« on: October 28, 2005, 04:54:35 pm »
Uploaded a new version that corrects a small bug with texture uploading. Here's an example of how to use multi texturing:

Code: [Select]
import com.threed.jpct.*;
import org.lwjgl.opengl.*;
import javax.swing.*;
import java.awt.*;

public class MTAWT {

  public static void main(String[] args) throws Exception {
    MTAWT mt = new MTAWT();
    mt.doIt();
  }

  private void doIt() throws Exception {

    JFrame frame=new JFrame();
    frame.setSize(320,240);
    frame.show();

    FrameBuffer fb=new FrameBuffer(320, 240, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
    fb.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    Canvas canvas=fb.enableGLCanvasRenderer(IRenderer.MODE_OPENGL);
    frame.getContentPane().add(canvas);

    World w=new World();
    w.setAmbientLight(255,255,255);

    TextureManager tm=TextureManager.getInstance();
    Texture base=new Texture("base.jpg");
    Texture decal=new Texture("decal.jpg");

    tm.addTexture("base", base);
    tm.addTexture("decal", decal);

    int bid=tm.getTextureID("base");
    int did=tm.getTextureID("decal");

    Object3D plane=new Object3D(9);
    plane.setCulling(Object3D.CULLING_DISABLED);

    // Base texture only
    TextureInfo tInf1=new TextureInfo(bid,0,0,1,0,0,1);
    TextureInfo tInf2=new TextureInfo(bid,1,0,1,1,0,1);
    plane.addTriangle(new SimpleVector(-10,-10,30), new SimpleVector(-10,0,30), new SimpleVector(0,-10,30), tInf1);
    plane.addTriangle(new SimpleVector(-10,0,30), new SimpleVector(0,0,30), new SimpleVector(0,-10,30), tInf2);

    // 2nd stage used, modulate
    tInf1 = new TextureInfo(bid, 0, 0, 1, 0, 0, 1);
    tInf1.add(did, 0, 0, 1, 0, 0, 1, TextureInfo.MODE_MODULATE);
    tInf2 = new TextureInfo(bid, 1, 0, 1, 1, 0, 1);
    tInf2.add(did, 1, 0, 1, 1, 0, 1, TextureInfo.MODE_MODULATE);
    plane.addTriangle(new SimpleVector( 0, -10, 30), new SimpleVector( 0, 0, 30), new SimpleVector(10, -10, 30), tInf1);
    plane.addTriangle(new SimpleVector( 0, 0, 30), new SimpleVector(10, 0, 30), new SimpleVector(10, -10, 30), tInf2);

    // 2nd stage used, add
    tInf1 = new TextureInfo(bid, 0, 0, 1, 0, 0, 1);
    tInf1.add(did, 0, 0, 1, 0, 0, 1, TextureInfo.MODE_ADD);
    tInf2 = new TextureInfo(bid, 1, 0, 1, 1, 0, 1);
    tInf2.add(did, 1, 0, 1, 1, 0, 1, TextureInfo.MODE_ADD);
    plane.addTriangle(new SimpleVector(-10,0,30), new SimpleVector(-10,10,30), new SimpleVector(0,0,30), tInf1);
    plane.addTriangle(new SimpleVector(-10,10,30), new SimpleVector(0,10,30), new SimpleVector(0,0,30), tInf2);

    // 2nd stage used, blend
    tInf1 = new TextureInfo(bid, 0, 0, 1, 0, 0, 1);
    tInf1.add(did, 0, 0, 1, 0, 0, 1, TextureInfo.MODE_BLEND);
    tInf2 = new TextureInfo(bid, 1, 0, 1, 1, 0, 1);
    tInf2.add(did, 1, 0, 1, 1, 0, 1, TextureInfo.MODE_BLEND);
    plane.addTriangle(new SimpleVector( 0, 0, 30), new SimpleVector( 0, 10, 30), new SimpleVector(10, 0, 30), tInf1);
    plane.addTriangle(new SimpleVector( 0, 10, 30), new SimpleVector(10, 10, 30), new SimpleVector(10, 0, 30), tInf2);

    w.addObject(plane);
    w.buildAllObjects();

    while (frame.isActive()) {
      fb.clear();
      w.renderScene(fb);
      w.draw(fb);
      fb.displayGLOnly();
      plane.rotateY(0.01f);
      canvas.repaint();
      Thread.sleep(10);
    }

    fb.disableRenderer(IRenderer.RENDERER_OPENGL);
    System.exit(0);
  }
}

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