• Advertisement
Sign in to follow this  

Should new D3D tutorials include tutorials on FFP, or drop it?

This topic is 4379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Not exactly a DirectX development question, but thought it's be the best place for some feedback. A new set of tutorials are in the works for TripleBuffer, and we've been thinking of not going through the fixed function pipeline at all. We havent decided yet, but considering that DX10 is right around the corner, in which there is no FFP, do you guys think it'd be a good idea to completely drop FFP? I've added a poll on the front page of the site to keep track of votes, so voting and opinions would be highly appreciated. - Thanks.

Share this post


Link to post
Share on other sites
Advertisement
DROP THE FIXED FUNCTION PIPELINE [grin]

That's my vote anyway... FFP is definitely legacy now. You'll be doing yourself and everyone else a favour by being more forward looking. The general advice I've been giving for a few months now is to start with HLSL and the FX framework - it's worth the initial hurdle.

BUT, there is a valid case for still having the FFP around - but it all depends on the target platform. If you're aiming at absolute baseline PC's and most laptops then shaders are out (although, software vertex shading is okay). For any sort of gaming or modern rig (say, 0-2 yrs old?) you'd be fairly safe with a shader-driven architecture.

hth
Jack

Share this post


Link to post
Share on other sites
My personal opinion and in the best interest of the community that wants to learn would be to start developing tutorials that will teach logical development. With this I mean by using shaders you will clearly show what is happening in the pipeline and it might integrate theory with application alot better than the FFP has done in the past. Problems like beginners and even alot of intermediate graphic developers not understanding blending and other topics, by incorporating shaders into the earlier tutorials will give them a good base to work from and be eternally thankful.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Armadon
My personal opinion and in the best interest of the community that wants to learn would be to start developing tutorials that will teach logical development. With this I mean by using shaders you will clearly show what is happening in the pipeline and it might integrate theory with application alot better than the FFP has done in the past. Problems like beginners and even alot of intermediate graphic developers not understanding blending and other topics, by incorporating shaders into the earlier tutorials will give them a good base to work from and be eternally thankful.

I hope this helps.
Take care.


Don't forget about being able to generally rub shoulders a lot more with linear algebra concepts... ;)

Share this post


Link to post
Share on other sites
Shaders will force you to learn how things really work, which is good. It also opens up more options, and those options will be more apparent to the person learning. Also, I think more people will understand the flow of a pixel shader than TextureStageStates, even though they're the same thing. All around, shaders are better. Anyone learning now isn't going to release a game for several years, at which point there will be no FFP, or if there is, it will be completely different.

You can include FFP if you want, but it's now more of an advanced topic. Hobby games don't need to worry about it, only professionals targetting older hardware or onboard Intel chipsets and the like.

Share this post


Link to post
Share on other sites
At least, if you want to mention FFP, do so with effect framework. AFAIK everything that is FFP can be set in an effect file. states, light, mats, FVF. SDK docs describe all effect FFP settings very detailed.

Yes, I am the darkelf2k5 from devmaster ;)

Edit: Ok, FVF maybe not. A least don't know how.

Share this post


Link to post
Share on other sites
I'm wondering, does no one else have a problem with the Framework? This sets the entry level up quite high for beginners? Personally I leant from the small tutorials such as how to set up a vertex buffer, how to render a mesh etc. If they weren't in the sdk (not sure if they are even in the latest sdk's). I seriously doubt I would have got anywhere with graphics programming. How is a beginner supposed to use the framework, its enough just to get a basic window up?
@Jolly Jeffers, you say the framework is worth the extra effort but I'm not sure a beginner could cope with it at all?

I would agree to drop the FFP though, that seems the way forward, but please could some non framework begginner tuts be included?

I just feel every body (including microsoft) are forgetting beginners.

(About FFP again, there are current resources out there for it already so maybe its not so bad to drop it).

Share this post


Link to post
Share on other sites
Quote:
Original post by Stevieboy
@Jolly Jeffers, you say the framework is worth the extra effort but I'm not sure a beginner could cope with it at all?
Yes, I will concede that by "jumping in at the deep end" you do risk making it more painful for beginners. However, Direct3D is not a simple API - and I'd raise the issue that if you learn a whole lot of FFP/simple stuff you're going to still hit an "upper limit" of what you can do without moving into the PP. Jumping to the PP from the FFP still requrires substantial re-learning.

Another aspect of it is that, maybe, Direct3D isn't so suited to the absolute graphics beginner - something higher level (such as one of the various open source engines or frameworks) is more suitable.

Quote:
Original post by Stevieboy
Personally I leant from the small tutorials such as how to set up a vertex buffer, how to render a mesh etc. If they weren't in the sdk (not sure if they are even in the latest sdk's).

