Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 18 10:25 am)
I've done it by brute-force: Make a circular cylinder in Amapi, UV map it in UVmapper, then take it back to Amapi and reshape it.
Wonder if Kawecki has a more 'elegant' way to do it?
Watching........
My python page
My ShareCG freebies
still hooked to real life and enjoying the siesta!
Visit my blog! :D
Visit my portfolio! :D
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!
Well, now I have the math base needed, but how I do it? I can use some software package to solve this integral and I found some after some day of web search. But there is also another big problem. The calculation is time consuming, for today computers it means nothing, but if we want to map meshes with tens or hundreds thousands polygons it will take some time to do it, well rendering an image takes much more, but I wanted to find another and faster way to do it.
My idea was to approximate the solution, I don't need an exact solution, I am not going to land in Mars with this. An error of one percent would be something beautiful and nobody will see any difference in the texturing. I wanted to approximate this integral with something basic mathematical operations and basic mathematical functions.
After two or three weeks of work I found something very simple with an error of less than 1.5% and it took me half of an hour to code and include into a software app.
Stupidity also evolves!
The inverse problem.
The second problem was that I wanted to build a mesh of an ellipse with uniform lenght of the faces. Any edge of a face along the perimeter of the ellipse has the same length.
The mathematical solution is the inverse of the incomplete elliptic integral of the second kind, nice name again, but this time I was unable to find a software package, library or related maths. What do exist is the inverse of the elliptical integral of the first kind (Jacobian functions), but nothing about the second kind. Until now I was unable to find the exact solution.
What I did was also another approximation with an error less of one percent. I have not implemented it in any software yet
Stupidity also evolves!
integrals magick.
would this work for mapping an egg shape?
i been stumped for months on mapping a dragon egg for seamlessness. playing with the geodome in wings
♥ My Gallery Albums ♥ My YT ♥ Party in the CarrarArtists Forum ♪♪♪ 10 years of Carrara forum ♥ My FreeStuff
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Attached Link: http://www.renderosity.com/mod/rrfilelock/download.php?fileid=46374&key=5863
There is no problem to map a cylinderwhose cross-section is a circle, but when it becomes an ellipse the texturing goes wrong. The texture is expanded in the middle and compressed at the sides. The distortion becomes increased as the eccentricy of the ellipse is increased.After breaking my head, I managed to solve this problem and now I am able to correctly UV map with an uniform texture distribution for any cylinder with any eccentricity, ranging from 0 (circle) to 1 (plane).
The example is in obj format.
Stupidity also evolves!