2009-10-15

Aether3D progress



These blog posts are almost always late, but here we are again. Aether3D now has support for scripting. It's possible to make working doors, elevators, keypads etc. using my own scripting syntax which resembles BASIC or Pascal. It's implemented by having a Scriptable interface that's implemented by scriptable objects, lights and cameras. The script code currently goes to the scene file, but I'm planning to make it possible to create them from anywhere. When the player clicks RMB, a ray is cast to the looking direction. The closest intersected object's "activate" script is called. Here's an example that opens/closes elevator's doors:
objectaction liftbutton activate
object liftdoor_left openclose
object liftdoor_right openclose
end

objectaction liftdoor_left openclose
playsound assets/sounds/button.wav
if open == 0
moveto -7 4.8 -32 1
set open 1
else
moveto -3.05 4.8 -32 1
set open 0
endif
end
The other big new thing is stencil shadow volumes implemented using Carmack's Reverse. It took me about 1.5 weeks to get it working right, but it's absolutely rad. My current implementation is slow, because it's calculated every frame even if the light's or the object's origin remains the same and because I don't use two sided stencil test yet. My dev computer's Intel G45 chipset's Mesa driver doesn't yet support two sided stencil test, but I hope it's supported in Ubuntu 9.10 which is out in two weeks. At least it works on my Acer Aspire One's Intel 945GM and Ubuntu 9.10 beta.

Oh yeah, I forgot to mention that I implemented view frustum culling. Before that, my test scene (~500 meshes, ~20,000 triangles) rendered 20 FPS, but now it's 30. I'm culling against axis-aligned bounding boxes, but I will try bounding spheres in the future.

Website: http://users.utu.fi/tmwire/aether3d/

2009-08-13

The Fountainhead

I think I'll use this blog also to write about books I'm reading. I'm now three quarters into Ayn Rand's The Fountainhead, published in 1943. The book is about individualism, self-esteem and social conditioning. It describes the life of two aspiring architects who have completely different outlook on society. The second character, Peter Keating, is always worrying about what others think about his work or opinions. He tries to design buildings that please everyone and he designs conservately. He's not happy and he's very reactive, but he's handsome and a social climber who uses people to his own ends and gains high status.

The main character, Howard Roark, however, designs buildings only for his own pleasure and doesn't give one iota what others think about his work. He's not after fame or money. His buildings are simple, modern and not liked by the majority, so he doesn't do so well financially, but he's emotionally stable. People don't like him because he does his own thing and doesn't want to give in to other's wishes, but he doesn't deceive people and keeps his promises.

I thought to myself, what would the society look like, if there were more people like Roark? There would be more creativity because people would not copy each other's ideas. People would also not be emotionally dependent on others (hah, like it would work out in reality).

This is the first book from Ayn Rand I've been reading and I like it so much I'm going to read Atlas Shrugged after I finish this. I don't know almost anything about Rand except that she was the founder of the Objectivist movement, supported free market and individualism. I found the book because I'm interested in self-help, and it was mentioned in one self-help forum.

2009-06-03

3D engine progress


A lot has happened on my engine since my last blog post. Aether3D now converts .x, .obj, .3ds and COLLADA .dae to my custom model format. Objects can have environment map over texture and specular hilight is supported. There is also a lot of shader code, but the shader support is incomplete. Scene is read from a file and can also be saved into a file. There is also basic collision detection using bounding boxes. I also began to make a big test scene. It's also a great way to learn Blender. The scene is very far from being complete. I plan to extend COLLADA support, because it's a good format and also supports bone structure, which I plan to implement later. Objects and meshes have names and it's possible to search meshes by name so that it's easier to modify their properties. The engine compiles now also with MinGW on Windows. Aether3D's website is http://users.utu.fi/tmwire/aether3d

2009-03-23

My 3D engine



This blog has been without a clear theme, so I will use it for a while to document my 3D engine's progress. Aether3D is my first OpenGL based engine and I'm using it as a platform to learn OpenGL and engine development in general. I use C++ and SDL to implement it, but also did a Java version which has less functionality.

The engine is object oriented and contains the following classes (along others): Camera, Mesh, Object, Engine, Vector and Light. The engine uses a scene graph to handle scene's hierarchy. Objects can have many meshes and each mesh can have its own texture and material. Supported object file formats are .3ds, .x, .raw and .obj (WIP).

Things I plan to implement include shader support and shader programs, collision detection, shadows and multitexturing.

More info coming in the near future.

2009-01-03

2009

Things I want to do this year: meet new people, eat healthy, get fit, travel, have fun.