Archived

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

Geodesic Spere Generation

This topic is 5900 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

Creating a sphere based on lat/long just doesn''t cut it. The polar regions are just plain awful when you appl a texture. i.e. sky domes. So.... Anone know how to create a geodesic sphere (and no I''m not going to fork out a pile of cash for 3d studio ). I found a topic http://www.gamedev.net/community/forums/topic.asp?topic_id=51245 that suggest I create a diamond and the subdivide each face again and again. Would this be the right approach? Thanks. D.V.

Share this post


Link to post
Share on other sites
If a ''diamond'' is a tetrahedron then, yes, it''s a good approach to get a nicely subdivided sphere. However, I''m not sure how one should texturemap such a sphere to eliminate artifacts. (If that is at all possible.)

Share this post


Link to post
Share on other sites
A GeoSphere is not that hard to make. you start with a 20 sided object. esentually use your your lat/lon formula to create a shpere with 5 divisions round and 3 rows from pole to pole. then rotate the bottom half by half of 1/5 a turn so that all the triangles are the same size and shape. If you''ve ever played and RPG games like D&D then it should look like a 20 sided die.
then divide the triangles in a manner similar to a serpenski triangle for whatever accuracy you want. after you''ve got the triangles subdivided then normalize the distances from the center and scale it to what you need.
There are ways to optimize the generation but I''d suggest getting it to work this way before plunging into that.

Share this post


Link to post
Share on other sites
I still get an ENOURMOUS amount of distortion at the poles so I am now using a 'Sky Patch'. That is only rendering the part of the sphrer that can be seen by the user (+/-45 deg lat and +/-45 deg long for example) and then *calculating* the texture coordinate based on the view vector.

Obviously I will need to use multiple textures, two polar and 1 or two equatorial, but this (should it work) remove polar distortion.

D.V.

Edited by - DeltaVee on October 21, 2001 10:35:56 AM

Share this post


Link to post
Share on other sites
I would strongly recommend that you just use a skybox. Assuming that the skybox images have been properly perspective projected, they''ll look the way they should, and you''ll need many fewer polygons than if you were to use a sphere.

Share this post


Link to post
Share on other sites
Yeah, looked at sky boxes. The prblem is exactly as you said, perspective. (edges further away than face centers).

All I am trying to do (without the use of artists and POVRAY) is generate fairly realistic environments.

I know sky boxes are the way to go but I am not an artist. I just have a ton of celestial data.


D.V.

Share this post


Link to post
Share on other sites
quote:
Original post by no way
I use icosahedron and tesselate it a couple of times. It works quite well even with one texture.


Interesting approach. Does this work well with a sky dome or a sky sphere, I ask because I am (trying) to write a Space Sim, so you can''t hide your poles below the horizon.


D.V.

Share this post


Link to post
Share on other sites
For me it works with sky sphere. I had some initial trouble with getting texture map coorinates right but now its ok.
BTW i dont use prerendered texmap, its procedurally generated. This doesnt make a difference with mapping tho.

Share this post


Link to post
Share on other sites