C++, Graphics, Programming, Review, Vulkan

Review: Vulkan Graphics API: in 20 Minutes by Kenwright

Vulkan Graphics API: in 20 Minutes is short, no-nonsense, introduction to the Vulkan graphics API. Though the title of the book says “20 minutes,” I believe I spent somewhere between 1 and 2 hours to finish it (though I admittedly read pretty slow). This is the type of book I wish there were more of: something short and sweet as a brief  intro to get your feet wet. I feel many programming books can be daunting at 600+ pages, so it’s nice to find something you can complete in one or two sittings.

So what is actually covered in this little book? Basically it shows the basics of how to initialize the Vulkan renderer and draw a triangle on the screen. The author does not use any additional libraries, so it’s only showing the Vulkan API itself and some boilerplate Win32 code for opening a window. Though I had already been reading about Vulkan previously, and didn’t find any new material here, I could see this as a decent first step in learning the API.

To be honest,  Kenwright does not really provide any deep explanation of the concepts presented. It’s basically just showing some of the common function calls and the structure to set things up. You could easily find similar code online (at various sources) for displaying a triangle in Vulkan.  Even so, I still think the text holds value and may be more accessible than some of the larger (and more costly) Vulkan books that do provide more detail. This is sort of something that would be useful if you’ve really never worked with the API before and just want to see how the code looks and if it’s something you’re interested in prior to researching further.

All in all, I can’t really fault  Vulkan Graphics API: in 20 Minutes too much. While there were a couple typos and odd use of the English language, overall the book was concise and coherent. It provided a cursory look at a new, exciting, graphics API and it did with with a meager time and money investment on behalf of the reader. While you can find basically the same material online for free, I still personally enjoy learning from books and think the format may click for some people better. It only really scratches the surface, but as a short “first intro” book it’s not bad.

C++, Graphics, Math, Physics, Programming, Review

Review: Essential Mathematics for Games and Interactive Applications by James M. Van Verth and Lars M. Bishop

Essential Mathematics for Games and Interactive Applications by James M. Van Verth and Lars M. Bishop is a quality math book if I ever saw one.  Strangely, the first edition came out in 2004 but the book was kind of off my radar until recently.  This third edition was published in 2015 and seems very current. The authors here do a great job of explaining the material properly. I felt like they created a great foundation for learning these complex ideas and I appreciated the  quality and readability of the code  samples.

The book starts with an overview of computer number representations, and goes into detail with the IEEE 754 floating-point standard. At first I assumed this was unnecessary detail, but actually it’s pretty useful to understand and a good base to build on. They continue with vectors and points, linear transformations and matrices, affine transformations,  orientation (including matrices, Euler angles, axis-angle, and quaternions),  and interpolation (linear and curved). In the next section they transition to more graphic oriented topics such as: viewing and projection, geometry and programmable shading, lighting, rasterization, then a random chapter on… random numbers, and finish off with intersection testing  and rigid-body dynamics.

Just looking at the table of contents is sometimes not enough to get a feel for the quality of the text, so I will reveal  more. The beginning parts are really exactly what you’d expect for a game math book. The basics of vectors, matrices, quaternions, etc. are the bread and butter for a 3D programmer. The coverage here is solid and great for a beginner. Advanced readers  may not find any surprises, but it’s still a good refresher.  The interpolation chapter I found interesting, especially the detail into different types of curves and splines .  This could be immediately useful for coding  a skinned character or animating a camera in a game.  Viewing and projection were given adequate coverage and are essential to anyone wishing to code a graphics engine themselves.  The next chapter was particularly long and explained the programmable shader pipeline to great effect.  The authors explained everything from color representation, vertex attributes, drawing geometry, fixed-function versus programmable, vertex and fragment shaders (aka pixel shaders), and texture mapping. Really a great introduction for anyone wanting to learn to code shaders themselves.  Then they  move onto lighting and go into the basic types (point, spot, directional, and ambient), surface materials, per-vertex and per-fragment lighting, combining with textures, and a few small sections of more advanced topics like normal mapping, physically based lighting, HDR, and deferred shading.

Next up is rasterization, which was an awesome chapter that explained (in epic detail) how rasterizers work which I feel does help when you know what’s going on behind the scenes. I don’t know of many other books that explain this part of the pipeline so well, so this was much appreciated. The random number chapter was also quite informative. It’s easy to just call a function that spits out a number and not actually understand what’s happening.  I found this  portion of the book to be a nice surprise. Intersection testing was covered near the end, and  it was one of the longer chapters. Almost anything you could think of was here: finding distances from lines and points, sphere/ray/plane intersections, axis-aligned bounding boxes (AABBs), swept spheres, object-oriented boxes, triangle intersection, and a simple collision system. Finally the book closes with a chapter on rigid-body dynamics. I actually purchased my copy mostly for the rigid-body material and I felt I learned a few useful things. Of course, it was only one chapter but some of the explanation was better than whole books I’ve read on physics. Certainly it gave me a few things to research further, and I appreciate that.

Overall I would say that  Essential Mathematics for Games and Interactive Applications is an almost flawless textbook. I may be a great place to start for a beginner, and even intermediate to advanced readers may learn a thing or two. Some of the other game math books I recommend I read so long ago it’s hard to make a direct comparison. But this title is certainly up there with the best. I would wholeheartedly recommend.

Gaming, Graphics, Programming, Review

Review: Game Programming Algorithms and Techniques: A Platform-Agnostic Approach by Sanjay Madhav


Game Programming Algorithms and Techniques is one of those books that tries to be as general as possible, and I believe the author was successful in that. Too many books target one specific piece of software or even one particular version of a framework and end up becoming dated rather quick. However, the core ideas in game development have not fundamentally changed in a while. Sure graphics get better, and there are more complexities to working with modern hardware, but the programming algorithms themselves are still very much the same.

Sanjay Madhav starts the book with an overview of some classic games, how a game loop works, handling timing in games, and the idea of game objects. Next he discusses 2D games, sprites, scrolling, and tile maps. There is a quick chapter on linear algebra. Then the author continues with a treatment of 3D graphics, including  coordinate spaces, lighting and shading, visibility and transformation. Handling input is covered as is sound. There is a chapter on physics, which I much appreciated, and then some quick coverage of cameras, artificial intelligence, user interface, scripting, and networking. Finally, the book closes with two example projects.

The author does a great job of explaining complex concepts in easy to understand language, especially in the math and physics chapters, which could be confusing otherwise. One of the pieces that I gained a lot from was the explanation of mouse picking 3D objects, which was described beautifully and made a lot of sense.  The chapter on scripting languages was also helpful and relevant.

Overall I enjoyed the book, and think it would be helpful to beginning programmers, or experienced coders in other fields looking to get into game development. I feel that for intermediate to advanced game programmers, much of this book will be a review. Not to knock the book for that, though, I think it’s a great book if you understand the audience it’s aiming for. I mean, there were even a few bits of information that were new to me, however much of the book was about stuff I’ve seen before.

That said, I do like to read texts of various levels, and even beginner books can help you look at familiar problems in new ways. So I think it’s very much worth reading, especially if you are just starting out in game development.

C++, Game Engine, Graphics, Review, Unreal

Review: Learning C++ by Creating Games with UE4 by William Sherif


Right here is a book with a clearly defined goal and an excellent execution. Learning C++ by Creating Games with UE4 by William Sherif takes you on a journey from being a total blank in C++ to coding some basic features of a 3D game. Even though I have been coding in C++ for years, I still enjoy reading novice level texts as sometimes they can teach you a new way of thinking about familiar problems. For me, it’s also important to have good book recommendations (especially for people starting out), and I actually discovered this book from a member of the Unreal Engine community looking for a review. So here it is.

William Sherif starts the book proper, with how to setup a project using either Visual Studio or XCode. This is actually a great design, and it’s thoughtful to include both operating systems (Linux is not officially supported by Epic yet, so I can’t knock the author on that one). When first starting with C++ programming, probably the hardest thing is not the syntax but understanding how to configure the project and settings in the IDE, so I like that this was covered first. Next Sherif moves onto the basics of programming: variables and memory (numbers and pointers), control flow (if, else, equality and comparison), looping (while and for loops), functions and macros, variable scoping, objects and classes, inheritance, and finishing up with dynamic memory allocation and arrays. Really quite a good foundation for learning C++. I found the explanation to be clear and concise, and the author did a good job of easing the reader into the information. C++ is a huge topic to cover, and there are volumes of text many times this size going deeper into the intricacies of the language. I wouldn’t actually fault the book for this, I think it’s a strength. Some novices may be overwhelmed by C++ if they start with something like Stroustrup’s 1,300 page tome. So I would say this is a great introduction to the language, and a great refresher if you’re coming back after a while.

The second half of the book is focused on Unreal development in particular. The author opens by discussing templates and containers in UE4, including some basic ones like TArray, TSet, TMap and then discussing the STL versions of these and how they differ in Unreal. He follows up with the first real example in the engine: an inventory system (with a UI) and the ability to pickup items in the world. I like this approach as it’s a real tangible task that many games would include. The author then shows how to code NPCs that are able to display a text message to the player. Next, Sherif talks about how to create monsters – basically enemy characters that can chase and attack the player. He closes with adding spell casting (including the code and setup of the particle system).

So this is not a book that will show you “How to Make a Complete AAA Game in 24 Hours” but I don’t think that was the intention. What the author does is introduce C++ at the right pace, and also show how to get started with applying that knowledge to developing games in Unreal 4. In some ways, it almost feels like two separate books: one on basic C++ programming, and another on coding in C++ for Unreal Engine 4. This is not necessarily a bad thing, and I think both parts are worthwhile. Really, this book would be most valuable to someone that has little experience with C++ and is also new to using C++ in UE4. If you are already a C++ pro, the first half of the book may seem too basic. However, I think the Unreal coverage can be useful to developers of varying skill levels.

Overall I enjoyed Learning C++ by Creating Games with UE4 and would entirely recommend it to anyone interested in gaining knowledge in C++ for Unreal. To be honest, this is one of the only books out there on the topic right now, so it sort of stands alone. I believe it’s taken me a little over a week to read the 342 page text. Certainly, it doesn’t cover everything you need to know (not even close) but it’s a great place to start. I’d also add that I read the book on the Kindle Fire HDX, and the formatting looked pretty good. The price on the e-book was also much more affordable, so now may be a good chance to upgrade if you’ve still been reading on ink and paper.

3D Engine, Graphics, Tutorial, Unreal

Tutorial: How To Make a Cube Roll On A Grid in Unreal Engine 4

In this tutorial, I will show how to make a cube roll from side-to-side on a grid. This project took me around 3 days to complete, though much of that was wrapping my head around basic things in UE4. Some of the areas explored here include setting up key bindings and action mapping, setting and clearing timers, and rotating around an arbitrary point.

First, you want to start by setting up the action mapping. What this does is basically binds an input button (like a keyboard key) to a particular action (really just a name that you make up). For this test I needed 4 keys for up, down, left and right. Since the arrow keys and WASD were already used by the default Unreal fly camera, I choose to employ the IJKL keys to move the cube around. These options are found in “Settings->Project Settings->Engine->Input->Bindings”.


Next, we will need to connect those actions to a function in order to make something happen on the screen. You can do this by creating an “InputAction” Blueprint and choosing the name you created (like “Action_Up”). I set these actions to call a function I created for this example called “StartMoving”. In some cases, you may want to bind the action to a custom event, which may simplify the code and allow for a cleaner Blueprint (as you can use events to effectively “jump” to other points in the same Blueprint without a line connecting them). In this case, I had to pass in some state (to know which direction the cube is moving) so using a function was better suited for the job.


The “StartMoving” function is not that complex. All it does it check first if the timer is active (to avoid registering input while the cube is already moving), save some state on the cube itself (the direction of movement and it’s last position), and then creates a timer to handle the animation.

The key part is the creation of the timer itself, using “SetTimer”, which is shown below. You can think of a timer as spawning another process or thread that can run concurrently with your main logic. The timer just calls a function of your choice (“MoveTween” in this example), at a specified time interval (use 0.0166 for a 60Hz animation cycle, which looks smooth enough). You can also set whether it loops or not, we use looping in this case.

Finally, we have the “MoveTween” function, which is what is called by the timer and what does all the math calculation to rotate around a particular axis and point in space. It’s also what animates the cube, and clears the timer at the end itself. It’s very useful to be able to spawn a timer, and then have it terminate itself when necessary. The full function is shown below.


Really, the core math of the method is done by two function included in UE4, “RotateVectorAroundAxis” and “RotatorFromAxisAngle”. We first create a axis based on the movement direction. Then we subtract the pivot point (in our case, the bottom edge of the cube), rotate around that axis, and then add the pivot point back to the location. The rotation around axis logic is actually based on an example shown on the Unreal Answer Hub, though it was modified to fit my purpose.


And that is basically it. I’ve even included the full project file below for you to download and experiment. I imagine this type of motion could be used for a type of puzzle game created in Unreal Engine 4. Download Link: UE4.7.4 Cube Motion Project Files

3D Modeling, Art, Game Engine, Graphics, Review

Review: Maya Studio Projects: Game Environments and Props by Michael McKinley


This is a book with a solid focus, and I feel like it accomplishes it’s goal nicely. Basically what Maya Studio Projects is about is creating environment objects and props for games (as the title implies). There are 9 chapters, and each one chooses a different object to model. McKinley is very detailed in his explanation, and really shows each and every step needed to follow along. Some of the objects modeled include walls and floors, foliage, weapons, vehicles, buildings, lamps, and a simple object animation. Supposedly there is a DVD companion, but I got the Kindle e-book and usually don’t bother with looking at the discs.

What I like most about Maya Studio Projects: Game Environments and Props by Michael McKinley is that the book is very much geared toward game artists. While pre-rendered art and game art do require the same skills, there is a slightly different thought process and flow when you are working within the limitations of a real-time game engine. The author does not assume you are using any particular engine (though Unreal is named a few times) and the techniques can be used in almost any modern engine. However, the instruction steps are very much tailored for Maya. While this is great if you want to follow along, step for step, it may make it more difficult if you use another package. Also, I typically like to just read along and sometimes I felt the author was too specific in each step, making it harder to extract the general philosophy of modeling. This can be a pro or con depending on what you are looking for. I would have also enjoyed more pictures. Sometimes as much as 10 or 12 steps were made in text alone and it can be slightly confusing without a demonstrating photo.

To sum it up, this was a fine book and I learned a little bit. I would not say it was exceptional, but there was nothing grossly wrong with it. Certainly, if you are looking to create props with Maya (especially man-made objects) this is not a bad place to start. If you are using Maya LT for game development, this is a very relevant book since it (thankfully) doesn’t use really any of the features missing in the LT version. One slight disappointment, McKinley doesn’t actually show you how to make the nice art on the cover. Can’t hold that against him, though. I’d consider this a great beginner’s book, and should help to get you started with 3d game modeling.

3D Engine, Graphics, Tutorial, Unreal

Tutorial: How To Make a Textured Spinning Cube Using Unreal Engine 4


Today I will show how to create a textured spinning cube using Unreal Engine 4. Making a cube spin is basically what I consider the “litmus test” of 3D engines. How long it takes you to figure this out will show how convenient or capable the engine is. While I might have skipped this test (by jumping straight into creating Pong) I thought it was worthwhile to go back and try it. Hopefully this tutorial will be helpful to some of you just getting started.


First thing you should do is create a new blank project. I chose to make the project with the starter content (and deleting the furniture) however that won’t be important for this guide. Next look on the left-hand panel, make sure you are in place mode (the icon with the cube), and look under basic and find Cube. Now drag the cube into the scene. It will probably start inside the floor, so just press Q to go into move mode and then drag it up a little.


Since looking at a gray model is not that exciting, lets add some texture. In the Content Browser on the bottom, right-click in the empty area and select “Import to /Game…”. Then find your image file and press Open.


You should see the new texture appear in the browser. Now drag this texture onto the cube model. You’ll see this automatically create a default material for you. With the cube still selected, click “Movable” in the Details panel on the right.


The next step is to create the component Blueprint. You can do this by clicking the green “+Add Component” button on the top of the Details panel. Choose “New Blueprint Script Component”. In the pop-up window, pick Scene Component, click Next, type a name in, then click “Create Blueprint Class”.


In the new Blueprint window, you can delete the “Event Initialize Component” (though you can also leave it alone, won’t matter in this case). Pull off the output execution pin on “Event Tick” (it’s the white arrow looking thing on the upper-right). You should see a menu open. Start typing “rotation” and then pick “Add Relative Rotation”. In the Y field for “Delta Rotation” type in “1” and press Enter. Pull off the “Target” pin and type “parent” then click “Get Attach Parent”. Now you can save and compile the script.


Switch back to the main editor window and press “Play”. That’s it! Hopefully this tutorial was useful to some people (please let me know in the comments). I plan to produce more of these in the future, and they should gradually get more complex as I get more familiar with the engine.

It’s really quite amazing how quick and easy it is to work with Unreal. Using straight C++ and DirectX, one would be lucky to make a textured spinning cube in 2 hours, let alone 2 minutes. It really speaks to the robustness of the engine. Of course, I still have a long way to go in terms of learning the engine, so please follow me on this journey (and pray I don’t give up on this one).

3D Modeling, Art, Gaming, Graphics, Review

Review: How to Become a Video Game Artist: The Insider’s Guide to Landing a Job in the Gaming World by Sam R. Kennedy


So I am actually not looking to try to break into the game industry as an artist. Why did I read this book? Well, I am very much interested at upping my game when it comes to real-time graphics and content creation as a hobby. Computer graphics are just fascinating to me, and the best engine and shaders in the world will not save a shabby piece of art. This book seemed like a good way to get into the artist mindset. To top things off, the sticker-price was a palpable $12 dollars and the cover art looked great (important when taking art direction).

Basically what the book amounts to is a series of chapters, each one describing a particular game art profession. Some of the jobs detailed include: concept, environment, character, ui, and marketing artists. Every chapter includes a job description, explanation of the process or workflow, example images, an artist profile, and finally a mock “help wanted” ad that could be for the position. The format is informative, and I think would be very helpful for a student looking to get into the industry as an artist. Certainly, you don’t have to be a student to find worth in this book and I personally feel it is a great choice if you are at all interested in video game art.

The author, Sam R. Kennedy, is a game artist himself and shares a some of his (quite impressive) work within these pages. Nicely, the photos on the Kindle e-book were in color. This is quite important, and in my research I did stumble upon some game art instruction books from people with questionable artistic ability. Of course, you don’t need to be da Vinci to make a 3d model (especially not when working from good photos or concept art) but I can’t help but wonder what I’m doing taking advice from an amateur. That was not the case with this text. Kennedy is a veteran and has worked at Ubisoft on Tom Clancy games and the like. I felt pretty comfortable accepting his opinions.

All in all, I was happy with the purchase and I’m glad to have the book in my collection. If it helps me (even a little bit) in improving my art that’s a net positive. In any case, it was inspiring and that’s enough for me.

3D Modeling, Graphics, Review

Review: Getting Started in 3D with Maya: Create a Project from Start to Finish – Model, Texture, Rig, Animate, and Render in Maya by Adam Watkins


In what has to be one ridiculously long title for a pretty straight-forward book, Getting Started in 3D with Maya: Create a Project from Start to Finish – Model, Texture, Rig, Animate, and Render in Maya is actually not a bad place to start if you’re trying to get into 3D. Adam Watkins manages to pack all the crucial steps of 3D modeling and animation into 9 concise chapters. I enjoyed the flow of the book, and felt that every important detail was explained. The author teaches just enough to get to the next step, and it’s all done in a logical order and progression. If you are just getting started with 3D, or if you know another package and are new to Maya, I think this is a excellent book to pick up.

Watkins begins by explaining the general workflow and with the Maya philosophy (including a few somewhat comical hardware recommendations even though the book is only a couple years old). He continues with architectural modeling, organic modeling, UV layout, textures and materials, lighting and rendering, rigging and skinning, and finishes up with animation. Clocking in at around 448 pages, the book is not particularly short but I found I was able to get through it quickly. Each chapter was just the right size to read in one sitting, and the text was engaging enough to make me want to come back the following day.

I definitely feel like I learned a thing or two by reading this book, and it has helped me to better understand the Maya workflow. Most 3D packages are huge, monolithic pieces of software, and no single book could cover everything. However, Getting Started in 3D with Maya covers the basic things you need to know in order to get started (so the book is true to it’s name). If I had one complaint, it’s that I thought the art direction could have been better. This book won’t teach you to be a masterful artist but I guess that wasn’t the goal or scope of the text. In any case, I would certainly be interested in reading more from the author as I feel he has a clear and honest style that is easy to learn from. Recommended.

3D Modeling, Graphics, Review

Review: How to Cheat in 3ds Max 2015: Get Spectacular Results Fast by Michael McCarthy


I found this book to be quite interesting, but it’s also very specific to the 3ds Max package. How to Cheat in 3ds Max 2015: Get Spectacular Results Fast by Michael McCarthy has about 15 chapters focusing on various aspects of the 3d modeling process. It probably only took me about a week to read the text, which I don’t mind at all. Not every book has to be a 1000 page tome. I actually find it refreshing to read short books, especially if the author can impart a deal of knowledge in a quick span of time. How to Cheat in 3ds Max 2015 was one of those books.

Included in the 328 page copy are some very essential topics in the creation of art in 3ds Max: customizing the UI, navigating the scene and transforming objects, basic modeling, character modeling, materials, lighting and shadows, reflections, animation, MAXScript, rendering, plug-ins, special effects, and more. Not a bad amount of coverage, though many of the chapters are not extensive.

If you’re using 3ds Max, I think this is a decent addition to your library. It covers some specific things well, and gives you enough information to know what to search for to find out more. I especially liked the chapter on how to make an object fracture and then fall into pieces using physics. It also shows you what tools there are (sometime even 3rd party plug-ins) and does give you a good idea of what’s possible if you’re new to Max. However, if you are using a different 3d package, the book may not be as useful.

What I wish is that there were more general 3d art and modeling books out there. I’ve already read Digital Modeling by William Vaughan and it was amazing, but sort of a one-of-a-kind. Too many of the books out there seem to focus on one particular toolset and don’t try to abstract the concepts into something more widely applicable. Clearly, the basic foundation of modeling and texturing techniques are not all that different with different programs. The buttons or methods may be different, but the thought process is very similar. I can’t knock this book for that, though, it’s just more of a general musing on the subject.

Overall I thought How to Cheat in 3ds Max 2015 was a competent book, and achieves what it set out to do. I feel like it would probably be useful for beginner 3d artists trying to up their game, but maybe as a 2nd or 3rd book. The chapters each have a sort of “cookbook” feel to them, so I think some other books do a better job of building on top of previous chapters in a more cohesive manner. However, I don’t think that was the goal here, so I won’t penalize the author. All in all: not bad.