Wednesday, June 04, 2008

Weekly round-up


Here's a round-up of the things that I've been working with a great deal over the past one week:
  • Google Sketchup
  • BSP Trees & 3D Rendering
  • Javascript
  • SDL & Projective Geometry
I might have something pretty interesting coming up within a few days, so if anybody who's into this stuff reads this, come back in a few days for an interesting Proof-of-Concept demonstration on this blog. It might be really dumb, but it does look pretty good to me.

Also, I was looking up into hacks of Nintendo Wiimote (thanks to my friend Roshan Shariff who got me interested into this - he's doing some pretty interesting Wiimote hacks too), and I think I'll get a Wiimote sometime soon when I save up enough for it. Till then, I'm looking into the sensors and libraries for interfacing it, and being a gamer myself AND a programmer, I can think of really nice things to use it for. :-)

Also, me and Roshan got into discussing how iD software's new game "Rage" implements the Megatexturing feature for rendering and texturing such HUGE landscapes etc, and found it to be an application of "Clipmaps", that are (as far as I understand, I'm still figuring it out), a way to use the Mipmaps concept (see below) and clip a cubical region from the Mipmap pyramid to get a series of landscape textures of decreasing quality (i.e greater zoom out).

So in effect, the "MEGA" Texture, often reaching into dimensions of 128000 x 128000 (which is really big), is used to construct the clipmap stack:
[Texture 1]
[Texture 2]
[Texture 3]
.
.
[Texture 'n']

In this, 'Texture 1' will be a say, 512 x 512 texture of the segment of texture (from the original 128000x128000 texture) that is right in front of the viewer. This one has no zoom effect, and is of therefore the best (original) quality. Then next texture, Texture 2 will also be 512 x 512 in size, but will be a "compressed/zoomed out" version of 1024 x 1024 segment of what is front of the viewer from the original texture, so this would be a 2x zoom out. Then Texture 3 would be another zoom out and so on.. and by Texture 6 (I think), the entire 128000x128000 texture will be compressed and represented by a 512 x 512 texture. Now, the renderer will just interpolate between the textures at the various levels the stack to render portions of the texture and show the required Level of Detail only. This also enables parts of textures to be streamed from an external disk when required, instead of loading the ENTIRE texture into the memory (which is dumb, not to mention almost impossible if your texture is 128k x 128k). I posted this here in order to make sure I understand properly myself, so there might be loopholes.

Useful resources:
Shashank
PS:
The picture at the start of the article is a screenshot of iD software's RAGE game, demonstrated at QuakeCon 2007 by John Carmack.

1 comment:

yush.. said...

Wassup with the JavaScript man?? u dint mentioned it?? i am keenly interested to know more about it...

PS: also give my second blog link:
http://temptingcuriosity.blogspot.com/
:)