Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/www/6c0b12205eaced73565c8eab34735279/web/jegx/index.php on line 41

Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/www/6c0b12205eaced73565c8eab34735279/web/jegx/index.php on line 48

Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/www/6c0b12205eaced73565c8eab34735279/web/jegx/index.php on line 55

Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/www/6c0b12205eaced73565c8eab34735279/web/jegx/index.php on line 61
JeGX's DevBlog - ATI and Depth Map Filtering
ATI and Depth Map Filtering 
Sunday, August 6, 2006, 08:07 PM - News
I've just found in the super paper of ATI, called "ATI OpenGL Programming and Optimization Guide" that all ATI GPUs from the R300 (Radeon 9700) to the latest R580 (Radeon X1900) only support NEAREST (and the mipmap version) filtering for depth map. That explains the previous results. So if you want a nVidia-like depth map filtering, you have to code the filtering yourself in the pixel shader. Okay, this answer suits me!

view entry ( 1483 views )   |  0 trackbacks   |  permalink   |   ( 3 / 1996 )

Depth Map Filtering - ATI vs nVidia 
Sunday, August 6, 2006, 06:00 PM - News
Really ATI has some problems with OpenGL. Now I'm working on soft shadows and my tmp devstation has a Radeon X700 (not the top-notch I know but an enough powerful CG). With my X700 (Catalyst 6.6) the soft shadow edges are rendered as follows:



And on my second CG, a nVidia 6600gt (forceware 91.31), the soft shadows are as follows:



The GLSL shaders are the same, a 5x5 bluring kernel, with a shadow map (or depth map as you want) of 1024x1024 (via a FBO) with a linear filtering. Now if I set the nearest filtering mode, I get the following results for the X700:



and for the 6600gt:



It seems as if the Radeon GPU has a bug in the filtering module when the gpu has to apply a linear filter on a depth map. Very strange.
I'm not satisfied by this explanation but it's the only I see for the moment.

This kind of problem shows how it's important for a graphics developer to have at least 2 workstations, one with a nVidia board and the other with an ATI CG. I tell you, realtime 3D is made of blood, sweat and screams! :winkhappy:
view entry ( 1385 views )   |  0 trackbacks   |  permalink   |   ( 3 / 1973 )

NPOT Textures 
Sunday, August 6, 2006, 09:42 AM
It's nice to come back to code!

I'm currently working on a new and simple framework for my OpenGL experimentations before implementing the algorithms in the oZone3D Engine . RaptorGL is a little bit too heavy for simple tests so for the moment I drop it. This new framework I called XPGL (eXPerimental Graphics Library), allows me to quickly test the new algos I'm working on. Every time I have to code a little but fully operational 3D demo in c++/opengl, I spend lot of time for a small result. In these moments, I say to myself that Hyperion is a very cool tool.

Okay, let's see a weird behavour of radeon gpu. At the moment, my graphics controller is a Radeon X700. With the latest catalyst drivers (6.6), this graphics board should be an OpenGL 2.0 compliant CG. A little check to the GL_VERSION tells me the X700 is GL2 compliant. Then the X700 should handle non power of two texture since this feature is part of the OpenGL 2.0 core. But the GL_ARB_texture_non_power_of_two string is not found in the GL_EXTENSIONS. Maybe ATI does not mention the extensions that are part of the core. Anyways, I loaded a 600x445 npot-texture on a mesh plane and the X700 seems to support this texture. But with a ridiculous fps of 1... Software codepath? I think so! So I decided to load the same texture with power of two dims (512x512) and the fps is become decent again. With my gf6600gt (with the forceware 91.31) I never noticed this effect/bug because the GL2-support is better and nVidia gpus correctly support non power of two texture. You can download the demo with the npot and pot texture (the one mapped onto the mesh plane) hereafter and do the test for yourself. Feel free to drop me a feedback if you wish.



NPOT_Demo.zip (659k)

But keep in mind that graphics hardware is optimized for POT textures. Try to use POT textures in order to maximize your chances to see your demo running everywhere.



view entry ( 1541 views )   |  0 trackbacks   |  permalink   |   ( 3 / 1922 )

Compilation of Ogre3D v1.2.1 
Friday, June 23, 2006, 08:09 AM - News
Just for fun (and for benchmarking too), I've done a compilation of the latest Ogre3D engine (v1.2.1).

