Geospheres - The better sphere
Blitz3D Forums/Blitz3D Programming/Geospheres - The better sphere
| ||
I have been working on getting a geosphere created in blitz. A geosphere spreads it vertices evenly over the surface unlike the CreateSphere () command that tris get smaller the closer to the top/bottom. I have got a geosphere of sorts going but I am have problems on how to texture it! If any one has any ideas that would be great! Has any one else worked on creating these? GEOSPHERE (Work in Progress) |
| ||
I didn't do this myself yet, but I think I would first try to UV-map it by using the 3D coords of the vertices, shifted to values between 0 an 1.0. Since you can set UVW, this should be easy. At least if Blitz really utilizes UVW and doesn't ignore W - which I am not sure right now. |
| ||
you can just download wings3d and use the create geosphere option, The problem with geospheres is that they dont unwrap to a square shape unlike spheres. |
| ||
If you subdivide an icosahedron, your verts are always evenly spaced, and the sphere breaks down naturally into 2 poles and an equatorial strip. |
| ||
Here is a quickie I did to gen an icosahedron and subdivide it cursor to move around... "S" to subdivide the mesh The code generates a mesh with 3 surfaces.. north pole, south pole, and equator... should be easy enuf to texture :) |
| ||
Thanks ZombieWoof that code looks like it may do the trick. Using a icosahedron creates a much better layout of the final triangles. |
| ||
I had to run that code just to find out what an icosahedron is! :P |
| ||
the initial coords of the icosahedron are wrong -- someone want to fix up the math ?? |
| ||
use spherical mapping: http://membres.lycos.fr/amycoders/tutorials/tm_approx.html |
| ||
Use an icosahedron and try wilbur: http://www.ridgenet.net/~jslayton/software.html |
| ||
can someone do a tutorial for newbies in the tutorial section?? PLEASE! |
| ||
ZombieWoof : Have you been here ? http://astronomy.swin.edu.au/~pbourke/polyhedra/platonic/ I used a tetrahedron then a cube as it was easier as a starting point to get by brain around the problem. Getting it working with a Icosahedron would be perfect. Dirk: Wilber looks like a great prog for creating maping textures. Have to see what it can do. |
| ||
Nope -- didnt find that one -- but its got the math I need -- will give it a shot and update the code if it works |
| ||
Corrected icosahedron code btw == how do folks to the code in the scrollable textarea ?? |
| ||
That looks amazing. Now to get a textures uv's working and that would be the best sphere creating I have seen in Blitz! I do not understand what "btw == how do folks to the code in the scrollable textarea ?? " means . Sorry! Slenkar: What kind of Tute do you mean? |
| ||
btw == how do folks to the code in the scrollable textarea ?? use <codebox></codebox> |
| ||
You know this code:While Not KeyDown(31) Wendshould be: While KeyDown(31) Wend Surprised no one has noticed it. |
| ||
I had changed it a keyhit(31) but forgot to mention it! |
| ||
@master: thanks for the bugfix :) @zitch: since the new code messed up my poles+equator setup, I've gotta go figure which triangle is which and reassign the them to the right surfaces... then it'll be a lot easier for me to setup the u/v New version with surfaces fixed, colorized: |
| ||
having a problem getting ultimate unwrap to deal with the mesh... apparently the b3d writer in makeb3d is a little broken |
| ||
hehehe ultimate unwrap does geospheres using icosahedrons, plus exports b3d :) |
| ||
here is the map I finally came up with couldnt get it to do the equator the way I wanted.. might have to gen my own u/v to get what I want |
| ||
the community needs a tutorial on the easiest way to get a single image onto a geo-sphere in either blitz or ultimate unwrap.-seamless of course |
| ||
ZombieWoof: Did you figure out the UV's ? |
| ||
Nope -- I cheated and grabbed a copy of Ultimate Unwrap after adding code to save the mesh to B3D :) Was kinda busy getting the alpha release of Game Manager ready to post. And now of course I'm off on other things :) There are some recent posts on uv mapping if you want to take a shot at having the code generate the UV data... and we've suggested a couple of different mappings in this thread. |
| ||
I ended up finding an example in on how to convert a texture to a spherical map. With this function you can then use a CreateSphere then texture it with the new texture and it look great! I got the code from Paul Bourke's cool site http://astronomy.swin.edu.au/~pbourke/texture/polargrid/ I will post when it is working. Thanks all for the input |
| ||
Spheres suck. Why couldn't the world have been a torus? |
| ||
that would be awesome if you could get that sourcecode - everyone needs this |