The tutorials are still in there, in fact there's been a 6th one added at some point - at one point there was only 5. For Direct3D 10 there are 14 tutorials - covering the full length of the pipeline.

Original post by Stevieboy
I just feel every body (including microsoft) are forgetting beginners.

In relation to my previous comment - I don't think MS are forgetting the beginners as such. BUT it is worth remembering that the SDK (+DX in general) is a professional level component - so some degree of knowledge is a prerequisite [wink]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Something that I always have found amusing is that MS produces a managed D3D layer for people who seemingly can't match every new with a corresponding delete, but must be able to understand the intricacies of a programmable 3D GPU.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Something that I always have found amusing is that MS produces a managed D3D layer for people who seemingly can't match every new with a corresponding delete, but must be able to understand the intricacies of a programmable 3D GPU.
Thats a little controversial [wink]

Strictly my own viewpoint, but MDX has great potential for a prototyping system - where you can trial the actual "meat" of an idea without getting bogged down in the finer implementation details before getting anywhere. Secondly, it's an excellent choice for tool/utility writing. I've been told that a number of big publishers make use of MDX specifically for this role.

Jack

Share this post


Link to post
Share on other sites
My vote is for dropping the fixed function pipeline and go all out with the programmable pipeline. I agree that this will bump up the difficulty level in learning Direct3D for the beginner. But the payoff more that out weighs the inital learning hurdle IMHO.

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
Quote:
Original post by Anonymous Poster
Something that I always have found amusing is that MS produces a managed D3D layer for people who seemingly can't match every new with a corresponding delete, but must be able to understand the intricacies of a programmable 3D GPU.
Thats a little controversial [wink]

Strictly my own viewpoint, but MDX has great potential for a prototyping system - where you can trial the actual "meat" of an idea without getting bogged down in the finer implementation details before getting anywhere. Secondly, it's an excellent choice for tool/utility writing. I've been told that a number of big publishers make use of MDX specifically for this role.

Jack


As well, you can use MDX for creating game tools. It's much easier, and faster, to develop something in VB.NET and C# than it is in C++. Well, it is for me, anyway.

Share this post


Link to post
Share on other sites
I guess PP it is then.

