Drawing with Direct3D, Part 2: Lighting and Textures
Learn how to use Direct3D's lighting model and textures to create more realistic three-dimensional scenes.
by Rod Stephens
December 13, 2007
n Part 1 of this article series you saw how to get started with Direct3D, Microsoft's high-performance three-dimensional graphics library. That article explained how to initialize Direct3D, build simple scenes, and display them. It also explained how you can use transformations to modify the data or change the viewing position over time.
The techniques you've seen so far let you specify colors for the objects in a scene—but those colors remain static. The system displays exactly the colors you specify; they aren't produced by any sort of lighting model. In complicated scenes, displaying only specified colors can produce a poor result, because adjacent shapes that have the same colors blend together, making it difficult for viewers to discern what the scene represents. Imagine a cube where sides all have the same color displayed on a two-dimensional surface. The sides would blend so that you couldn't tell where one side ended and the next began.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!