The character was jittering back and forth when it walked, which I originally assumed was due to the large number of lights I was testing with. However, when I removed all of the test lights, the character was still jittering. After a bit of debugging, it looks like the bug was caused by the …
Originally I was rendering the scene with a given shadow map to a temporary texture. This texture was then rendered additively (alpha blending ONE, ONE, ADD) to the default render target in order to accumulate the various light and shadow map effects. The reason I was rendering to a temporary…
I read through the section in RTR on shadow mapping and I think I know enough about the basics to get some kind of shadow system into the test project. Shadow mapping involves rendering the scene's depth information from the light's perspective. You then render the scene from the camera's per…
Lighting works! Per-pixel lighting was easier than I thought; it is literally just moving the lighting calculation from the vertex shader into the pixel shader.
If you want to learn how to do lighting, I recommend Real-Time Rendering, specifically chapter 5. From what I have seen, the book goes…
If you want to learn how to do lighting, I recommend Real-Time Rendering, specifically chapter 5. From what I have seen, the book goes…
Multiple animations are now supported. Previously, only the animation stored in the model file was playable, so the character had no idle animation (or pose). Because there was no pose for being "idle", I jury rigged the animation code to zero the bone position/orientation if the player didn'…
Today I added in support for materials, multiple models, and instances. A picture is supposedly worth a thousand words, and I seem to be at a loss for anything really interesting to say today, so here is a screenshot of the current "demo" I am working on:
[size="1"]
Reposted from http://invisibl…
[size="1"]
Reposted from http://invisibl…
Now that I have a single animation working, it's time to start worrying about how to use multiple animations. The Milkshape3D file format only supports a single animation, so I did a bit of investigating to find out how games normally store multiple animations. From what I could tell, a lot o…
Weekends are rather unpredictable for me. Sometimes I will be able to get a normal work day's worth of coding done, and sometimes I won't be anywhere near the computer. Today is a perfect example of the little-to-no work day: I just made the animated model move along the z-axis to see how it …
I finally have multiple-bone skinning working! I think I can summarize the last few days as "Wow, that was a pain". On the surface, a hierarchical animation system sounds easy: "Just go down the tree and accumulate matrices as you go", but as is usually the case, the devil is indeed in the de…
Today I worked on skinning. Skinning is the term used for 3D bone-based animation, and comes from the idea of putting "skin" on the bones.
My initial plan for skinning was to store all of the joint matrices for each model instance in one big texture. The advantage to this is that I can fit a lot m…
My initial plan for skinning was to store all of the joint matrices for each model instance in one big texture. The advantage to this is that I can fit a lot m…
MS3D model geometry is now loaded correctly. One problem I did encounter was that the models are stored in a right-handed coordinate system, but the game uses a left-handed coordinate system. This means that the x coordinate is pointing in the wrong direction, basically. I initially tried to…
We use Milkshape3D for modeling, so it makes sense to support loading .ms3d model files. I implemented basic loading code this morning, but it needs a lot of work. In its current state, it will only load a single triangle out of the model, and materials and animation are not taken into accoun…
I spent most of the day trying to get the anti-cheating shader to work. I still don't have it working quite right, but it's getting closer. The idea is to create worse and worse banding the darker something is, thus blurring any details. I am able to create banding just fine, but making it v…
I worked on the rendering system today. Because of the way I handle errors, there is a class for the D3D object, the device, vertex declarations, vertex buffers, vertex shaders, and pixel shaders. This is a little inconvenient, as the following code shows:
m_renderer->GetDevice()->BeginSc…
Today I worked on the systems. Like I mentioned in yesterday's blog post, I have decided to take a reference counting approach to this problem. My original thought was to create and destroy the systems from within the application layer, and share these with the game states. With the new desi…
[size="3"] Cellular Automaton
I learned a new term this morning: "Cellular Automaton". It's basically a grid where something can be in each grid cell and the state of that something depends on certain rules about the surrounding grid cells (its neighborhood).
An example of cellular automaton be…
I learned a new term this morning: "Cellular Automaton". It's basically a grid where something can be in each grid cell and the state of that something depends on certain rules about the surrounding grid cells (its neighborhood).
An example of cellular automaton be…
Getting back into coding after a few weeks leave was a bit rough, but I managed to get the windowing and some basic game state code in place.
My plan is to split the code up into the following layers: Main, App, Systems, and Game State.
The main layer is pretty much just WinMain(). It handles the c…
My plan is to split the code up into the following layers: Main, App, Systems, and Game State.
The main layer is pretty much just WinMain(). It handles the c…
If you want to learn HLSL, I highly recommend ShaderX2: Intro & Tutorials, specifically the article "Introduction to the DirectX High Level Shading Language". The book, along with a couple of the other ShaderX books, has been made available for free over at http://tog.acm.org/resources/shad…
While reading about memory management, I learned about something called "placement new". "Placement new" is the new C++ keyword, except you pass a memory address to it for where you want the object to be constructed. Placement new doesn't allocate memory for the object, so I suppose it is one …
While reading "Pitfalls of Object Oriented Programming" I discovered a new term: "Branch Prediction". Branch prediction is an optimization used by the CPU when it encounters a "branch" in the code. A branch is basically an if-statement; depending on some condition, execution will either contin…
While reading the "The Technology of a 3D Engine" series over at Beyond3D, I had an idea: Create a PC game and optimize it for a specific set of hardware. This would be similar to writing a game for a console, and could be useful for setting the system requirements for a game. This idea is mo…
I spent most of the day reading about constraint solvers (as well as error correction). It seems like you can categorize constraint solvers as either sequential or simultaneous.
Sequential
Sequential solvers solve each constraint individually. Because solving one constraint could invalidate anot…
Sequential
Sequential solvers solve each constraint individually. Because solving one constraint could invalidate anot…
This blog has been a little slow. One of the reasons for this is that I have been limiting it to newsletter posts only. However, there isn't always news, so some weeks a newsletter is not released.
In order to make this blog a bit more active (and interesting I hope) I have decided to repost my da…
In order to make this blog a bit more active (and interesting I hope) I have decided to repost my da…
News
The seventh demo of the SHMUP has been released. For details, click here.
From the Programmer
Written by Invisible
Now that the SHMUP has been in development for a while, it's starting to get a bit texture heavy. Because of this, some users have been unable to run the game due to a lack of vi…
News
The sixth demo of the SHMUP has been released. For details, click here.
The SHMUP is now officially an IfThen Software project. http://www.ifthensoftware.net/forums/index.php?showtopic=2231.
From the Programmer
Written by Invisible
Last week I was stuck on what should have been a simple problem:…
News
The fifth demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.
From the Programmer
Written by Invisible
The heightmap tool is finally finished! Since I decided to use the arrow keys rather than the mouse to move the tile selector, the tool was comp…
News
The fourth demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.
From the Programmer
Written by Invisible
I spent the majority of last week working on the alien ship's movement. They needed to enter the screen and then circle around in front of the …
News
The third demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.
Forum account registration has been reopened.
http://www.ifthensoftware.net/forums/index.php?showtopic=2201
From the Programmer
Written by Invisible
We have postponed the heightmap tool whic…
Advertisement
Popular Blogs
Advertisement