Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Nymphodora, Quad), 919 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: joao13pt] #420639
03/30/13 15:54
03/30/13 15:54
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
just take spherical coordinates(x=alpha, y=beta) and convert them via sin and cos to 3d space (vec_rotate((1, 0, 0), (alpha, beta, 0)))
this won't give you a uniform distribution, but a spherical shape


Visit my site: www.masterq32.de
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: MasterQ32] #420648
03/30/13 19:38
03/30/13 19:38
Joined: Mar 2013
Posts: 30
Portugal
J
joao13pt Offline OP
Newbie
joao13pt  Offline OP
Newbie
J

Joined: Mar 2013
Posts: 30
Portugal
Originally Posted By: MasterQ32
just take spherical coordinates(x=alpha, y=beta) and convert them via sin and cos to 3d space (vec_rotate((1, 0, 0), (alpha, beta, 0)))
this won't give you a uniform distribution, but a spherical shape

Being said like that i don't really know what to do xD sorry
i understand a thing or two about trigonometry, so maths isn't a problem for me, i just need "exact guidance" if you understand what i mean
im using the c.x,y,z (not the DX coordinates, but actual world coords) now i'd like to transform my "flat" terrain into a round, sphere-like mesh
would you be so kind as to explain a little better your idea please? x)
thanks for your help

Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: joao13pt] #420651
03/30/13 20:59
03/30/13 20:59
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
your terrain is a flat surface, so you only have xz-coordinates, y is constant
you can now transform every vertex by taking the xz-coordinates and map them to a range of 360 degrees and then convert those two angles to the 3d spherical space.
i cannot draw an example right now but in about two days


Visit my site: www.masterq32.de
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: MasterQ32] #420657
03/31/13 05:43
03/31/13 05:43
Joined: Mar 2013
Posts: 13
United States, New Jersey
R
ryanhagz Offline
Newbie
ryanhagz  Offline
Newbie
R

Joined: Mar 2013
Posts: 13
United States, New Jersey
Originally Posted By: MasterQ32
your terrain is a flat surface, so you only have xz-coordinates, y is constant
you can now transform every vertex by taking the xz-coordinates and map them to a range of 360 degrees and then convert those two angles to the 3d spherical space.
i cannot draw an example right now but in about two days


I'm looking for something very similar to what joao is looking for, I'd love to see your example drawn out. I'm a better visual learner. grin

Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: ryanhagz] #420664
03/31/13 11:17
03/31/13 11:17
Joined: Apr 2005
Posts: 274
austria
Ascalon Offline
Member
Ascalon  Offline
Member

Joined: Apr 2005
Posts: 274
austria
maybe this could help you, dont know http://www.gameprogrammer.com/fractal.html


my webside : www.ascalon.jimdo.de
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: Ascalon] #420701
04/01/13 03:52
04/01/13 03:52
Joined: Mar 2013
Posts: 13
United States, New Jersey
R
ryanhagz Offline
Newbie
ryanhagz  Offline
Newbie
R

Joined: Mar 2013
Posts: 13
United States, New Jersey
Originally Posted By: Ascalon
maybe this could help you, dont know http://www.gameprogrammer.com/fractal.html


Thanks for that Ascalon! While it wasn't quite what i was looking for, it was still very helpful. I found the concept of storing the algorithms to make the image instead of the image itself interesting especially since I know the racing game "Fuel" used this same concept to develop their terrain (which happens to be the biggest map on any console; 14,000Km^2). While the game itself was kind of lame, it's interesting how they did the terrain. This video kind of talks about how they did it using procedural generation.

He starts off by comparing othe well known open world games with huge maps. If you'd like to see the bit about Fuel skip to around 1:00.

http://www.youtube.com/watch?v=HhyyUiYQolA

Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: ryanhagz] #420874
04/05/13 11:17
04/05/13 11:17
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
Some stuff to get you started:

basic introduction on mapping a cube to a sphere:
http://mathproofs.blogspot.de/2005/07/mapping-cube-to-sphere.html

what you want:
http://acko.net/blog/making-worlds-1-of-spheres-and-cubes/
http://www.nullpointer.co.uk/content/?p=393

Make sure you understand how a "basic" heightfield terrain works before attempting to create a spherical terrain. Basically a spherical terrain can be created out of 6 heightfield terrains, so it's really a good idea to start with them first laugh

[edit] Also, if you want to create MASSIVE scale spherical worlds, you should have a look at how octrees work.

Last edited by BoH_Havoc; 04/05/13 11:19.

Shade-C EVO Lite-C Shader Framework
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: BoH_Havoc] #420903
04/05/13 21:15
04/05/13 21:15
Joined: Mar 2013
Posts: 30
Portugal
J
joao13pt Offline OP
Newbie
joao13pt  Offline OP
Newbie
J

Joined: Mar 2013
Posts: 30
Portugal
Im sorry, i've been a little distant from both lite-c and pc's. My hard drive had some mechanical issues and wasn't allotwing me to log into windows, so i won't have it fixed for a couple of weeks. Using a crappy laptop at the moment, it has an integrated graphics card which can't even render more than 5000 polys without making the FPS decrease to about 5
So i won't be visiting this forum for some time.
Thanks to all who have helped me so far

Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: joao13pt] #420905
04/06/13 02:19
04/06/13 02:19
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
I'm doing some research right now, my current progress:


Improvements:


Last edited by MasterQ32; 04/06/13 03:26.

Visit my site: www.masterq32.de
Re: From a simple 3D Sphere to a real-size Planet. Need help! [Re: MasterQ32] #420906
04/06/13 04:53
04/06/13 04:53
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Very cool!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 5 1 2 3 4 5

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1