This project was set up using the Universal Windows Program using DirectX 11 mainly to understand the workings of the graphics API and to add this to my portfolio.
The above screenshots try to show off certain features of the project some of which I will list below:
1. .obj and .fbx model loader that loads in vertex data, index data, vertex colors uv information [ material data extraction will be patched in].
2. Screenshot 1 demonstrates the .obj file loaded in, Terrain[explained below], and the infinity skybox.
3. In the 2nd screenshot above, I have marked out the additive effects of three different types of lighting[ RED: Directional, GREEN: Spot, BLUE: Point] on the model.
4. Screenshot 3 shows off my proudest feature, the terrain. I created a terrain generator that uses height maps. I load in a flat .obj with approximately 10000 triangles. I use the height map as a Texture2d resource for the vertex shader and modify the Y values of the vertices.
5. Screenshot 4 demonstrates an addition to the previous terrain loader of applying multitexture to the terrain I loaded in based on the height of the vertex. For this, I loaded in two Texture2d resources for the pixel shader and passed over the Y value from the vertex to the pixel shader. Interpolating on the Y value in the pixel shader and appropriately texturing the terrain.
6. An incomplete feature, for now, is the 2nd viewport on the top. I was going for a racing game style rear view mirror but ended up with an opposing camera to look around corners.
I have worked more on making an engine but that is currently in a win32 app which I hope to transfer onto here or vice-versa. A debug system, collision, and an animation system can all be added to this project.
I hope to redo these features in Vulkan or OpenGL just to get a feel for the other API options.
Weeks of work has gone into this while I independently research DirectX 11, the D3D11 api, and all it's wacky goodness.
That triangle is in it's own Vertex Buffer, it's optimized with a proper Index buffer, it's got a proper vertex and pixel shader compiled and being used (it's why the colors work), and just in general I can't begin to describe to you how **FRIKKIN** excited I was to see the colors work... after a week of bashing my face against the walls.. floors.. desks... anything with a surface really, it finally happened, and I can finally get some sleep.
No one said this would be easy, in fact many people have tried to discourage me from D3D and instead come abck to OpenGL or look into Vulkan.
And them I say: fair play, but, I'm good. I'm a sucker for punishment, and I feel all that much better about it once I've navigated the hill with a result.
Just for funsies here’s what this looked like before mussing around with shaders and pipelines, and this still took an enormous effort in it’s own right!
February 20th, 2015 - Taking care of more missing features
Hi all.. pretty heavily working on new features of the engine. This post shows two things - clouds in progress and emissive lighting.
Clouds were created via perlin noise, but not yet properly changing over time. Very close though. Figuring out exactly how to color them is a challenge.
Emissive lighting uses additional terrain lighting (not terrain modulation lighting) to light objects that are placed over the emissive area, or that move through it. I need to lerp it a little bit across nearby vertices but overall pretty good. The pictures show before and after emissive light is considered.
I've also spent a ton of time on the shaders to try to get them exactly correct and will try to show some complex examples soon.
I recently joined the Neo WoW editor project being worked on by Cromon and others, and hope to add anything missing from that editor as I learn it for my engine.
The other thing I worked quite a bit on is doing old style non-procedural water. It's looking pretty damn close, though I only implemented an ocean style so far. Video is in the next post.
January 14th, 2015 - Busting through the new build barrier!
It's been an awfully long time since I posted a build, I apologize. The more work I did the more of a pain in the ass I knew it would be to get an actual release ready so I just kept putting it off.
Anyway, it's finally done.. I'm pasting the commit msg below. As usual, contact me (see FAQ) if you're interested in testing.
--
build 32 - committed - 64-bit - plus UI API - REQUIRES FULL CONVERSION
Too many changes to describe fully. -- Make sure to uninstall any previous version -- 64-bit only now, sorry! -- UI library is IN! You can make an xml/lua UI just like WoW. Most features are supported. If you sandbox with MoP, a fair amount of the UI works if you set up the confs to use it. -- Character rendering is in! (that includes NPCs that use Character models). HD soon. -- Frontend/Glue is in! You can bypass it with TEST_LOGIN=1 in the client conf (which I have in the default conf). This logs in with test/test and chooses realm 1 character 1. -- You probably don't need to literally do full game conversions anymore, now that the converter can crawl map tiles -- unless you want to, anyway. If you want mob spawns and character rendering and stuff to work you'll convert some other things though. -- I will be updating the wiki over the next several days, with a bunch of new information. -- mmosdk_sandbox.sql is a complete database for testing MoP data. May or may not work with latest WoD. -- CHANGES has everything, cl by cl.. about 400 changelists, or 25% of the entire project up to the previous build changelist. Needless to say I have been hard at work -- This is such a massive change that there is almost guaranteed going to be a follow-up build fixing some major thing. Hopefully some people that are testing will give it a go and I can get to the bottom of any major issues quickly. Glad to be back.. and more soon!
Just a quick update. I took about 2 months off due to IRL work overload, but I'm back on this project hardcore.
Since I've been working on UI so much (see last post), I realized that in order to do character selection and character info frame etc, I was going to need to finally tackle character rendering.
It may seem weird that I haven't done it yet, but if you'll notice going back through the screenshots the only thing I had done was mob rendering which is quite a bit easier. Mobs just render using skin textures and do not actually equip items.
I now have all characters rendering with all equipment included. This work involved a bunch of new systems:
Compositing textures - This lets you render several chunks of other textures into a single one. For this, I used a deferred device context in D3D11 so that I can queue up commands for the device on a different thread (in this case the loading thread) then execute the command list in the main rendering thread. This is used for non-attachment equipment such as chestpieces, wrists, gloves, etc. by compositing texture sections onto the character model. They are not additional models.
Geoset control - This also pretty much only comes into play in character rendering which is why I never did it before. Certain meshes are enabled or disabled depending on the items equipped.
Attachments - These are items like weapons, helms, shoulders that have actual separate models and rather than being world objects in themselves, are sub-models of the character and attached to a particular bone in the model.
One issue is starting to arise here: over-reliance on particular database structures in order to support all of this. I am implementing sql tables that are mirrors of the record structure of certain Blizzard tables. There's no reason they have to be that way, but it lets me work a bit faster rather than designing new table structures and then converting the old one (e.g. ignoring columns I don't use, etc.) I would like to eventually have a better way to handle with this as my end goal is not to use their structures.
Anyway, on to more UI work including inheriting UI element templates in a much faster way than re-parsing the xml, and also rendering with the correct draw order based on frameStrata, frame level, texture sublevel, etc. So far, I've completely ignored that and it's causing problems.
Another 'too much blizzard' issue is starting to come up in the UI work. A lot of API work needed to be done on the client side, and for ease of use I'm using the same names and order of return values for things like e.g. 'GetCharacterInfo'. Not sure how I want to deal with this in the future.