Archived

This topic is now archived and is closed to further replies.

Warpy Spherical Texture Mapping

This topic is 5243 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I''ve written a testbed demo that creates a 2D Perlin noise field and maps it onto a sphere to dynamically generate textured planets (eventually for a space game). The problem is that the pixels around the equator are stretched and those at the poles are really pinched in. Using the orthographic projection helps alleviate the warping a bit, but recently I''ve begun to experiment with doing some kind of processing on the noise field before mapping it on the sphere to make it look less warped. The basic problem is that terrain features are uniformly distributed in the 2D texture, but when the texture is mapped on the sphere, there is a higher density of features at the poles (a continental drip effect). My thought was to use some kind of sandbagged monte carlo blur algorithm to blur the top and bottom 10% of the texture. The amount of blurring increases further towards the poles. This is better than nothing at all, but it''s not a great solution since the amount of feature variation is the same, it''s just blurry now. Then I started taking random blocks of pixels at the top of bottom of the texture and averaging them together in narrow bands, and combining that with blurring. It doesn''t look that bad, but it doesn''t look great. I can''t help but to think there''s an easier (or better) way to do this, but I can''t think of one other than going with a 3D noise function, creating the perlin noise using polar coordinates, and mashing that onto a 2d texture somehow. That''s really much more complicated than I want to get (my linear algebra background is stretched as it is), since I have aspirations of running the algorithm in realtime in the background of a game running at 30fps. Any advice?

Share this post


Link to post
Share on other sites
Ok, so I know what a cube map is now. I don''t think that''s the solution that I''m looking for. If anything, the texture will be more distorted, since although you get rid of the pinching at the poles, you have increased feature information where the corners of the cube map to the sphere. It''s the same thing that happens when you take an evenly distributed collection random 3D points in a cubic area and then map them all to polar coords. The collection is no longer evenly distributed (points from the corners of the cube clump together). Maybe that wasn''t a lucid explanation, but I don''t think cubemapping is my answer.

Share this post


Link to post
Share on other sites