Quote:
I'm wondering, does no one else have a problem with the Framework? This sets the entry level up quite high for beginners? Personally I leant from the small tutorials such as how to set up a vertex buffer, how to render a mesh etc. If they weren't in the sdk (not sure if they are even in the latest sdk's). I seriously doubt I would have got anywhere with graphics programming. How is a beginner supposed to use the framework, its enough just to get a basic window up?
@Jolly Jeffers, you say the framework is worth the extra effort but I'm not sure a beginner could cope with it at all?

I would agree to drop the FFP though, that seems the way forward, but please could some non framework begginner tuts be included?


I think you and jollyjeffers are talking about two different frameworks. jj is talking about intrudcing the effects framework at the start. I think you were talking about the tutorial framework that will be developed alongside the tutorials? Anyway, if you're worried about the framework that the tutorial series will build alongside the tutorials, then you shouldnt be. Because the framework section of the tutorials will be completely detatchable from the tutorial.

The tutorials will basically be arranged as follows.


Tut1 - init d3d
* initilization of d3d

Tut2 - enumeration
* Wrap up of tut1
* enumeration tutorial

Tut3 - triangle
* Wrap up of tut2
* triangle tutorial

etc...


So as you can see, the "wrap up" part of how the previous tutorial was incorporated into the framework will be completely independant. Plus if there's no base code we work the tutorials off of then we'll get too much code repetition within as tutorials increase. If you wanted to you can comletely ignore the "wrap up" section and still be able to learn the main tutorial topic.

Share this post


Link to post
Share on other sites
My (bleated) 2 cents. I think Fixed Function is easier for newbies to get their heads around, and for many it will do all they need. Hell, D3DXSprite handles the needs of a lot of them, shaders would make their heads explode. [grin]

Having said that, there are a lot of FFP tutorials out there already, so I'd question whether there is a compelling need for more. People who aren't ready for shaders can use the other resources, people ready for shaders can tackle those.

Or taking the marketing viewpoint, what customer base do you want to serve? If you figure that one out, the rest just falls into place. [smile]

Share this post


Link to post
Share on other sites
I'll have to agree with DrunkenHyena. There are already a ton of FFP tuts out there, and it's going to be going away in DX10 anyway, so everything that could be written on the subject has already been written.

I still think that the FFP is better for beginners, though, as there isn't quite as much math involved. I know that when I was first starting to learn DirectX, I really didn't have much of a handle on matrix and vector math, and I certainly wouldn't have been able to understand having to do all the transforms and lighting and stuff myself. The FFP is nice because it's sort of a black box, where you can input some meshes and visual settings, and it all happens without too much trouble. I think it should be used just as a teaching tool, though, and once they get the fundamentals of the API (creating meshes [or VBs/IBs], setting states, computing transforms), then move on to the PP.

Quote:
Something that I always have found amusing is that MS produces a managed D3D layer for people who seemingly can't match every new with a corresponding delete, but must be able to understand the intricacies of a programmable 3D GPU.


You go ahead and use your old-fashioned non-garbage-collected language; I like not having memory leaks for forgetting to delete a string or something stupid like that, thank you ;) That, and when you're working with languages that support exceptions (including C++), checking for error codes is boring and frustrating. And slow.

Share this post


Link to post
Share on other sites
+1 for dropping FFP

Now, on to the more important question...
Quote:
Original post by Stevieboy
I just feel every body (including microsoft) are forgetting beginners.



We do feel your pain, Steveieboy. Like any other part of Microsoft, we're resource-constrained, which is a fancy of saying we can't do everything for everybody. We are trying to reach out to beginners, but given the demands of releasing an SDK every two months with more and more new information, we don't always have the time to add new beginner-level material to the SDK.

I've taken the time, however, to add a list of community-contributed tutorials to our community pages on the DirectX Developer Center (http://msdn.microsoft.com/directx/community/). It is by no means complete, and I welcome any PMs pointing me to DirectX tutorial sites (all I generally ask is that the site be under a reasonable level of currency -- I'm not going to link to DirectX 8 tutorials :-).



Share this post


Link to post
Share on other sites
y'know, I've been thinking... I disagree that the FFP might be easier to learn.

So lets say we're talking about VShader transforms...

Currently you might describe it as creating three D3DXMATRIX structs using D3DXMatrixPerspectiveFovLH(), D3DXMatrixLookAtLH() and various combinations of D3DXMatrixRotation?() functions. That alone is trivial - you don't strictly speaking need to know whats inside that D3DXMATRIX object, just know what its needed for.

Then you could go on to how you configure it:
pd3dDevice->SetTransform( D3DTS_WORLD, &mWorld );
pd3dDevice->SetTransform( D3DTS_VIEW, &mView );
pd3dDevice->SetTransform( D3DTS_PROJ, &mProj );


Or, you could just describe it as:

pEffect->SetMatrix( "g_mWorld", &mWorld );
pEffect->SetMatrix( "g_mView", &mView );
pEffect->SetMatrix( "g_mProj", &mProj );


Where it gets at all tricky is in the actual vertex shader, but even that can be explained fairly simply without having to have an intimate knowledge of what is happening under the covers:

float4 p = float4( vertex.position, 1.0f );
float4 o = mul( p, g_mWorld );
o = mul( o, g_mView );
o = mul( o, g_mProj );


Sure, most people concat the matrices on the CPU (or possibly leave it to preshaders) but from a tutorial point of view clarity is more important than performance...

Lighting is more involved with the PP, but that can be really easily built up over a number of steps. In fact, I'd say it allows the tutorial writer much more scope for explaining what lighting is and how it might actually make a difference.

