|
World Maps
Creating world maps of your planets is something that's on the feature list for a future version, but here's a way to do it with version 1.2 of MojoWorld. UPDATE for v2 - world maps are still not yet a feature, but I've updated the global map material to also have longitude lines.
A global map of the default planet. The yellow X is where the camera is when the planet is first opened. I also have a larger map of the default planet, it's about 1.4 meg. Maps for the v2 planet near the end of the tutorial. First off, download my global map material library item. This is a nested material tree which will allow you to select what color you want your latitude lines to be and then plug in your existing global material underneath those lines. It also colors the sea bed blue, as when the export process happens, the ocean is not rendered. You can, of course, change the color of the sea bed by modifying the 'sea bed gradient' texture's gradient. If you're using version 2 of MojoWorld, here's the updated global map material. Open up the world you want to map. Click the circle-M for the material on the planet. Make sure that the material applied to your planet has a name that you can easily identify. Use the 'Load From Library' option to load the globalmapmat.mjl or the globalmapv2.mjl, depending on which version of MojoWorld you're using. The second leaf is for the color of the latitude lines. They're red by default, but that may not be suitable for all planets. You could also make your latitude lines out of some wacky color texture, but a solid color is probably best. The first leaf is a nested material tree. Open the leaf and then click on the arrow to the left of the 'land / sea leaf' to open up the material editor there. That material also has two leaves, the first of which is the 'sea bed gradient' and the second is the 'planetary material'. Select the 'planetary material' leaf and using the DDLB on the right, select the material that you had originally applied to your planet. And, because I couldn't leave well enough alone, that leaf in the v2 version of the material is now named 'Your Planetary Mat Here'. Once you've set up the material, you're ready to export the planet map files. On the Render Settings menu, select the option 'Export World'. The top part of the Export World dialog is for exporting the 6 heightfields. But for our map, we don't care about the heightfields, so I pick a temporary name for them, set their resolution _really small_ and accept the other defaults.
It's the texture files we'll use to create the map. Although it'll take a long time, the higher resolution here that you can use, the better. For the larger map, I used 1024 on a side. A size of 512 is a good test size. Some concrete numbers here - assuming the default Mojo planet radius of 6,000,000 meters and a map made up of faces 1024 on a side, the final map has a resolution of approximately 9 kilometers per pixel! NOTE! It can take a _long_ time to export the planet texture maps! I think it was about half an hour to export the panels for the large map, YMMV. Once you export, you'll have 6 tiny heightfield files that you can throw out and 6 texturemap panels that are ready to be stitched together in your favorite 2d image editing program. They will be numbered 1 through 6. Where I used the name "mymap.png" above, the files I get will be named "mymap_1.png" through "mymap_6.png". The two polar panels (1 is the north pole, 3 is the south) will need to be cut into four triangular sections. Three of the remaining four panels will need to be rotated when they are stitched into the map. Here's the key for the polar panels:
and here's the overall plan for where to place the panels:
The second row of text in the square panels specifies how to rotate those panels. I figure it'll be self-evident for how to rotate the triangular panels. The bottom row shows the longitude values at the points, so some very crude longitude lines can be drawn in by hand (see longitude note below). Actually, once I got the v2 material to make longitude lines, it looks like it would be fairly trivial to draw them in afterwards for a planetary map exported from v1.2 - they are indeed parallel to the edges of the equatorial faces and radiate in straight lines from the points to the edges of the trianglular maps. A Note about Parameter Bombs In order to find out where the default camera is on the default planet, I created a parameter bomb that was 50,000 meters square, colored the inside of it bright pink and then exported my planet texture files at 1024x1024. The parameter bomb showed up as a square only about 4 pixels on a side. So, if you have small parameter bombs around, they probably won't be terribly obvious on your map. However, if you have large parameter bombs, you'll want to edit the material inside of those bombs in the same way as the global material, starting with the globalmapmat.mjl, setting your latitude line color as desired and plugging the parameter bomb's material into the appropriate spot. This is only an issue if your parameter bombs are large and cross latitude lines. A Note about Longitude Right now, the globalmapmat.mjl only draws latitude lines. Latitude lines are easy. Longitude lines, however, are going to take some thought and some Pro-UI hackery... As soon as I get it figured out (or if Krummen Hacker bangs it out in 5 minutes and sends it to me), I'll update this tutorial. Hmm. After conferring with Craig, longitude lines are going to require a plugin for 1.2, beyond even Pro UI hackery. It turns out that longitude is supposed to just drop out of the UV Pos space, but hey, that's a _bug_ and it's been fixed for future versions. So, in upcoming versions, we'll be able to make longitude lines easily using the UV Pos space. Version 2 with Longitude Although the planetary UV bug in version 2 has only been partly fixed, it's fixed enough to get longitude lines. When the planetary UV bug is fixed for real, that'll enable you to take an image such as the Mars bump map or an Earth bump map or a bump map of your own imaginary continents to use as the basis for the terrain texture. That almost works in v2, but it drives the RTR absolutely bonkers.
The version 2 default planet, with longitude lines as well as latitude lines. No yellow 'X' tho, 'cuz I'm lazy. I do have a larger map (3.3 meg), too. |