About Me

Name: Paul Brunt
Age: Not 30 Yet!
Occupation: Web Developer
Education: Physics BSc
Interests: Programming, CG,
Animation, Maths,
Tech Stuff

SVG Flip

I decided to see what SVG was capable of so I set about creating a page turning document.

Read More..

  • SVG Flip
  • Berts Breakdown
  • New Website!
  • Blender Game Test

Archive for December, 2009

GLGE Demo: first person shooter

Another busy week for GLGE WebGL library.

Another busy week in WebGL
First off this weeks demo. A very simple first person level:
Ths demo mainly shows off the new input control classes in the library. It also makes good use of normals maps for the walls. I believe it is also contains the first mouse look control system for a webgame? I couldn’t make it work in the classical sence due to browser limitations so instead I took insperation from the wii version of metroid.
As a demo it’s still a bit lacking, since the speed of the control is framerate dependant, mainly due to my own laziness ;-) .
It has very basic collision detection to stop you walking through walls and allow to to climb stairs, basically just a 2D hight map. It looks like it’s going to be a killer trying to write a 3D physics engine in JS :-(
There maybe some issues on the mac as I’ve still not figured out why the last demo didn’t work, please let me know any error messages you get. Looks like I may need to invest in a mac mini just to test on ;-)
I’ve got a complete and working XML parsing class so everything can now be easily declared in XML and imported into the engine. So it now take very little javascript to get started, eg:
var renderer=new GLGE.renderer({canvas element});
var GLGEdoc=new GLGE.doc(”library.xml”);
renderer.setScene(GLGEdoc.getElement(”scene”));
renderer.render();
I’m now hosting the code on github: {link here}
Work on an offical website has begun but with so much other stuff to get done it’s a low priority at the moment.
I’m still having some issues with the directional lighting, I WILL get that fixed this week. I’ve done some research into shadows and I think I’ve got it straight in my head now so I’ll hopefully add to the library in the very near future.
I’ve added the blender scripts I’ve been using to export meshes, etc to the repositry.  They’re still very basic and requires tweeking on a per export basis so you will need a least a little knowledge of blender and python to use them.

First off this weeks demo. A very simple first person level:

Ths demo mainly shows off the new input control classes in the library. It also makes good use of normals maps for the walls. I believe it also contains the first mouse look control system for a webgame? I couldn’t make it work in the classical sence due to browser limitations so instead I took insperation from the wii version of metroid.

As a demo it’s still a bit lacking, since the speed of the control is framerate dependant, mainly due to my own laziness ;-) .

It has very basic collision detection to stop you walking through walls and allow to to climb stairs, basically just a 2D hight map. It looks like it’s going to be a killer trying to write a 3D physics engine in JS :-(

There maybe some issues on the mac as I’ve still not figured out why the last demo didn’t work, please let me know any error messages you get. Looks like I may need to invest in a mac mini just to test on ;-)

I’ve got a complete and working XML parsing class so everything can now be easily declared in XML and imported into the engine. So it now take very little javascript to get started, for example:

var renderer=new GLGE.Renderer({canvas element});
var GLGEdoc=new GLGE.Document("library.xml");
GLGEdoc.onload=function(){
    renderer.setScene(GLGEdoc.getElement("scene"));
    renderer.render();
}

I’m now hosting the code on github: http://github.com/supereggbert/GLGE

Work on an offical website has begun but with so much other stuff to get done it’s a low priority at the moment.

I’m still having some issues with the directional lighting, I WILL get that fixed this week. I’ve done some research into shadows and I think I’ve got it straight in my head now so I’ll hopefully add to the library in the very near future.

I’ve added the blender scripts I’ve been using to export meshes, etc to the repositry.  They’re still very basic and requires tweeking on a per export basis so you will need at least a little knowledge of blender and python to use them.

More coming soon..

WebGL Spotlights and animation

Another update:
Targets acheived this week:
1) spotlights are now done and dusted
2) made the animation system more generic(the aim is to make everything easy to animate), see the scrolling material layer on the floor of this weeks demo and the movement of the spot lights
3) started writting an XML file format to make things a bit easier when it comes to handling resources
4) fog is on hold until untill I’ve got round to doing some turrain to demo it :-)
See the Latest Demo Here
(Sorry still now video under linux again)
It’s been a very very busy week I’ve nearly doubled the size of the library. I looked into importing collada files and I don’t think
It’s all that practical, for more then basic mesh import. It’s an excellant generic format but it’s highly involved and since the whole
purpose of the library was to abstract away the complexity I’ve decided to try and map a very simple XML format directly to the library.
For example the material for animated floor in the demo is expressed as:
<animation_vector id=”materialanim” frames=”40″>
<animation_curve channel=”OffsetX”>
<bez_point>-5.47,0.0,1.0,0.0,8.34,0.0</bez_point>
<bez_point>12.28,1.0,30.22,1.0,36.84,1.0</bez_point>
<bez_point>31.16,0.0,40.0,0.0,46.32,0.0</bez_point>
</animation_curve>
</animation_vector>
<material id=”material” emit=”0.2″>
<texture id=”texture1″ src=”grass.jpg” />
<texture id=”texture2″ src=”mask1.jpg” />
<texture id=”texture3″ src=”dirt.jpg” />
<material_layer texture=”#texture1″ frame_rate=”5″ animation=”#materialanim” mapinput=”UV1″ mapto=”M_COLOR” scale_x=”5″ scale_y=”5″ />
<material_layer texture=”#texture2″ mapinput=”UV1″ mapto=”M_MSKR” scale_x=”1″ scale_y=”1″ />
<material_layer texture=”#texture3″ mapinput=”UV1″ mapto=”M_COLOR” scale_x=”5″ scale_y=”5″ />
</material>
I’m starting to think it’s nearly time to release(at least as an alpha, since the api is still changing on a daily basis). I’ve been looking into github(many thanks to Giles Thomas for pointing me that way). Any other suggestions out there?
Github does seem to be the best I’ve checkout so far. I’ve put up some preliminary documentation for anybody intrested Initially docs

Targets acheived this week:

1) Spotlights are now done and dusted

2) Made the animation system more generic (the aim is to make everything easy to animate), see the scrolling material layer on the floor of this weeks demo and the movement of the spot lights

3) Started writting an XML file format to make things a bit easier when it comes to handling resources

4) Fog is on hold until untill I’ve got round to doing some terrain to demo it :-)

…Read More

WebGL Update: Coloured point source lights

Just a quick update on the the webgl thing.  I’ve got lots done of the last week; the textures now support normal maps and masking, so texture splatting can be done with little effort. I’ve also been re-factoring some(read most) of the code, and I’ve got point light sources running. See the Demo. Sorry about the lack of a video this time but I’m developing under linux at the moment and haven’t figured out an effective way to capture yet.

Click here to view the second demo

Figures crossed I’ll get spot lights going this week and maybe even the start the fog or collada import….so much to do!!!

Lets hope I can get a proper alpha release ready before xmas.