Wednesday, June 20, 2007

Whoa! I'm still here...

Nine days without a post, bad new right? Wrong! I have slowed down my pace on the engine ever so slightly (though I'm sure you won't notice :) due to financial problems. But fear not I have made lots of progress. I have taken on some of the lighter parts of the engine such as physics and sound. I'm glad I did because getting all the systems communicating soon revealed some design flaws. Here are some of the updates I have made.

Physics: Video.
vehicles now consist of general physical entities
vehicles, have engine/transmission simulation/sound effects
general entities have an associated "collide" sound effect

Renderer: Video (I fixed the jitter.)
Camera now has a chase feature to chase any moveable
3d textures/height map Video.
particles

Sound: Video w/sound.
As noted above, mostly used by physics.
Implemented with openAL

3D Textures:
Photo Sharing and Video Hosting at Photobucket

Chunked LOD:

Monday, June 11, 2007

Don't worry

Don't worry I havn't fallen asleep on this project. But I have been finding it slightly harder to get motivated on it. I'm cooking up lots of crazy things on every side of the scale and it has caused major revisions to the code. Oh hell I'm already typin I might as well tell you about them...

First off I added another layer of abstraction above the cModel class, now all instances of a model in the scene are referenced through a cModelInstance class. This allowed me to stop duplicateing certain data per instance such as the physical parameters and render settings. Basically the only unique thing to an instance is its location and some material properties for things like reflections.

With the new level of abstraction I know have an XML file for each type of model that contains parameters such as it's physical shape and level of detail information. Each model only gets loaded into the engine once and each subsiquent addModel call simply instantiates a cModelInstance, spawns new physical entitys, and occasionaly graphical entitys.

With all that having been said, I can now modify the parameters of any instance of a model and it will apply to all like models in the scene. Also the scene XML files no longer need to include duplicate information for each instance of a model.

The debug GUI is looking great, it is beautiful. The reason I call it the debug GUI is it is strictly for scene creation and modication. It will also be used to modify the "In-Game" GUI which will be customizeable by the user.

More to come soon, my friend is here :)

Friday, June 8, 2007

Starting to look like an engine

I didn't know a good way to let the user adjust the scene's main directional light so I decided to implement a simple day/night system to control the lighting with a simple Time value. This goes along with my original plans to have a completely procedural sky so I named the day/night object "cAtmosphere". Can't wait to spend some time on it.

Right now it controls the scenes main directional light. At night it point up through the ground, this needs to be fixed and I believe the solution is using 2 directional lights. One to supplement the other while it moves so that shading dosn't pop. I also introduced a shadowAlpha parameter to the light which fades the shadows out as they cast increasingly horizontal. Not physicaly accurate but it prevents some artifacts.

The main menu reads:
Time: ##.##
Save
Save As
Open

Model edit menu reads:
Cast Shadows: T/F
Receive Shadows: T/F
Bounding Sphere Radius: ##.##

Video Post: http://video.google.com/videoplay?docid=-3448415448243535228

Thursday, June 7, 2007

Giant Leap Time

Today I tucked the new version of my physics system into my engine. By system I mean wrapper and callback system built on top of ODE (www.ode.org). I've been playing with this api for along time it's no wonder I got quick, sweet results.

Here is a video demonstrating the golfcart. Right now it is driving on a planar surface. Soon all geometry will be candidate for collision.

Video: http://video.google.com/videoplay?docid=7873988379238982163&hl=en

This screenshot also shows off the new GUI api that I've implemented, AntTweakBar

Photo Sharing and Video Hosting at Photobucket

Tuesday, June 5, 2007

ShadowMap Optimization

My shadow maps are now tightly bound to their shadow region as illustrated in these following pictures. Soon I will implement a "Shadow Safe" height to free up a little more depth resolution in my maps.

Video Update: http://video.google.com/videoplay?docid=3229975064946818610


Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket

Monday, June 4, 2007

Things are goin good.

Skipped a day of posting and I definately have things to show for it. Added to the features list are:

VBO creation, DrawCall Creation, Material Sorting, and officially Cascaded Shadow Mapping

With the vbo's and material sorting I now have 80 houses in the scene with shadows with out a noticeable decrease in performance. I am consistently getting 25-30 frames per second and after much testing and trouble shooting I believe it is caused by v-sync and I am looking into it.

VBO's: all static geometry gets loaded into a vertex buffer and new indices are created. this buffer gets activated once after it is created to minimize data movement.

Material sorting: geometry chunks are now organized so that each material only gets activated once. Currently this means each shader/textures combo gets activated once per pass.

Cascaded Shadow Mapping: My shaders have been upgraded to now process the 3 cascaded shadow maps. There is some flickering with the largest shadow map but I believe after a more optimal projection is created it will be reduced significantly.

Saturday, June 2, 2007

Another Day

I fixed my reflection projection code, turns out the texel needed to be projected *after* the hardwares interpolation (aka in the pixel shader). Reflections are now PERFECT woo hooo!

Also with some insipration from a member on www.gamedev.net I've started to implement Cascaded Shadow Maps (CSM's).

Here are some screenies.