|
|
More manual texture co-ords - cylindrical
I have managed to manually specify texture co-ordinates for a planar
projection texture map - it turned out to be a lot easier than I thought. I
now have to implement cylindrical texture maps. I am loading low2 objects
and the help for cylindrical tmaps is:
The image is wrapped cylindrically around the major axis. r maps to
longitude (angle around the major axis).
I know the major axis and I know the bounding box of the object, can anybody
point me in the right direction for applying these co-ordinates? I then
have to implement spherical but this will be easy if I know how to do the
cylindrical.
Thanks,
Allan
|
|
0
|
|
|
|
Reply
|
abruce (27)
|
2/23/2005 10:18:54 AM |
|
Allan Bruce wrote:
> The image is wrapped cylindrically around the major axis. r maps to
> longitude (angle around the major axis).
Easiest, sorta backwards, way to do it, would probably be to rotate the
object to orient the object-space coordinatesystem according to the
cylindrical projection. Then you could convert all xyz-vertex
coordinates to cylindrical coordinates:
http://mathworld.wolfram.com/CylindricalCoordinates.html
- and rescale to the interval [0..1].
The rotation is probably done most easily using a basis-shift (consult
your linear-algebra book), but you need to decide on a default
orientation of the cylindrical projection (like, where does your image
split, what is "up" etc.)
> I know the major axis and I know the bounding box of the object, can
> anybody point me in the right direction for applying these
> co-ordinates? I then have to implement spherical but this will be
> easy if I know how to do the cylindrical.
- same procedure (as last year, ms. sofie), only use
http://mathworld.wolfram.com/SphericalCoordinates.html
This will get you the basic projections - the rest is tweaking ;)
Hope this helps,
\\Mikkel Gjoel
|
|
0
|
|
|
|
Reply
|
ISO
|
2/23/2005 4:41:08 PM
|
|
|
1 Replies
190 Views
(page loaded in 0.038 seconds)
|
|
|
|
|
|
|
|
|