Home Products Download Order Contacts


Subject: Re: Spherical, Cylindrical, Cubic Texture Mapping Help

in case you want to generate texture coordinates, that's easy one ... it's
then independent of either you are using opengl, d3d or whatever else ...

for each kind of mapping you need to know some point where resulting texture
coords will be [0, 0], then ...

texture and cylidrical mapping is just conversion of xyz of vertex to
cylyndric / spherical coordinates (google)

box mapping is easy as well. you need to have calculated normals for your
faces, then for every face look for biggest component of the normal vector
and choose the two other world coordinates to calculate texture coords of
its vertices (calculate = subtract from mapping origin point, maybe scale)
for example when x is the greatest, then u = (y - orgy) * scale and v = (z -
orgz) * scale ...

there is one thing ... when faces are sharing vertices, you might get two
different texture coordinates for a single vertex (box mapping) then need to
create a new vertex and make one of those faces use it to avoid conflicts


View All Messages in comp.graphics.algorithms

Spherical, Cylindrical, Cubic Texture Mapping Help =>


Copyright 2006 WatermarkFactory.com. All Rights Reserved.