7/29/2006
Everything works ... for the most. The shader, the lighting, the splatting, the loading, and the saving. So lets list some of the success thus far: 1. Save/Load terrain data via binary file. 2. Generate Random Terrain (I still plan to add a few algorithms to this) 3. Display terrain using: lighting, splatting, and normal maps! 4. Lighting techniques: height based, hardware, lightmap, and slope lighting (not working properly). 5. Completely re-programmed the rendering to use the HLSL. Some regrets/re-writes if I had the time: 1. Make the editor easily extendable with plug-ins. 2. A more serious exploration of geometry management: LOD, geomipmapping, etc. 3. Terrain manipulation without the generation tool. (i.e. selecting a group of vertices and manipulating them) There
are tons of stuff I wish I had the time to have explored, but with a
limited knowledge of c# and directx at the start I'm glad to be where I
am today! I'll be sure to post more screens over the next two weeks of anymore updates that might proceed!
Posted by tthomas | Permanent Link
7/25/2006
Bad News I left off last time with the hope of using shader with my project. I wasn't expecting to have to do a nearly complete redesign of my code, which required some explosives, a remote device, and a safety helmet. Well, days after I returned to the surface, I managed to get some code working. The majority of the problem was that I was using DirectX 1.1 instead of DirectX 2.0. I know... I know... I took a job eating bees. The other problem was my using the FVF instead of VertexDeclaration. The revised framework will contain less code for sure. I'm going to remove all files and code that have become depricated along the way. Good New My shader works, finally. It supports directional lighting, texturing, normal mapping, and up to four layers splatted on top of the base layer. Yes, you can normal splat (texture splatting the normal maps) as well. I also got it to work in VS2005. At the moment, I'm rewriting a lot of code. First on the list is the BruteForce class. I'm using Mesh objects instead of VertexBuffers and IndexBuffers. This change makes things so much easy for me! I've done away with some of my wrapper classes: VertexArray & IndexedArray for this reason. Once done here, I'm going to re-integrate the fault-formation algorithm into the system and make the necessary changes/updates to my editor until it breaks or works... Until next time!
Posted by tthomas | Permanent Link
7/11/2006
It's been a while since my last post. Here's a run-down of the events. I toyed with the notion of level of detail for the terrain right before I got fed up with the algorithm and finally ripped it from my engine! So where am I now' I started on the actual editor last week. You can create the terrain mesh, apply a faultformation hill algorithm to it, and light it(height-based, but lighting none the less). I'm working on allowing the user to select between height-based, slope lighting, lightmapping, dynamic lightmapping, and hardware lighting. I'm also looking into shadow mapping, which instead of giving color like a lightmap, it will give a shade. I'm also working on some imaging. Hopefully you'll be able to apply a mask to an image and save it if you'd like. You'll have the option to texture splat on the fly or pre-create the texture. Future: bump-mapping and normal mapping. I've been considering the idea. Wouldn't it be great to be on a rocky ledge and the rocks to have depth'
Posted by tthomas | Permanent Link
6/27/2006
Finally got texture splatting to work with C#. Now that I look back at things, it is fairly simple to implement. The idea behind texture splatting your terrain is so you can texture your terrain to look normal. Lets say you have a grass texture and a sand texture. You want the two to blend gradually to the other if they are side-by-side. The solution is splatting the textures onto masks. You'll have a mask for each texture: grass, sand, rock, etc. You create a mask or an image that is transparent everywhere you don't want the texture to show. Blur the edges where the color of the mask meets the transparency and you have a smooth transition. Place each layer on top of the other and walla! Now I'm trying to implement a continuous level of detail algorithm that will add detail where needed. Just thinking about it hurts my head. After that I'll try to implement ROAM(another detail algorithm). Then I'll add lights, shadows, . . . if I'm lucky!
Posted by tthomas | Permanent Link
6/22/2006
Diving into Visual Studios 2005 has become a much more fun experience since previous issues have been solved. However, errors and debugging have slowed down the progress of my "algorithm testing" phase. Tomorrow I'll, hopefully, have developed an easy class/interface design to allow the use of various algorithms to manipulate vertices. Until then I'll continue to bash my head against the keyboard until my code compiles.
Posted by tthomas | Permanent Link
|