Main Menu

Beta of 1.15 released!

Started by EgonOlsen, July 16, 2007, 10:15:10 PM

Previous topic - Next topic

raft

nope, didnt help with both default glShadowZBias and 2 :/

EgonOlsen

But the edges have to look different then, don't they?

raft

nope, i see no difference :/ here a shot with filtering off and glShadowZBias = 2

EgonOlsen

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.

raft

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 ?

rolz

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

EgonOlsen

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.

EgonOlsen

Quote from: raft 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 ?
Can you please run this test case and post a screen shot of how it looks on your machine:


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;
}
}
}


raft

here it is. one note, i set Config.glColorDepth to 24 to make it run. same applies to shadow sample

EgonOlsen

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

Melssj5

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

EgonOlsen

#26
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.

Melssj5

Quote from: EgonOlsen on July 24, 2007, 04:45:11 PM
Quote from: rolz on July 24, 2007, 12:39:12 AM
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

EgonOlsen

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

EgonOlsen

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.