DX11 DirectX 11 , Where to start?

Recommended Posts

Hi i'm new to this forum and was wondering if there are any good places to start learning directX 11. I bought Frank D Luna's book but it's really outdated and the projects won't even compile. I was excited to start learning from this book because it gives detailed explanations on the functions being used as well as the mathematics. Are there any tutorials / courses /books that are up to date which goes over the 3D math and functions in a detailed manner? Or where does anyone here learn directX 11? I've followed some tutorials from this website http://www.directxtutorial.com/LessonList.aspx?listid=11 which did a nice job but it doesn't explain what's happening with the math so I feel like I'm not actually learning, and it only goes up until color blending. Rasteriks tutorials doesn't go over the functions much at all or the math involved either. I'd really appreciate it if anyone can point me in the right direction, I feel really lost. Thank you

Share this post


Link to post
Share on other sites

Luna's examples won't compile anymore?  I guess it has been a few years since I tried.  One of the knocks on his examples is that they all use the Effects Framework, which has been deprecated, and maybe doesn't exist in the latest DirectX SDK?

Another good one is Practical Rendering and Computation with Direct3D11, which was co-written by one of the moderators here, MJP

Share this post


Link to post
Share on other sites

The examples in frank's book (along with many others) are indeed out of date so wont compile / work fully, there is a potential workaround as listed on Frank's site at (http://www.d3dcoder.net/Data/Book4/d3d11Win10.htm)

This can allow you to work through the code you need with some minor changes. Though as said it is a workaround so isnt using DX11 in the most "up to date" of ways.

You can however look at how things are done previously and compare that to how they are done now, many functions etc still have similar names / ways of doing things with just a little bit of moving around and playing with old code to update it.. can also just be fun in itself ;o

Share this post


Link to post
Share on other sites

Thank you everyone for your responses, I like your ideas. I was researching for hours on how to get his projects to work but nothing seemed to work, not even the fix he posted. There is always one error or another coming at me, and I spent many many hours trying to get his projects working so I just decided to drop it already. @kikr4000 What is your method of following both the book and rastertek's tutorials? I had posted that I didn't enjoy his tutorials because the explanations are very vague so it's difficult to know what you're actually doing. Do you follow through his tutorials and check frank's book for more details on the particular subject you're studying or something? The thing I like about Frank's book is that he explains the math and the functions in-detail, so I feel that I'm actually learning something as opposed to reading from many other sources.

 

 

Edited by Fluffy10

Share this post


Link to post
Share on other sites

Hi,

I read most of the book first. And as you also discovered it requires some work to get the books examples running. 
As I recall it I got  some examples running using the June2010 SDK which you have to compile. Do not ask me details because I do not remember just found a short node I made:

  • After Install of directX June 2010 the following must be compiled.
  • C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11
  • Chose either x64 or x86 and make both a debug and release version
  • Error concerning  "d3dx11effect.h" Common expects d3dx11Effect.h
  • In d3dUtil.h replace
  • "#include <d3dx11.h>"
  • with
  • "#include <d3d11.h>
  • #include <dxgi.h>
  • #include <d3dx11.h>"

The next problem is then what version of windows you are using I remember it also caused me some major headaches.

So the book was mostly used for setting up DirectX (I basically used chapter 4-page 103 and forward as a recipe and wrote my own code based on that chapter) and get it working and understanding the flow of the directX commands in order to get going. Also it has been used for understanding some of the rendering techniques used for shadows and so on.
But none of the examples is compile and go.
Rastertek examples is perhaps not elegant code and you are right introduction of subjects and end target for tutorials could be better, but my experience has been that it is fairly simple to get going and then it is a matter of change code parts and experience how stuff works or not works after changes.
The main problem with Franks book is the Effect Framework but that relate to the hlsl code. This is then where rastertek examples came in handy. What rastertek does are in most cases found and described in Franks Book.
So for me it was a matter of cutting code pieces from the book to setup directX and using rastertek examples to get things going with HLSL.
A third option I forgot to mention in my first post : https://www.braynzarsoft.net/viewtutorial/q16390-braynzar-soft-directx-11-tutorials

Not a tutorial I have looked much at for getting going but have however used it later where the chapter concerning instancing came in handy.
Doing DirectX 11 requires work to get going I have not seen any one source that gives you all the answers.
 

/Kim

 

Share this post


Link to post
Share on other sites

"Quick and Dirty" Introductions:

Fundamentals:

Refinements:

  • HLSL Development Cookbook (On the one hand, this book contains lots of small and large errata. On the other hand, this book still gives valuable insights. So in order to find the gems and get the most out of it, you already need some understanding of rendering techniques and have a critical mindset.)

Share this post


Link to post
Share on other sites
1 hour ago, matt77hias said:

HLSL Development Cookbook (On the one hand, this book contains lots of small and large errata. On the other hand, this book still gives valuable insights. So in order to find the gems and get the most out of it, you already need some understanding of rendering techniques and have a critical mindset.)

Be very careful with this one.  The technical content is pretty decent, but oh flying spaghetti monster, it looks like it wasn't even put through the Microsoft Word grammar checker, let alone put in the the same room as a proofreader, which makes it much more difficult to understand than it ought to be.

Share this post


Link to post
Share on other sites
14 minutes ago, ericrrichards22 said:

Be very careful with this one.  The technical content is pretty decent, but oh flying spaghetti monster, it looks like it wasn't even put through the Microsoft Word grammar checker, let alone put in the the same room as a proofreader, which makes it much more difficult to understand than it ought to be.

I am really angry with the so-called reviewers (and proof readers) (ps.: there is no Howest University in Belgium; it is a university college) of this book. A complete page is dedicated to them while the book contains so many grammar and word errors (which are copy-pasted around), one immediately notices during the first read. I didn't really blame the author till the point I started noticing the code errors as well (wrong projection matrices, non-existing DXGI_FORMATs, etc.).

Furthermore, the author doesn't really explain his intentions. For example, he suddenly generates his light volumes explicitly via the tesselation pipeline (as an alternative for stencil testing) while explaining how deferred shading differs from forward shading. This is just an optimization, which one can use in combination with deferred shading, but has fundamentally nothing to do with deferred shading. One wouldn't use that in practice anyway since it involves a separate pass for each light. As a reader, you basically need to figure that out yourself and you need to realize that his code isn't the blueprint of beautiful (a pixel shader for four lights at the same time? no need to give the code, just mention the idea) and efficient code.

Edited by matt77hias

Share this post


Link to post
Share on other sites

Truth be told, there aren't that many DX11 books out there that I am aware of.  There were seemingly a lot more books written in the DX7, 8 & 9 eras - I've easily got a half-dozen on my shelf right now.  There's a Direct3D Succinctly free ebook from SyncFusion, which would probably be good for a quick-and-dirty let's-get-things-going overview; I haven't read that one specifically, but that whole series is usually pretty well-done but very concise.

My suspicion is that the rise of Unity and Unreal Engine as free tools have shifted most peoples' focus further up the stack.  Where there used to be a ton of books titled "Program an XYZ game in DirectX", now there are tons of "Program an XYZ game in Unity/Unreal Engine" books.

 

Share this post


Link to post
Share on other sites
33 minutes ago, ericrrichards22 said:

Truth be told, there aren't that many DX11 books out there that I am aware of.  There were seemingly a lot more books written in the DX7, 8 & 9 eras - I've easily got a half-dozen on my shelf right now.  There's a Direct3D Succinctly free ebook from SyncFusion, which would probably be good for a quick-and-dirty let's-get-things-going overview; I haven't read that one specifically, but that whole series is usually pretty well-done but very concise.

My suspicion is that the rise of Unity and Unreal Engine as free tools have shifted most peoples' focus further up the stack.  Where there used to be a ton of books titled "Program an XYZ game in DirectX", now there are tons of "Program an XYZ game in Unity/Unreal Engine" books.

Thanks for the info.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Forum Statistics

    • Total Topics
      628706
    • Total Posts
      2984309
  • Similar Content

    • By NexusDivision
      Hello people of gamedev.net

      Me and my team have been working on a MMORPG game with Unreal Engine 4 for quite some time now.
      We are seeking beta tester's and have beta key's available to people who sign up on our website.
      Please visit the website https://nexusdivision.com
      Feel free to register on our forums, We can talk about the game and help everyone get a better idea of what type of game it is. 

      Legion is a 3D fantasy MMORPG that has features including massive scale battles, unique characters and monsters, customization of avatars, special equipment and more. Players choose between the starter stats of Warrior, Magician, Archer and character advancement occurs through a mix of questing, PvP, Guild Wars, and hunting, depending upon player preference. In Legion, completely open PvP battles take place between members of the two warring factions.

      We plan to make this game very competitive and exciting 
    • By Matuda
      Hello!
      Trying to create a physics puzzle game in my "free" time.
      So far it's going very steady, but slow.
      Hope to get some feedback from you!



      Area 86 is a physics-based game, that lets you control a robot at a secret place in space.
      From simple item moving to custom imagined solutions with item picking, throwing, combining and activating!
      Explore & examine all possibilities each place has to offer and do your best to get further.
      But remember, each action has consequences and thus could break or make something unexpected.


      Quick overlook of main features:
      Physics-based gameplay with no bugs or whatsoever Tasks that give you more clue on how to do things wrong Controllable robot who can be blamed for all consequences Includes more than 1 level and each level contains less than 12 possible tasks to complete [ not in free version ] Secret places and hidden objects for extra challenge  
      What can you find in the free downloadable version:
      One fully completable level with 6 tasks and 2 hidden special items to discover.
      From the task list, 2 are main tasks which you should complete to get further and then there are 4 other tasks that should challenge your thinking.
      One of the secret items is visible instant, but you need to figure out how to collect it, while the other special item is hiding.
      Another extra feature is visual hints, that should force your thinking of discovering features.

      Download playable version for your system:

          



    • By GreenGodDiary
      Having some issues with a geometry shader in a very basic DX app.
      We have an assignment where we are supposed to render a rotating textured quad, and in the geometry shader duplicate this quad and offset it by its normal. Very basic stuff essentially.
      My issue is that the duplicated quad, when rendered in front of the original quad, seems to fail the Z test and thus the original quad is rendered on top of it.
      Whats even weirder is that this only happens for one of the triangles in the duplicated quad, against one of the original quads triangles.

      Here's a video to show you what happens: Video (ignore the stretched textures)

      Here's my GS: (VS is simple passthrough shader and PS is just as basic)
      struct VS_OUT { float4 Pos : SV_POSITION; float2 UV : TEXCOORD; }; struct VS_IN { float4 Pos : POSITION; float2 UV : TEXCOORD; }; cbuffer cbPerObject : register(b0) { float4x4 WVP; }; [maxvertexcount(6)] void main( triangle VS_IN input[3], inout TriangleStream< VS_OUT > output ) { //Calculate normal float4 faceEdgeA = input[1].Pos - input[0].Pos; float4 faceEdgeB = input[2].Pos - input[0].Pos; float3 faceNormal = normalize(cross(faceEdgeA.xyz, faceEdgeB.xyz)); //Input triangle, transformed for (uint i = 0; i < 3; i++) { VS_OUT element; VS_IN vert = input[i]; element.Pos = mul(vert.Pos, WVP); element.UV = vert.UV; output.Append(element); } output.RestartStrip(); for (uint j = 0; j < 3; j++) { VS_OUT element; VS_IN vert = input[j]; element.Pos = mul(vert.Pos + float4(faceNormal, 0.0f), WVP); element.Pos.xyz; element.UV = vert.UV; output.Append(element); } }  
      I havent used geometry shaders much so im not 100% on what happens behind the scenes.
      Any tips appreciated! 
    • By Mert Oguz
      well, i have started developing games last year, alone , I made a singleplayer 3d openworld rpg on unity you can look at it on googleplaystore ( kooru stone rpg ) whatever, this year, i wanted to make mmo, which gone really fine until I first try real hosting, I was working on "wamp" until then. The reason i am desperate now is that the way my game works.
      On my pc, using wamp mysql , with localhost as host for my game, i was testing my mmorpg with using andorid emulators, ofcourse no lag no issues no restrictions, beautiful dream... But then, I wanted to get real host from web, so, I rent a basic, cheaphest ever web host ( 10$ year ), and transferred my php files along with sql database. 
      So, I launched the game, still no issues, tried to handle 2-3 players by using my pc, phone, friend's phone...  
      After a while, ( after really short time (3-4mins)) host started not to respond, beacause those web hosting were not fit to handle mmos, i predicted that.
      now what i am explaining is that my game works like this and asking what way should i use to handle it :
      - Creates web request ( like : webhost.com/game/getplayerdata.php?ID=2 )
      -Reads request ( request result be like = "ID2-GoodGuyXx-23-123-4-123-43 )
      -Builds player using result string
      -does similar requests REEAALY FREQUENTLY  ( total requests of 8 - 12 times per seconds )
      With my current ultimate cheap web hosting, i can handle 2 players with low lag ( lol ) but, i want to handle around 20-100 players,
      just need a clear path, i have been struggling with google cloud sql and other vps server dedicated server options, i dont wanna pay much and get ripped off.
    • By mister345
      Hi, I'm building a game engine using DirectX11 in c++.
      I need a basic physics engine to handle collisions and motion, and no time to write my own.
      What is the easiest solution for this? Bullet and PhysX both seem too complicated and would still require writing my own wrapper classes, it seems. 
      I found this thing called PAL - physics abstraction layer that can support bullet, physx, etc, but it's so old and no info on how to download or install it.
      The simpler the better. Please let me know, thanks!
  • Popular Now