Issue with hemisphere part with textures


RE: Issue with hemisphere part with textures
#14
(2024-01-16, 2:42)Travis Cobbs Wrote: I did some more digging, and I feel that there are probably two problems here.

First of all, a cylindrical map projection is NOT equivalent to what TEXMAP CYLINDRICAL produces. If you look at the diagrams of how cylindrical map projection works, it is done as if there is a light in the middle of the earth and everything is translucent. The cylinder that wraps around the earth then receives the projected image of the earth. When doing things this way, it's not possible to represent the north or south pole, because the cylinder would have to be infinitely tall. Also, the farther from the equator you get, the more distorted things become.

The CYLINDRICAL projection model for TEXMAP is kind of the opposite. Set up a cylinder of the given dimensions based on the TEXMAP meta, then project inward toward the axis and outward towards infinity. Any polygons in that area then received the projected texture. (Note that the problem that LDView has at the top is due to the fact that it specifies texture coordinates only for the vertices, and any vertex along the axis corresponds to every single texture coordinate at that Y value.)

Secondly, I'm pretty sure that other than being upside down, and the problem with polygons that have a vertex at the axis, there is nothing else wrong with LDView's texture projection. If you are getting results in Blender that are broken, I think there is probably something wrong with your texture projection calculations. And I also think that the textures that were created for the globe pieces were designed for spherical projection and not cylindrical projection.

If you PM me, I will send you and LDraw model I have of Earth along with a corresponding high-resolution texture. It uses spherical mapping, and you can tell visually by rotating it that if it's not correct, it's at least extremely close. Here is what it looks like when rendered by LDView:
Your first point about how cylindrical projection is different from ldraw's CYLINDRICAL is correct.

There are two problems with the extended cylinder fix you suggest. The first is that the third point is not in the base of the cylinder, which is where the spec says it should be:

Quote:The third point represents a location on the outer edge of the cylinder bottom where the center-bottom of the texture would touch.

Having fixed this, i.e.:

0 !TEXMAP START CYLINDRICAL 0 16 0 0 -56 0 -26 16 0 180 61287p01rb.png

the result looks more plausible, and I think we now mostly agree on how the cylinder projection should look (yay!). The exception is the north pole. Lines of longitude should of course in theory meet at the north pole. But I agree that without more geometry around the north pole that this is never going to look perfect. In practice the lines don't and won't meet at the north pole. But the problem I get with this taller cylinder is I now get land at the north pole, which doesn't seem authentic to the original part.

I'm going to think some more about SPHERICAL mapping next.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Issue with hemisphere part with textures - by Toby Nelson - 2024-01-16, 9:44

Forum Jump:


Users browsing this thread: 1 Guest(s)