Author Topic: Beta of 1.15 released!  (Read 27840 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Beta of 1.15 released!
« Reply #15 on: July 24, 2007, 06:46:43 pm »
nope, didnt help with both default glShadowZBias and 2 :/

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #16 on: July 24, 2007, 07:04:31 pm »
But the edges have to look different then, don't they?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Beta of 1.15 released!
« Reply #17 on: July 24, 2007, 07:25:08 pm »
nope, i see no difference :/ here a shot with filtering off and glShadowZBias = 2

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #18 on: July 24, 2007, 07:30:49 pm »
Strange! The chip or the driver doesn't seem to care about the filtering setting and filters everything...not much i can do about this issue ATM.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Beta of 1.15 released!
« Reply #19 on: July 24, 2007, 07:43:26 pm »
this is a fedora 4 btw. the default distribution didnt recognize my chipset so i downloaded and compiled a recent X. maybe relevant who knows ?

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Re: Beta of 1.15 released!
« Reply #20 on: July 24, 2007, 10:27:20 pm »
Egon,

Setting Config.glShadowZBias to 12 did not work on my card too. Looks like the problem with Intel 915GM.

BTW, i've played with this feature to create light projecting effect and noticed black border around the projected shape.
Is there a way to remove it ?




p.s. jpeg quality sucks. It looks better without compression.
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #21 on: July 24, 2007, 10:41:27 pm »
The black border is caused by the filtering...that can be disabled but can't on Intel 915G!? But for projecting a lightsource like in the "window blinds"-movie, simply using projective textures should be the better choice anyway.

BTW: 12 is very high value for the bias. It's very likely that no shadow at all will be visible with that.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #22 on: July 24, 2007, 10:42:24 pm »
this is a fedora 4 btw. the default distribution didnt recognize my chipset so i downloaded and compiled a recent X. maybe relevant who knows ?
Can you please run this test case and post a screen shot of how it looks on your machine:

Code: [Select]
import com.threed.jpct.*;

public class FilterTest {

public static void main(String[] args) throws Exception {
Texture tex1=new Texture(16,16);
Texture tex2=new Texture(16,16);
TextureManager tm=TextureManager.getInstance();
FrameBuffer fb=new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
World world=new World();
fb.enableRenderer(IRenderer.RENDERER_OPENGL);
fb.disableRenderer(IRenderer.RENDERER_SOFTWARE);
tm.addTexture("checkers1", tex1);
tm.addTexture("checkers2", tex2);
tex1.setEffect(new Maker());
tex1.applyEffect();
tex2.setEffect(new Maker());
tex2.applyEffect();
tex1.removeEffect();
tex2.removeEffect();
Object3D plane1=Primitives.getPlane(1, 12);
Object3D plane2=Primitives.getPlane(1, 12);
plane1.setTexture("checkers1");
plane2.setTexture("checkers2");
world.addObject(plane1);
world.addObject(plane2);
plane1.translate(-6, 0, 0);
plane2.translate(6, 0, 0);
world.buildAllObjects();
world.setAmbientLight(255, 255, 255);
Camera cam=world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 20);

tex1.setGLFiltering(false);
tex1.setGLMipmap(false);

while (!org.lwjgl.opengl.Display.isCloseRequested()) {
fb.clear();
world.renderScene(fb);
world.draw(fb);
fb.update();
fb.displayGLOnly();
Thread.sleep(100);
}
}

static class Maker implements ITextureEffect {
public void init(Texture tex) {}

public void apply(int[] dest, int[] source) {
for (int x=0; x<8; x++) {
for (int y=0; y<8; y++) {
dest[y*16+x]=0x00ffffff;
dest[(y+8)*16+(x+8)]=0x00ffffff;
}
}
}

public boolean containsAlpha() {
return false;
}
}
}


Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Beta of 1.15 released!
« Reply #23 on: July 24, 2007, 10:52:58 pm »
here it is. one note, i set Config.glColorDepth to 24 to make it run. same applies to shadow sample

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #24 on: July 24, 2007, 10:57:55 pm »
Looks like it should! So this means that the chip can do pick-nearest-filtering when using normal textures but it doesn't seem to support it on depth textures... ???
About the color depth: Windows always reports 32bpp, Linux always reports 24bpp. I could set it to 24 by default, but the fact that i didn't but documented the behaviour instead means, that i had reason not to. I just can't remember...

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Beta of 1.15 released!
« Reply #25 on: July 25, 2007, 02:47:53 am »
Well, Finally I tested the shadow thing on my old (still working) PC.

Java version is: 1.6.0_01
-> support for BufferedImage
Version helper for 1.2+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Can't find desired videomode (800 x 600 x 24) - searching for alternatives
Current mode:800 x 600 x 32 @75Hz
Driver is: nv4_disp/6.14.10.8198 on NVIDIA Corporation GeForce4 MX 440/AGP/SSE2
OpenGL renderer initialized (using 2 texture stages)
Software renderer disposed
[ Tue Jul 24 19:25:00 GMT-05:00 2007 ] - ERROR: Shadow mapping is not supported by the current hardware!
Exception in thread "main" java.lang.NullPointerException
   at com.threed.jpct.util.ShadowHelper.setFiltering(Unknown Source)
   at SimpleShadows.initStuff(SimpleShadows.java:53)
   at SimpleShadows.main(SimpleShadows.java:105)

I sold my 256MB ATI video card so I just have this GeForce4! and doesnt worked. the simpleShadows line 53 is:

sh.setFiltering(true);
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #26 on: July 25, 2007, 07:57:39 am »
The actual problem is this: ERROR: Shadow mapping is not supported by the current hardware!
A real GeForce4 can do it (anything up from a GF3 supports it), but you are using a GeForce4MX, which is basically a GF2. There's nothing i can do about it. The MX doesn't have the hardware caps to do it. The null pointer shouldn't happen anyway in this case. I'll fix this.

Edit: If you want to use this feature, get something from a GF3 upwards, i.e. a GF that supports at least pixel shader 1.1. Don't get an ATI unless it's a real new one, because older ATIs have some problems with depth textures.
« Last Edit: July 25, 2007, 08:02:27 am by EgonOlsen »

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Beta of 1.15 released!
« Reply #27 on: July 31, 2007, 11:31:56 pm »
2 Hytparadisee: man, works perfectly on my work laptop's shitty Intel 945GM
It does? Amazing! I've never expected it to work on Intel.

What about the new intel 3000 or the x3000 chipset! Its supossed to be much better and have good graphics quality!
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #28 on: July 31, 2007, 11:58:55 pm »
Onboard graphic chips suck performance wise and so does the x3000. However, they constantly improve feature wise, so it may work with correct filtering on those newer Intels, but i don't have the chance to test it. The only Intel graphics chipset that i have access to is that of a 845G with very old drivers. Almost nothing works on this chip (well, Paradroidz worked @ 30fps/800*600...not amazing but playable).

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta of 1.15 released!
« Reply #29 on: August 02, 2007, 12:36:01 am »
Updated the beta with a version that includes some additional fixes as well as an option to use FBOs (frame buffer objects) for render-to-texture/shadow mapping where available. It's enabled by default. Maybe it changes behaviour on Intel, albeit i don't think so.