Forum: Poser - OFFICIAL


Subject: Correctly UV-Mapped Elliptical Cylinder

kawecki opened this issue on Aug 29, 2012 · 18 posts


kawecki posted Wed, 29 August 2012 at 9:55 PM

How I did it?

Well, the solution of the problem is nothing easy. I shall try to explain in a way as simple as I can.

To have an uniform distribution of the texture map applied to a curved surface, the UV coordinates must be proportional to the perimeter or arch lenght of the curve.

The simplest case is a plane, as the curve is nothing more than a line, the texture coordinate becomes the plane coordinate  u = x , v = y  scaled by a factor to fit into the uv range, generaly 0.0 to 1.0

Next cames a cylinder. It is a little more complicated, but still continues to be very simple. One UV coordinate is a simple line (the height of the cylinder) so v = y and the other coordinate u is the perimeter of a circle.

The perimeter of a circunferrence is something very simple and it is proportional to the arch angle, so we have u = angle. To find the angle of a point along the perimeter of the circle, we only need basic school trigonometric functions, sinus, cosinus, etc. This functions any calculator does, any software routine has and even are implemented in the CPU of a computer.

Here ends the easy story. If we have an ellipse instead of a circle, things go ugly. No school knowledge can solve this. Now we need University grade and advanced calculus. The solution for the arch length of an ellipse is the incomplete elliptical integral of the second kind. Nice name, but the problem doesn't end here. This integral has no exact solution. To solve the integral it must be expanded into series. It was done and results were tabulated one or two centuries ago, but still contine to be something nothing common in our lives. This integral is part of what we know as "speciall functions". Common scientific calculator don't have them, we need a calculator with speciall functions. There are also software routines and libraies that can calculate this integral.

Stupidity also evolves!