Archive for the ‘webgl’ Category
WebGL: Fog in GLGEI’ve finally added the long promised fog. As it was a quick and easy addition, I’ve also done a lot of optimisations including replacing Sylvester with GLGE optimised math functions. Guesstimate is that performance gains this week are ~20%. I was hoping to add some frustum culling of objects as well but there just aren’t enough hours in the day, but I’m sure I’ll get it done soon along with the z-sorting for blending. | ||
WebGL:Shadows in GLGEI’ve spent the last week getting shadows working in GLGE. It’s taken way longer then I was expected as rendering a depth map to a texture doesn’t seem to be working in any browsers and checking out the firefox code it would seem it’s just not supported there yet. So I’ve had to hack it bit, encoding and decoding the depth from the rgb values. It works but it’s a quite intensive. It also works on firefox but it’s still slow, hopefully I’ll be able to figure out why it’s going so slow at some point In addition this week I’ve added parsing of color value attributes in the XML so you can now specfy light/material colours using the normal HTML syntax ie “#ff0000″ “red” “rgb(255,0,0)”. I also sorted out the ambient lighting properly which until now was just tacked on top. See the latest demo over at GLGE.org | ||
WebGL:GLGE Demo SceneThis week I’ve taken a bit of a break on the coding. I’ve now got a website up and running for GLGE as well as officially releasing an alpha: I’ve also spent a few days coming up with a more impressive demo. Please bare in mind I’m no pro CG artist, just a now and then amateur, so imagine what could be achieved by the pros in a very short space of time. It’s not showing off 100% of the current feature set, some of which I think still needs rewriting and finishing off. But, hopefully it’ll be enough to change the mind of at least some of the WebGL naysayers, encourage more rapid development and make 2010 the year of 3D on the web. …Read More | ||
WebGL Spotlights and animationAnother 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 | ||
