View Full Version : 3D Tree Trunks/Branches Using Texture-Mapped Lines
03-23-2001, 05:49 AM
I was just thinking, since we can texture any primitive (including lines), what would prevent me from drawing the trunk and branches of a 3D tree using fat GL_LINEs? I could then slap some texture-mapped GL_TRIANGLES around the top for foliage and have a really fast tree.
03-23-2001, 07:31 AM
Probably not, at least for the trunks. Triangle foliage is fine, and is how most people do it.
Remember that you can only set texcoords per vertex. A line only has two vertices, so all interpolated texcoords will lie along a single straight line, like a one-dimensional texture. (You _can_ use a 2- or 3-d texture, of course, but the texture footprint will still be a line.)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.