Geodesic Spere Generation

Started by
7 comments, last by DeltaVee 22 years, 5 months ago
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.
D.V.Carpe Diem
Advertisement
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.)
Dirk =[Scarab]= Gerrits
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.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
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
D.V.Carpe Diem
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.
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.
D.V.Carpe Diem
I use icosahedron and tesselate it a couple of times. It works quite well even with one texture.
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.
D.V.Carpe Diem
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.

This topic is closed to new replies.

Advertisement