TUTORIAL 2 CREATING A CUBEMAP AND CUBE FACES FOR USE IN PHOENIX RC SCENERY CREATION This document is copyrighted to the author and may only be reproduced or copied with the author s consent. It is free for distribution on any public forum as long as the author is quoted. I would like to credit the following people for their contribution to some of the information contained in this document: Harald Bendschneider, http://www.szenerien.de/ His numerous Youtube video s proved to be indispensable. The tutorial on creating an alpha mask is effectively how Harald taught me to do it. The Master of scenery in Phoenix RC in my mind; whom I had the privilege of being a student off. Danke, Harald! Detlef Jacobi, http://phoenix-sim-szenerien.de/ His tutorials are what got me started in designing scenery for Phoenix. His website has invaluable information on getting started and one of the best descriptions on how to set up the photographic side of a scenery creation. GIMP is available for free download from http://www.gimp.org/downloads/ PTgui is available as a trial or payware here: http://www.ptgui.com/download.html Pano2VR is available trial and payware from here: http://gardengnomesoftware.com/pano2vr_download.php Phoenix RC Creator is available here: http://www.phoenix-sim.com/downloads.asp Phoenix RC Simulator is available as demo here: http://www.phoenix-sim.com/demo.asp This is a short tutorial on how to create a cubemap and cube faces for Phoenix RC using GIMP and other software. It repeats a lot of what other tutorials already may have said. This is just how it worked well for me. Do try the others as well to find your ideal workflow. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 1
CREATING CUBEMAP FOR USE IN PHOENIX RC Step 1: Create an equirectangular panorama in a program like PTgui. Step 2: Convert this panorama to a horizontal strip cube map output in a program like Pano2VR. Step 3: Open the strip in GIMP Step 4: Scale the image to a 512(or your pick) x 6 width (3072) (I have tested this up to 2048x2048 in Phoenix without noticeable performance issues) So if you do 2048 for instance you would say 2048 x (2048x6) = 2048x12 288 Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 2
Step 5: Click on rectangle select square at top Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 3
Step 6: In the rectangle select menu, select Fixed and Size and set the size to 512x512 (or your selected height in step 4). Step 7: Click and drag once in photo to activate the 512x512 rectangle. Once set, go to coordinates and make X and Y 0 to place rectangle at the beginning of the strip. Hit enter after entering the 0 to take effect. Take care to not go into any other menu. If the rectangle does not show up for some reason, drag in the picture again until the 512x512 block is shown, then change the X and Y to 0 by entering after the last zero. The square should jump to the start. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 4
Step 8: Click on the first image shown in the layers window (ctrl + l to raise this window if it is not shown). Then click at the bottom on the button that duplicates layers. Do so 5 times to have a total of 6 images in the layer field. Step 9: Click on the first image and making sure that the X selection is on 0, right click it and select Add layer mask. The order of the layers is not now important and you can start from the top and work it down. We will keep the Y coordinate at zero throughout and increase X for every following layer with 512. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 5
In the Layer Mask menu, select Selection and click add: Step 10: Click on the next layer in the Layer window and adjust the X axis by 512 (or your height from step 4). Since we started at 0 and this is our second image, it will become 512. Click in the Y block and make sure the square in the photo jump to the right by 512 pixels: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 6
Step 11: Once the square selection moved to the right, right click on the second layer image in the Layer window as you did in step 9 and again Add Layer Mask making sure Selection is selected. Step 12: Repeat step 11 with each further layer, making sure you advance 512 on the X axis every time, adding masks to each layer. VERY IMPORTANT: do not click on the next image and then select the next advance of 512 on the X axis - first change the X axis value by 512, have the selection move on to the right, and then click on the layer it is applicable to in the Layer Window. To see if this was done correct, the white block in the mask should remain only 512 (thus one small block) and not become a white line from left to right as you proceed. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 7
Step 13: Starting with layer one in the Layer window, select it and then right click it, selecting the Apply Layer to merge the image and its layer into one image: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 8
Do this for each one until all six are shown as one image: Step 14: Click once in the image to deselect any 512 selection that may still be in place. Click on Image at the top menu and Canvas Size. Change the top value to 512, leaving the bottom one at 512. Click in another cell to make the sample image on this sub menu change to the new dimensions. Click Resize. Look at the Layers window and make sure that each individual layer has resized. Sometimes only the first one resize and the rest are grey blocks. This will not work since they all need to have pictures. If this is the case, undo the actions up to the point where canvas resize were done and repeat. I am not sure why it sometimes do not work. It may have to do with the actions after the last merging of layers. I click in the white above the image after the last one and then straight to Canvas Size. Leave the layers selection in Canvas Size on None. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 9
Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 10
Step 15: Uncheck all the eye icons in the Layer window beside the first one. This should leave a similar picture to the one above. Now uncheck the eye icon of the first picture. Click on the second image and then click on its eye icon. It will still only show the grey blocks since the selection is to the right of that block: Step 16: With Move icon selected and Move the active layer selected, grab the strip as if you want to move the next frame into the grey block. With the left mouse button pressed down, move the cursor to the right. You will see the picture starting to move into the grey block and becoming visible: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 11
Do this in a zoomed view, aiming to get the next picture to fit exactly into the grey block. Once placed, uncheck the layer you moved and click the next layer in the layer window. Then check that layer s eye icon. Grab the area where the third layer should be on the strip and slide it to the left as we did with the first one. Get it in view and place it as closely as possible to the grey area: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 12
Repeat this with each layer until each layer has been placed. Step 17: Click on the first image in the Layer Window to highlight it. Click on Layer and Auto Crop Layer at the bottom. The selection around the image should now reduce to the 512x512 size image: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 13
Right click the first layer image again in the Layer window and select Scale Layer. Make sure it is 512x512. If not change it. Now click on each following layer image and again do the same for each Layer: Auto Crop, and check if they are correct size by selecting Scale Layer. Step 18: For Phoenix, +Y and Y need to be rotated 180 degrees. The other four need to be mirrored around the vertical axis. You do this by Transform and then select Flip on the Horizontal axis. Step 19: The naming of the axis combined with the above flipping should result in the correct orientation in Phoenix. The axis need to be named as follows. Do this by double clicking the current name to highlight it, then type the name as it appear below, starting from top to bottom, and hit enter once done to make it take effect: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 14
Positive X is the view directly ahead. This would be the front view of the panorama. You then move from here from left to right. These can be checked in Phoenix Creator as well when in Pano view. The axis is named in red accordingly. Keep in mind that the flip on axis may make it look out of orientation. Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 15
Step 20: Export image to desired folder with desired name. Select DDS as extension and make sure that the file name contains dot DDS (xxx.dds). Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 16
Step 21: When DDS sub menu appear make sure Cube Maps are selected. For Phoenix Creator, do not select MIP maps as it is not supported. Step 22: If you get any error at this stage it may be due to uneven size on the layers. Click on each Layer image in the Layer window and right click selecting Scale Layer. Make sure the dimensions are 512x512, if not change and update. Watch the size as you accept the change as it sometimes revert back to wrong size as it close that window. Once done with all, export it again as per the step 17. Note to select Export and not Save As during this step. Step 23: Place the exported DDS file in the scenery main folder it is intended for. Rename it to conform with that scenery s file name (with the cubemap in the end of the name i.e. xxxxxxcubemap.dds). Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 17
CREATING CUBE FACES FOR USE IN PHOENIX RC Step 1: Create an equirectangular panorama in a program like PTgui. Step 2: Import the final panorama photo you created into a program like Pano2VR: Step 3: Convert it in Pano2VR by clicking on Convert Input and selecting the following and clicking on Convert once done: Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 18
Step 4: Six files will be built in the same folder your pano photo where (unless you changed the output folder in Pano2VR): These will be the files that you will refer to in Creator when you import them on +X via the Auto button Creating a cubemap and cube faces for Phoenix RC by Coenie vd Merwe March 2013 Page 19