Difference between revisions of "Basic Pipeline Tutorial"
m |
m (mispelled platform) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
== Overview == | == Overview == | ||
− | In this tutorial, I will try to show you how the Horde3D pipeline system works. At the first look, when you haven't really | + | In this tutorial, I will try to show you how the Horde3D pipeline system works. At the first look, when you haven't really worked with an advanced pipeline system before, it may look a little bit complicated, but I will show how user friendly it is and how this powerful tool is useful. |
'''Requirements:'''<BR/> | '''Requirements:'''<BR/> | ||
− | - The Horde3D SDK | + | - The Horde3D SDK 1.0.0 Beta2 |
== Creating the pipeline == | == Creating the pipeline == | ||
− | First of all, I will show you how to create a really basic pipeline with only one context. For this, we will use the chicago example in the Horde3D SDK to see how the pipeline and his context can affect a scene. If you use Visual Studio, open the "Horde3D.sln" file to get into the chicago sample, | + | First of all, I will show you how to create a really basic pipeline with only one context. For this, we will use the chicago example in the Horde3D SDK to see how the pipeline and his context can affect a scene. If you use Visual Studio, open the "Horde3D.sln" file to get into the chicago sample, otherwhise use your configuration to open the chicago example or edit each files in your favorite editor. In the "app.cpp" file, we will change the foward pipeline resource to take our custom pipeline instead of the forward pipeline, so in the Application::init() function change this line: |
{{CppSourceCode| | {{CppSourceCode| | ||
Line 66: | Line 66: | ||
</source>}} | </source>}} | ||
− | This tag means that its child tags | + | This tag means that its child tags are going to be related to pipeline tags. |
<BR/> | <BR/> | ||
Line 79: | Line 79: | ||
− | This tag means that its child tags | + | This tag means that its child tags are going to be related to direct rendering tags. |
<BR/> | <BR/> | ||
Line 91: | Line 91: | ||
</source>}} | </source>}} | ||
− | The stage is here to include a series of actions, and you can have multiple stages if you want, even if in this | + | The stage is here to include a series of actions, and you can have multiple stages if you want, even if in this example we have only one. It is useful since you can disable or enable a stage within an Horde3D function, and you can link it a material within the optional "link" attribute. If you want, you can look at the "globalSettings.material.xml" file to see what it contains, and if everyting is normal, you should see that a cube map is binded to the texture unit 7, this gonna be the ambient texture that will determine the ambient color of the scene. Finally, for each stages, don't forget to add an id, and in this example the id gonna be "FirstStage". |
<BR/> | <BR/> | ||
Line 131: | Line 131: | ||
Now you have to compile the chicago example. Go in the "build" folder, and copy the new executable in the "win32" folder of the SDK. If you execute this example you should see nothing. If you look at the engine log and there is no error, it means that everyhing have been rightly done. If you see a black screen, it's because there is no "AMBIENTCOLOR" in each shader linked to each geometry. You have to add this context to each used shaders. | Now you have to compile the chicago example. Go in the "build" folder, and copy the new executable in the "win32" folder of the SDK. If you execute this example you should see nothing. If you look at the engine log and there is no error, it means that everyhing have been rightly done. If you see a black screen, it's because there is no "AMBIENTCOLOR" in each shader linked to each geometry. You have to add this context to each used shaders. | ||
− | In the chicago sample, three shaders are used : one for the animated model one for the sky and one for the | + | In the chicago sample, three shaders are used : one for the animated model one for the sky and one for the platform. Open the "skinning.shader.xml" file since it's the shader used for the animated man. Next, you have to add this within the "shader" tag: |
{{CppSourceCode| | {{CppSourceCode| | ||
description= Shader| | description= Shader| |
Latest revision as of 23:01, 5 October 2010
|
|