For the sake of the test I used vc2005 and the two following files available on www.ogre3d.org :
- OGRE 1.2.1 Source for Windows
- Dependencies 1.2.0 for Visual C++ 2005(8.0)

Unpack both archives and put the content of Dependencies archive into ogre folder. Now you're ready to load the ogre_vc8.sln solution. Once done, you have to enable the compiler timer with:
Tools->Options->Projects->VC++ Build and setting Build Timing to Yes.

Okay, everything is ready for the compilation of the OgreMain project.

With my workstation (p4 3.6GHz, 2Go DDR2 533, hdd WD 200Go SATA1), the compilation and linking took: Build Time 12:04 (read 12 min 04 sec!) :raspberry:

view entry ( 1956 views )   |  0 trackbacks   |  permalink   |   ( 3.2 / 2086 )

Industry news 
Monday, June 12, 2006, 03:45 PM
Here are some little news from the 3d industry:

1 - Crysis Engine: Quite Possibly Photo Realistic. Comparison between the rendering of crysis engine and real life. :raspberry:

2 - Blender 2.4.x: an overview. This small article quickly presents blender and its possibilities in 3D modelling.
view entry ( 1509 views )   |  0 trackbacks   |  permalink   |   ( 3 / 2074 )

Ambient Occlusion Generator 
Saturday, June 10, 2006, 12:13 PM - News
I'm currently working on a new algorithm for the ambient occlusion generator. The basic idea comes from smash, the main coder of Fairlight, a famous demoscene group (thank you mate!). My old AmbOccGen was (is still) really slow: calculating per-vertex AO term for a 40000-polys object with 1000 samplers could take many hours and even more (days!). The following image shows a 40,000 polys scene (each torus has 20,000 polys) and the new alogrithm took only 5 minutes to compute the ambient occlusion for 8192 samples! Really cool and I know I can do better...



I'll released an end-user tool when the new version of oZone3D will be ready. The new version of oZone3D is now a top priority task (and a particularly huge task...).

view entry ( 1625 views )   |  0 trackbacks   |  permalink   |   ( 3 / 2096 )

RaptorGL First Feedback 
Tuesday, June 6, 2006, 04:42 PM - News
I received from Groove, one of the Game-Lab.com's admins, a feedback about RaptorGL. He found one memory leak localized in the rgl_memory_allocator_ll.h file:

RGL_INLINE RglMemAllocSlab *_allocNode()
{
RglMemAllocSlab *node = (RglMemAllocSlab *)malloc(sizeof(RglMemAllocSlab));
memset(node, 0, sizeof(RglMemAllocSlab));
return( node );
};


RglMemAllocSlab is a structure used to track all memory allocations done by the engine. Each time an alloc is done (new, heap_alloc or RGL_NEW) a RglMemAllocSlab struct is also allocated by the memory allocator in the RglMemoryAllocator::_track_heap_alloc() method. At the demo's end, the engine calls the RglMemoryAllocator::terminate() function that should free all internal resources. But RglMemoryAllocator::terminate() did nothing since it was empty. In order to properly free all remaining resources, just add into termintate() the following piece of code:

for( int e=0; e<RGL_MAX_KERNEL_HEAP_ENTRIES; e++ )
{
m_kernelHeapList[e].deInit();
}

Keep in mind that RaptorGL is intended for tutorials needs and is not a full-featured 3D engine (not yet :winkhappy: ) so try to be tolerent with it but if you see some bugs or have some advices or ideas, don't hesitate to send them.

view entry ( 1376 views )   |  0 trackbacks   |  permalink   |  related link   |   ( 3 / 2076 )

O3TC Loader in Java 
Monday, May 29, 2006, 08:49 AM - News
Yeah great thing! The O3TC format is spreading all around the world. Check this post out. It shows an O3TC loader in Java. Really cool no :winkhappy:

You can get more info about o3tc format in this tutorial.

Here is the code:

public class TextureStreamLoaderO3TC implements TextureStreamLoader {

private static final int HEADER_ID = 0x4354334F;
private static final int O3_TC_RGB_S3TC_DXT1 = 1;
private static final int O3_TC_RGBA_S3TC_DXT5 = 4;
private static final int O3_TC_ATI3DC_ATI2N = 16;

/** Creates a new instance of TextureStreamLoaderO3TC */
public TextureStreamLoaderO3TC() {
}

public Texture loadTexture(InputStream in) throws IOException {
int dataSize = readLE32(in);
int header = readLE32(in);
int headerSize = readLE32(in);
int version = readLE32(in);

if(header != HEADER_ID || headerSize != 12 || version != 1 || dataSize < 12) {
return null;
}
dataSize -= 12;

int chunkHeaderSize = readLE32(in);
int reserved1 = readLE32(in);
int chunkDataSize = readLE32(in);
int reserved2 = readLE32(in);
int format = readLE32(in);
int width = readLE32(in);
int height = readLE32(in);
int depth = readLE32(in);
int numMipMaps = readLE32(in);
byte[] textureName = new byte[128];
readFully(in, textureName, 0, 128);
int textureId = readLE32(in);

if(chunkHeaderSize != 168 || width < 1 || height < 1 ||
width > 4096 || height > 4096 || depth < 0 ||
depth > 256 || numMipMaps < 1 || numMipMaps > 12 ||
dataSize < 168) {
return null;
}

dataSize -= 168;
if(chunkDataSize < dataSize) {
return null;
}

TextureShader.TextureFormat texFormat;
TextureShader.TextureFormatHint texFormatHint;
int blockSize;

switch (format) {
case O3_TC_RGB_S3TC_DXT1:
texFormat = TextureShader.TextureFormat.DXT1;
texFormatHint = TextureShader.TextureFormatHint.DXT1;
blockSize = 8;
break;
case O3_TC_RGBA_S3TC_DXT5:
texFormat = TextureShader.TextureFormat.DXT5;
texFormatHint = TextureShader.TextureFormatHint.DXT5;
blockSize = 16;
break;
default:
return null;
}

if(depth == 0) {
Texture2D tex = new Texture2D(texFormat, width, height);
ByteBuffer[] data = new ByteBuffer[numMipMaps];

for(int k=0 ; k<numMipMaps ; ++k) {
int size = ((width+3)/4) * ((height+3)/4) * blockSize;
if(size > chunkDataSize) {
return null;
}
chunkDataSize -= size;

data[k] = BufferUtils.createByteBuffer(size);
readFully(in, data[k]);
data[k].flip();

width = Math.max(1, width >> 1);
height = Math.max(1, height >> 1);
}

if(chunkDataSize > 0) {
return null;
}

tex.setFormatHint(texFormatHint);
tex.setData(data);
return tex;
} else {
throw new UnsupportedOperationException();
}
}

private void readFully(InputStream in, byte[] b, int off, int count) throws IOException {
while(count > 0) {
int read = in.read(b, off, count);
if(read <= 0) {
throw new EOFException();
}
off += read;
count -= read;
}
}

private int readLE32(InputStream in) throws IOException {
byte[] tmp = new byte[4];
readFully(in, tmp, 0, 4);
return ((tmp[3] & 255) << 24) |
((tmp[2] & 255) << 16) |
((tmp[1] & 255) << 8) |
((tmp[0] & 255));
}

private void readFully(InputStream in, ByteBuffer buf) throws IOException {
byte[] tmp = new byte[4096];
while(buf.remaining() > 0) {
int read = in.read(tmp, 0, Math.min(tmp.length, buf.remaining()));
if(read <= 0) {
throw new EOFException();
}
buf.put(tmp, 0, read);
}
}
}

view entry ( 1316 views )   |  0 trackbacks   |  permalink   |   ( 3 / 2130 )

Electric Kool-Aid 
Sunday, May 28, 2006, 11:39 AM - News
Just for the mind-rest, a little demo I saw on demoscene.tv, after the demo-report on Evoke2005 (which was very fun to see - with a french reporter I guess), with cool gfx and inspiriting zik. More screenshot are available on http://www.ozone3d.net/phpBB2/viewtopic.php?t=143



:thumbup:
view entry ( 1235 views )   |  0 trackbacks   |  permalink   |  related link   |   ( 3 / 2003 )

Blue Screen of Death 
Thursday, May 25, 2006, 08:31 PM - News
The famous Blue Screen of Death is back:



It's a long time I didn't see it. I'm working on VBO in a new eXPerimental 3D engine and I
certainly must have passed a wrong face offset to the index buffer. Little bug in my side, no doubt.
Bug in nVidia Forceware side: I don't know how the drivers have to behave when wrong parameters
are sent to them, but I don't think they have to freeze your devstation!
More on this bug later...
view entry ( 1003 views )   |  0 trackbacks   |  permalink   |   ( 3 / 2049 )


<<First <Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next> Last>>