As for textures and their blending modes... I don't think you'll ever convince me that the FF texture cascade is easier the pixel shaders [lol] It took me years to get my head around that - and even now I have to double check all the constants/combinations against the documentation...

Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
As for textures and their blending modes... I don't think you'll ever convince me that the FF texture cascade is easier the pixel shaders [lol] It took me years to get my head around that - and even now I have to double check all the constants/combinations against the documentation...


If you're talking about more advanced use, then yes shaders can be clearer because you can explicitly program what you intend rather than figuring out a bizarre combination of flags which happen produce what you want. But at the level of intro tutorials I think by using the FFP you can ignore a lot of the details until you feel more comfortable with the concepts.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrunkenHyena
Quote:
Original post by jollyjeffers
As for textures and their blending modes... I don't think you'll ever convince me that the FF texture cascade is easier the pixel shaders [lol] It took me years to get my head around that - and even now I have to double check all the constants/combinations against the documentation...


If you're talking about more advanced use, then yes shaders can be clearer because you can explicitly program what you intend rather than figuring out a bizarre combination of flags which happen produce what you want. But at the level of intro tutorials I think by using the FFP you can ignore a lot of the details until you feel more comfortable with the concepts.

Yeah, fair point I suppose [smile]

I guess I'm just used to so many people going straight from that spinning cube to wanting to having normal+gloss mapped texturing effects...

Jack

Share this post


Link to post
Share on other sites
Maybe we could set up an experiment...

Go grab 20 n00bs, divide them into two groups, one gets to learn D3D from the traditional FF route and the other starts with shaders and the PP. Give them a month and find out, on average, which group are doing better [lol]

Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
I guess I'm just used to so many people going straight from that spinning cube to wanting to having normal+gloss mapped texturing effects...

Plenty of people decide they want to write an MMORPG shortly after mastering "Hello World", doesn't mean they're ready for it. [smile]

Quote:
Original post by jollyjeffers
Maybe we could set up an experiment...

Go grab 20 n00bs, divide them into two groups, one gets to learn D3D from the traditional FF route and the other starts with shaders and the PP. Give them a month and find out, on average, which group are doing better

Okay, but if their heads explode, you're on brain detail. [grin]

Share this post


Link to post
Share on other sites
I did actually find that learning the pp somewhat easier than the fixed function stuff. Know what was going on at each point helped me understand what was happeing to my models, what transforma they were goin through and how the texturing was been appllied. I came from a c++ background but with no directx or 3d knowledge. I spent some time reading and trying tutorials on the FF pipeline, but i wish i had ignored that and moved straight to PP because it made more sense!

Share this post


Link to post
Share on other sites

Yeah, the Framework I meant was the Sample Framework. IFoobar I'm guessing your framework wouldn't be quite as involved as that? I realise some level of complexity has to come in somewhere though, but your framework idea sounds good though and the idea of building one tutorial on top of the other and also being able to "unwrap" it sounds good as well.

JJ, yeah it is worth mentioning / remembering sometimes that dx is a proffessional level platform and maybe we shouldn't expect, (especially learners), to get too much done too quickly.

dgweller thanks, We know you guys do what you can, it is appreciated. Thanks again.

Share this post


Link to post
Share on other sites
If Shaders are slightly more tricky then maybe that will mean that the average programming skill of a D3D programmer will go up? That would be nice!

Are these tuts going to be D3D10 then - hardly relevant to most of us since we'd have to wait months and then spend $100's just to have a suitable PC (assuming our current PC is pretty good already), and our apps would only run on a tiny proportion of other PCs!

Share this post


Link to post
Share on other sites
The only thing I'm slightly annoyed with with the whole future drop of the FFP is the time it's going to take every project to basicly program the shaders myself for all the basic stuff I used to use to counter OpenGL developers who would constantly say how much easier GL is to work with than DX. Obviously everyone will be saving their shaders for their basic stuff for future projects, but DirectX becomes less "Easy" in the sense, you have to write a lot more stuff just to get the simple stuff done (relatively speaking)

Compiling and using shaders for everything feels a bit akward for me, but I guess it's just one of those things you get used to.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement