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
JeGX's DevBlog
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 )

ATI X1900XTX and VTF 
Saturday, May 20, 2006, 01:56 PM - News
I've just received an email from an user saying that he was'nt able to run the demos of the Vertex Displacement Mapping Tutorial on his brand new Radeon X1900XTX. VTF or Vertex Texture Fetching is a cool feature of high-end graphics chipsets and it's part of Shader Model 3.0. The X1900 series is based on the R500 chipset (R580) that is a SM3.0 complient GPU. But in OpenGL side and especially in GLSL, VTF is not supported. The OpenGL query done with GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB always returns 0. That means that no texture units are available in the vertex shader.

ATI confirms this fact in one of its whitepapers shipped with the ATI SDK (ATI OpenGL Programming and Optimization Guide.pdf). At the page 11, we can read this: "All ATI graphics HW have a few items that deserve special consideration when using GLSL. The first major item of note is the absence of vertex texture units. This means that vertex texturing is never available, and all shaders attempting to use texture functions in the vertex shader will fail to link.". I know, this is a rude reality. The R580 GPU is really powerful and it's a pity that ATI does not support VTF in his chipsets. I don't know how the R580 behaves in D3D side but I can suppose the GPU has the same limitations. VTF is currently supported by Geforce chipset from 6600 to 7900. Conclusion: if you wish to play with VTF, use a nVidia board.

Maybe, all these problems will be solved with the SM4.0. I hope! :winkhappy:

view entry ( 1132 views )   |  0 trackbacks   |  permalink   |   ( 3 / 2210 )

Hyperion 1.4.0 is out! 
Saturday, May 6, 2006, 02:52 AM - News
Ok, Hyperion 1.4.0 is finally out! This is a quite big release with many features mainly on LUA side. The new LUA 5.1 engine works very fine and that's a good thing. Today while I was releasing Hyperion,
I wasted some hours, trying to hack the Lua socket lib because I didn't manage to connect the HypTcpWin32 client to the Hyperion TCP server demo. Both appz were localized on different computers and I started to think there's a big trouble with lua lib. After some test I found the guilty: the inet_trybind() function in inet.c soket lib source code. Actually this function works fine but in my test demos I always bound the server with localhost address. In fact I wonder why... Anyway, I found the response having a look at inet_trybind() implementation and thanks to the windows socket page: www.sockets.com/winsock.htm . A little detail I have always skipped when implementing TCP servers since I always put INADDR_ANY in local.sin_addr.s_addr. But if you specify a particular host, the TCP server accepts incoming requests only from this particular host...
That's why during my tests, everything worked fine with localhost. But the real guilty is the sample-codes that come with the socket lib: localhost is always used with bind().

The tutorial www.ozone3d.net/tutorials/lua_socket_lib.php shows you a concret demo featuring a TCP server running in Hyperion. Using the HypTcpWin32 client you can control the torus rotation in a cool way. A real kick! That opens up new horizons with Hyperion programming.

The hyperion lua host-api has grown a lot again. Now you can create directly in lua materials, lights, meshes, debug primitives (disc, line, box, sphere), load models, navigate through materials, lights and cameras lists. The new vertex pool object for example, has no XML node. You can only create and use it in lua.

Anyway, don't forget to have a look at the changelog: www.ozone3d.net/hyperion_changelog.php

Now that Hyperion 1.4.0 is released, I'm going to try to get some rest (one day is enough, isn't it?) because after, I've planned to release a lot of new demos and tutorials that are waiting for that. It seems that a new version of LynX is also in the pipeline (the current version doesn't run as I want - both lite and pro).

Just another thing. Some codes samples available for downloading may not work with the new hyperion. Since it takes a lot of
time to test all code samples, I didn't start this check yet. I've planned to update code samples next week. But if you encounter
some problems, check the source code and look for the old lua require() function. If the demo uses it, replace this function
by the following instruction:

dofile( HYP_GetHyperionDir() .. "/hyperion_lua_host_api_defines.lua" );

of course in the case where the demo needs to load hyperion_lua_host_api_defines.lua...

Ok, it's time to stop. I'm fed up with these lines of codes and this blinding screen...
...Shutdown!
...Bye!
view entry ( 1140 views )   |  0 trackbacks   |  permalink   |  related link   |   ( 3 / 2145 )

Hyperion almost here! 
Thursday, May 4, 2006, 04:04 PM - News
A little news about hyperion. I'm still working hard on it and I hope to release the new version tomorrow. I've just finish to implement a vertex pool object in order you can make your own particle system. There're still the reference guide in english/french (texts and translations are done!) and the new tutorial on TCP/IP server with LUA to finalize. Honestly, this new version of hyperion is really cool and works very fine.

Just for fun, a little demo I've done to test the playlist and vertex pool. I'll release it with Hyperion tomorrow:





In the real demo, there is a kind of noise in the screen but for screenshots purposes I've had to remove this cool effect.

Ok, I leave you here.
See you soon with Hyperion 1.4.0!


view entry ( 1039 views )   |  0 trackbacks   |  permalink   |   ( 3 / 961 )


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