This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to create my own planet?

Tags: None
(comma "," separated)
Beacon11
Registered Member
Posts
35
Karma
0

How to create my own planet?

Mon Nov 19, 2012 4:28 pm
I have a fun project with a simulated environment written in a commercial game engine. The environment isn't very large-- really just a single map. I have a vehicle driving around in the game, and would like to display the real-time position of the vehicle in Marble. My initial idea is to take a high-resolution picture of the map from the sky in the game engine, and basically create a new planet in Marble with that image. I can report whatever is necessary in terms of lat/lon to get that to work correctly.

However, I can't seem to find any guides regarding how to create one's own planet. Is this the best way to go about this? I would appreciate any advice!
Beacon11
Registered Member
Posts
35
Karma
0

Re: How to create my own planet?

Mon Nov 19, 2012 6:42 pm
So it seems creating a "new planet" is as simple as creating a new directory in /usr/local/share/marble/data/maps/ for the planet, and creating a regular-old map below it. But I don't see where to define planet-specific things, such as the radius, etc. Perhaps a better solution would be to create a custom Earth map using whatever lat/lons one wants to use... any opinions?
User avatar
arkascha
Registered Member
Posts
192
Karma
0
OS
( Sorry, couldn't resist... )
Beacon11
Registered Member
Posts
35
Karma
0
arkascha wrote:( Sorry, couldn't resist... )


Except that I currently have no coastlines ;) .
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
Heyho,

Slartibartfast here. xD

Actually you are right in that creating a new planet should be as easy as creating a new directory with the planetid under the maps directory. Additionally you'd need to specify the planetid in the dgml file as a target.

The idea had been that the <target> tag would allow for attributes such as radius or futher orbit elements data. So far it hasn't been implemented yet. If you are interested in adding this as a feature just speak up and I'll give you a few pointers in Marble's source code. o)
Beacon11
Registered Member
Posts
35
Karma
0

Re: How to create my own planet?

Mon Nov 19, 2012 8:31 pm
tackat wrote:The idea had been that the <target> tag would allow for attributes such as radius or futher orbit elements data. So far it hasn't been implemented yet. If you are interested in adding this as a feature just speak up and I'll give you a few pointers in Marble's source code. o)


Thanks tackat-- right before you posted I found the wonderful post here: http://blogs.kde.org/node/3269 . I took a nice high-res aerial photo of my "world" (8000x4000) and the tiles were automatically created the first time I selected the map! Lovely :) . Will the fact that the image I handed it is completely flat (i.e. not an equirectangular projection) have any real drawbacks? The world actually is flat, so I'm not sure it's possible to generate the correct projection. I have trouble getting my head around that stuff...

As for adding that feature, it really isn't necessary for this purpose, so it makes sense it isn't implemented yet. I can operate under the assumption that my "world" is the same size as the Earth (assuming that's correct?).
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS

Re: How to create my own planet?

Mon Nov 19, 2012 8:50 pm
Well it will just lead to some distortion around the poles. A possible alternative would be using Mercator as a source projection. That would require changes to the dgml file and you'd need to tile the image yourself.
So if the current solution is good enough for you you might just want to stick with it :)
Beacon11
Registered Member
Posts
35
Karma
0

Re: How to create my own planet?

Mon Nov 19, 2012 8:56 pm
tackat wrote:Well it will just lead to some distortion around the poles. A possible alternative would be using Mercator as a source projection. That would require changes to the dgml file and you'd need to tile the image yourself.
So if the current solution is good enough for you you might just want to stick with it :)


As far as the image goes, I think it looks just fine for my purposes. None of the important stuff happens at the poles anyway. Heck, they'll fall off the edge of the world in the current rendition :P .

The more important question is this: How can I accurately generate a lat/lon position so I can paint a "vehicle location" icon where the vehicle actually is in the simulation? I mean, my map goes from 0-2000, so I get the vehicle location on that scale. I can just use easy algebra to turn that into lats and lons, but that sounds way too easy. Is it?
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS

Re: How to create my own planet?

Mon Nov 19, 2012 9:05 pm
If you map 0-2000 linearly to 0 - +90deg then everything should be fine (and likewise -2000-0 to -90deg - 0deg).
Beacon11
Registered Member
Posts
35
Karma
0

Re: How to create my own planet?

Mon Nov 19, 2012 9:10 pm
tackat wrote:If you map 0-2000 linearly to 0 - +90deg then everything should be fine (and likewise -2000-0 to -90deg - 0deg).


Huh. I guess it really is that easy! Thanks again tackat :) .


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell