Direct3D examples description |
Common subdirectory contains translated Sample DirectX Framework - used by all
Direct3D examples. Includes: D3DApp, D3DFile, D3DFont, D3DRes, D3DUtil, DXUtil files.
So currently only Direct3D related files.
|
Tutorials folder -
contains 6 "step by step" DirectX tutorials.
These are great tutorials to start learning Direct3D. From init D3D device renderer to loading meshes.
These tutorials use VCL forms to contain Direct3D output (so actually most code in first tutorial belong to
VCL form management).
[BorisV]
|
|
The Billboard sample illustrates the billboarding technique. Rather than
rendering complex 3D models (such as a high-polygon tree model),
billboarding renders a 2D image of the model and rotates it to always face
the eyepoint. This technique is commonly used to render trees, clouds,
smoke, explosions, and more.
[BorisV]
|
Bumpmapping folder contains six demos.
These demos demostrate various techniques of applying bump-mapping on objects: EMBP, emboss, Dot3.
The BumpEarth sample demonstrates the bump mapping capabilities of Direct3D.
Bumpmapping is a texture blending technique used to render the appearance of
rough, bumpy surfaces. This sample renders a rotating, bumpmapped planet Earth.
The BumpLens sample demonstrates a lens effect that can be acheived using
bumpmapping. Bumpmapping is a texture blending technique used to render the
appearance of rough, bumpy surfaces, but can also be used for other effects
as shown here.
The BumpUnderwater sample demonstrates an underwater effect that can be
acheived using bumpmapping. Bumpmapping is a texture blending technique used
to render the appearance of rough, bumpy surfaces, but can also be used for
other effects as shown here.
The BumpWaves sample demonstrates the bump mapping capabilities of
Direct3D. Bump mapping is a texture blending technique used to render the
appearance of rough, bumpy surfaces. This sample renders a waterfront scene
with only 4 triangles. The waves in the scene are completely fabricated with
a bumpmap.
The DotProduct3 sample demonstrates an alternative approach to Direct3D
bumpmapping. This technique is named after the mathematical operation which
combines a light vector with a surface normal. The normals for a surface are
traditional (x,y,z) vectors stored in RGBA format in a texture map (called a
normal map, for this technique).
The Emboss sample demonstrates an alternative approach to Microsoft Direct3D®
bump mapping. Embossing is done by subtracting the height map from itself and having
texture coordinates that are slightly changed.
|
The ClipMirror sample demonstrates the use of custom-defined clip planes.
A 3D scene is rendered normally, and then again in a 2nd pass as if reflected
in a planar mirror. Clip planes are used to clip the reflected scene to the
edges of the mirror.
[BorisV]
|
The DolphinVS sample shows an underwater scene of a dolphin swimming, with
caustic effects on the dolphin and seafloor. The dolphin is animated using
a technique called "tweening". The underwater effect simply uses fog, and
the water caustics use an animated set of textures. These effects are
achieved using vertex shaders
[BorisV]
|
The EnhancedMesh sample shows how to use D3DX to load and enhance a mesh.
The mesh is enhanced by increasing the vertex count using N-Patch tesselation algorithm.
On systems without hardware N-Patch support sample uses D3DX software generation on enhanced meshes.
|
EnvMapping folder demonstrate various techniques to map environment to object.
The CubeMap sample demonstrates an environment mapping technique called cube mapping.
Environment mapping is a technique in which the environment surrounding a 3-D object, such
as the lights, is put into a texture map, so that the object can have complex lighting
effects without expensive lighting calculations.
The FishEye sample shows a fish-eye lens effect that can be achieved using cube maps.
The SphereMap sample demonstrates an environment mapping technique called sphere
mapping. Environment mapping is a technique in which the environment surrounding a 3-D
object, such as the lights, are put into a texture map, so that the object can have complex
lighting effects without expensive lighting calculations.
|
The OptimizedMesh sample illustrates how to load and optimize a file-based mesh
using the Microsoft Direct3DX mesh utility functions.
|
The Pick sample shows how to implement picking; that is, finding which triangle in a mesh is intersected by a ray. In this case, the ray comes from mouse coordinates.
To do this inverse transform is calculated and triangle is searched in displayed mesh.
|
The PointSprites sample shows how to use the new Direct3D point sprites feature.
A point sprite is simply a forward-facing, textured quad that is referenced only by (x,y,z)
position coordinates. Point sprites are most often used for particle systems and related
effects.
Note that not all cards support all features for point sprites. For more information on
point sprites, refer to the DirectX SDK documentation.
|
The ProgressiveMesh sample illustrates how to load and optimize a file-based mesh using the D3DX
mesh utility functions. A progressive mesh is one in which the vertex information is stored internally in a special
tree which can be accessed to render the mesh with any given number of vertices. This procedure is fast, so
progressive meshes are ideal for level-of-detail scenarios, where objects in the distance are render with fewer polygons.
|
The RTPatch sample shows how to use patches in Direct3D. Display meshes with API
"added" smothness.
Note: RTPatches were originally integrated in DirectX 8 for NVIDIA GeForce3 support.
But in latest drivers they are unsupported (IMHO starting from Detonator 20.XX series).
|
The Skinned Mesh sample from D3DX 8.0b SDK. This sample demonstrates loading and
parsing hierarhy of X-file frames and using different hardware & software ways of
skinning (some parts of whem uses D3DX8 helper functions).
|
Demos from StencilBuffer folder of DirectX SDK. These demos demostrate various usage
scenarious of stencil buffer.
Stencil buffers are a depth buffer technique that can be updated as geometry is rendered,
and used again as a mask for drawing more geometry. Common effects include mirrors,
shadows (an advanced technique), dissolves, etc..
The ShadowVolume sample uses stencil buffers to implement real-time shadows. In the
sample, a complex object is rendered and used as a shadow-caster, to cast real-time shadows
on itself and on the terrain below.
The StencilDepth sample uses stencil buffers to display the depth complexity of a
scene. The depth complextity of a scene is defined as the average number of times each
pixel is rendered to.
The StencilMirror sample uses stencil buffers to implement a mirror effect. In the
sample, a watery terrain scene is rendered with the water reflecting a helicopter that
flies above.
|
The Text3D sample shows how to draw 2D text in a 3D scene. This is most
useful for display stats, in game menus, etc...
[BorisV]
|
The VCLFog sample originally was MFCFog - illustrates how
to use Direct3D® with VCL to render scene inside VCL application / forms.
Various controls are used to control fog parameters for the 3D scene.
|
The VCLPixelShader sample originally was MFCPixelShader - illustrates how
to use Direct3D® with VCL to render scene inside VCL application / forms.
Shows how to compile and use pixel shaders. Various controls are used to control
the pixel shader used for the 3-D scene.
|
The VCLTex sample originally was MFCTex - illustrates how
to use Direct3D® with VCL to render scene inside VCL application / forms.
Allows user to setup texture pipeline - texture number, blending modes. You can even
copy/paste ObjectPascal code for selected mode. Various controls are used to control the
texture appearance.
|
The VertexBlend sample demonstrates a technique called vertex blending (also known as
surface skinning). It displays a file-based object which is made to bend is various spots.
Initially this is Microsoft logo. Blending can be done with either Fixed finction pipeline
or with VertexShader.
Surface skinning is an impressive technique used for effects like smooth joints and bulging
muscles in character animations.
Note that not all cards support all features for vertex blending. For more
information on vertex blending, refer to the DirectX SDK documentation.
|
The VertexShader sample shows some of the effects that can be achieved using vertex
shaders. Vertex shaders use a set of instructions, executed by the 3D device on a per-vertex
basis, that can affect the properties of the vertex (positions, normal, color, tex coords,
etc.) in interesting ways.
Note that not all cards may support all the various features vertex shaders. For more
information on vertex shaders, refer to the DirectX SDK documentation.
|
The VolumeTexture sample illustrates how to use the new volume textures in Direct3D.
Normally, a texture is thought of as a 2D image, which have a width and a height and whose
"texels" are addressed with two coordinate, tu and tv. Volume textures are the 3D
counterparts, with a width, height, and depth, are are addressed with three coordinates,
tu, tv, and tw.
Volume textures can be used for interesting effects like patchy fog, explosions, etc..
Note that not all cards support all features for volume textures. For more information on
volume textures, refer to the DirectX SDK documentation.
|
The Water sample illustrates using D3DX techniques stored in shader files.
The sample shows a square pound inside a building, with rippling water
effects including water caustics.
|