riemerg

Hi all-

This 3rd series of XNA Tutorials was already online this weekend, I checked once more to make sure all code on the site compiles without errors.

This 3rd series was written to be a introduction to HLSL, starting from zero, and consists of 18 chapters. The first chapter actually shows no code, it only positions HLSL in the big picture. For this series, I've chosen to create a scene shadowed by the Shadow Map algorithm to introduce the various concepts of HLSL.

As you can see in the outline of this series, we start with basic chapters, which increase in difficulty throughout the series:

  • Creating your own vertex format
  • Creating a first vertex shader  and pixel shader, and playing around with the the pixel shader
  • Adding texture coordinates to the vertex format and displaying textures using HLSL 
  • World transformation  in the vertex shader, special attention to the normals
  • Per-pixel lighting 
  • Projective texturing 
  • 2D screen processing 
  • Preshaders 

    Next to those HLSL-specific chapters, the 3rd series also introduces a more 'general' XNA concept: the triangle strip . Also, concepts that were seen in the previous chapters, such as texture mirroring, are expanded upon.

    Next to the series, I have started another section: the ShortTuts. This section will contain some general usefulness. Currently online:

  • Checking for shader v2.0 support and switching to Reference mode accordingly 
  • Displaying a MessageBox in XNA 

    Since the 3 series have been completely ported to XNA, I have created a new layout for my site, and XNA finally is the primary contents of my site. Also, the forum is pretty healthy, with around 20 posts per day. These are of course mostly about beginners problems, but I pass the difficult problems on to this forum ;)

    As always, comments are welcome.

     




  • Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    cairnswm

    Thanks for these Tuts. I have found them very useful in getting to learn more about XNA.

    I think it would be nice if we could have some of the ideas actually implemented into classes that we can incorporate into out games.

    I'd also liek to see the terrain being textured as its somehting I've been battling with.






    Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    Fluxtah

    creating your own vertex format was a nice one, thanks for that :)





    Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    Ely

    Thanks Riemer!

    I have done the terrain tutorial in the past and look forward the the next two. The terrain was especially easy to follow and I learned a lot. Keep up the good work.






    Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    riemerg

    Sorry about the delay, it's been quite busy at work lately ;) Anyway; thanks for the replies!

    @cairnswm: splitting the project up into a few classes would only be a logic thing to do. But, I keep as primary rule of my tuts to keep all code in 1 file (ok, 2 in the case of a HLSL tut). First, It's pretty time-consuming to open a tutorial project, and you have to find all classes in the separate files. Two, and most important: you have to know what classes are! And I would like to keep my tuts understandable for the broadest possible audience.

    Textured terrain, as I show in this thread It contains a preliminary screenshot of Series4, I coded it in the last week before the release of XNA final, so it is XNA final-compatible. I could already chop it up into chapters, but I want to add a few more things first.

    @fluxtah: I remember I kept on expanding the explanation of the vertex format, as it actually is the glue between the XNA and HLSL code. If you feel something should be added, let me know!!

    @Ely: Hope you had some fun, I'll try to find some time to finish that 4th series ;)






    Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    Grotius

    Riemer, I've also found your tutorials very helpful. But I'm having trouble applying them to a similar program for the XBox 360. In particular, I can't get the "ship" to point its nose down or up correctly. The nose sorta oscillates between up and down constantly. If I substitute different trig functions, I can get it to go down or up in a somewhat more decisive but still incorrect fashion. Also, I can't solve the 'flying backwards' problem.

    You mention that quaternions would be a better way to go. Can you point to some sample code that implements this suggestion





    Re: XNA Game Studio Express 3rd Series of 3D XNA Tutorials finished: HLSL intro

    riemerg

    Hi there grotius,

    I don't know of any first person camera code based on quaternions, but that's probably because I haven't looked for it yet. If you want something to read, you can try this nice text on quaternions. Also, there is a nice thread on this forum with lots of info.

    Anyway, if you manage to get your code working at some point, feel free to mail it to me at riemer.grootjans(at)gmail.com, so I can add it to the second series ;)

    Have fun