PS3 [Research] Modifying the Gaia Visualization (custom_render_plugin/earth.qrc)

I had figured out a way to inject the compressed qrc back into a 8 byte file with just the header using binsert.exe. (very cool little app thanks for the suggestion @Berion) but it was not a great way to do it really, pasting a 10MB file into a 8 byte file. :)

That binsert is great for static patching though, really easy to use from command line, and super light weight at only 18.2kb

I will attach it here again for anyone that does not know about it, the usage is simple. Just like this:

Code:
binsert 0x0000000008 earth.qrc earth_header.qrc

This was copy and pasting the file earth.qrc into file earth_header.qrc at offset 0000000008.
Take a look at this FART, it does wonders
 
Stars Texture earth.qrc!! I made an earth.qrc with that stars texture @sandungas had posted and it looks pretty cool
stars-texture-earth.qrc-preview.jpg
 

Attachments

@xf505 Wow, that turned out very nice. Nice idea.

I just made my first custom specular map :)

upload_2020-1-29_17-50-29.png

I made one to go with the fictional planet Ceres, i used some effects like inverted the colours and made it black and white. Came out ok.

4.jpg

ceres_preview1.jpg ceres_preview2.jpg ceres_preview3.jpg
ceres_preview4.jpg ceres_preview5.jpg ceres_preview6.jpg

I almost am happy to release my BAT now that does all 3 layers. Couple more tests. it can build qrcs up to 9.5MB for now. I might add some dds stuff and want to stay under 10MB for now, any more than 10MB can not easily be used on HEN. .

It allows 24 cloud layer jpgs to be 150kb each, 24 ground layer to be 150kb each, and 24 specular layer jpgs to be 50kb each.
 
Last edited:
Here is v1.5 of the BAT, many credits to pink1, sandungas and berion for all the help, would not be possible without you.

Here is a video of me using it to inject 2 cubemaps of Venus. Super easy now, just takes 2 minutes to make your own earth.qrc.


This works with qrc and qrcf extensions now to match pink1s application. When it completes you will find a QRC in the root folder, and a QRCF in the temp folder. Also the base template file is a QRCF.

Note: Option 1,2 and 3 are the only options that work with all 3 layers. The other options just work with the top clouds layer.

WARNING: Creating earth.qrc files larger than the official one is experimental and I have labeled this version a beta. It seems fine in my recent tests, earlier freezes seemed to be caused by jpegoptim not being 100# accurate.

I have also removed the official folder creation as it was being a pain for some reason. Its not required anyway for these apps to work.

Code:
cls
@echo off
echo                         +----------------------+
echo                               QRC Injector
echo                                   v1.5
echo                           Support at PSX-Place
echo                         +----------------------+
echo.
echo                             JPG REQUIREMENTS:
echo.              If using tile_clouds.jpg it must be 512x512
echo.              If using tile_ground.jpg it must be 512x512
echo.              If using tile_specular.jpg it must be 512x512
echo               If using face_clouds.jpg it must be 1024x1024
echo               If using face_ground.jpg it must be 1024x1024
echo               If using face_specular.jpg it must be 1024x1024
echo               If using cubemap_clouds.jpg it must be 4096x3072
echo               If using cubemap_ground.jpg it must be 4096x3072
echo               If using cubemap_specular.jpg it must be 4096x3072
echo               If using logo.jpg and fill.jpg they must be 1024x1024
echo               If using 0.jpg to 5.jpg they must all be 1024x1024
echo               If using banner.jpg it must be 4096x512 fill.jpg 1024x1024   
@pause
:options
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo +------------------------------------------------------------------------------+
echo                             QRC Injector v1.5
echo.
echo                               OPTIONS MENU
echo +------------------------------------------------------------------------------+
echo.
echo                        SELECT AN OPTION FROM 1 to 9
echo +------------------------------------------------------------------------------+
echo 1) Apply tile_clouds.jpg tile_ground.jpg and tile_specular.jpg to all 72 slots
echo 2) Apply face_clouds.jpg face_ground.jpg face_specular.jpg to all 6 faces
echo 3) Apply cubemap_clouds.jpg cubemap_ground.jpg and cubemap_specular.jpg
echo 4) Apply logo.jpg to only 2 opposite faces on the equator, fill.jpg the rest
echo 5) Apply logo.jpg to 4 faces around the equator, fill.jpg north+south
echo 6) Apply individual 0.jpg to 5.jpg to the 6 faces
echo 7) Apply banner.jpg all around the equator like a belt
echo 8) Clone tile.jpg into tiled 4096x2048 jpeg ready for cubemap generator
echo 9) Clone tile.jpg into tiled 8192x4096 jpeg ready for cubemap generator
echo.
echo.
echo.
echo.
set /p op=Type option:
if "%op%"=="1" goto tile_to_qrc_info
if "%op%"=="2" goto face_to_qrc_info
if "%op%"=="3" goto cubemap_to_qrc_info
if "%op%"=="4" goto logo1_info
if "%op%"=="5" goto logo2_info
if "%op%"=="6" goto 6_sides_info
if "%op%"=="7" goto banner_info
if "%op%"=="8" goto create_4k_from_512x512_info
if "%op%"=="9" goto create_8k_from_512x512_info
:tile_to_qrc_info
echo .
echo You chose to inject tile_clouds.jpg tile_ground.jpg and tile_specular.jpg (512x512)
echo The jpgs will be applied to every one of the 24 slots in all 3 layers
echo Working....
goto tile_to_qrc
:face_to_qrc_info
echo .
echo You chose to inject face.jpg (1024x1024) to earth.qrc
echo The jpg will be applied to every one of the 6 cube faces in all 3 layers
echo Working....
goto face_to_qrc
:cubemap_to_qrc_info
echo .
echo You chose to inject cubemap.jpg (4096x3072) to earth.qrc
echo The 3 cubemap jpgs will be applied all around the cube in all 3 layers
echo Working....
goto cubemap_to_qrc
:logo1_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied front + back faces, fill.jpg on sides + top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo_to_qrc
:logo2_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied to front + back + side faces, fill.jpg to top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo2_to_qrc
:banner_info
echo .
echo You chose to inject banner.jpg (4096x512) to earth.qrc
echo The banner.jpg will be applied all around the equator lke a belt
if not exist banner.jpg goto file_not_found_banner
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto banner_to_qrc
:6_sides_info
echo .
echo You chose to inject 6 individual sides 0.jpg to 5.jpg (1024x1024) to earth.qrc
echo These will be applied to every face using official numbering of the faces
if not exist 0.jpg goto file_not_found_0
if not exist 1.jpg goto file_not_found_1
if not exist 2.jpg goto file_not_found_2
if not exist 3.jpg goto file_not_found_3
if not exist 4.jpg goto file_not_found_4
if not exist 5.jpg goto file_not_found_5
echo Working....
goto 6_sides_to_qrc
:create_4k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 4096x2048 jpg
echo The tile.jpg will be prepared into 4k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_4k_from_512x512
:create_8k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 8192x4096 jpg.
echo The tile.jpg will be prepared into 8k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_8k_from_512x512
:create_4k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile 4096x2048.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 1 of 4 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 2 of 4 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 3 of 4 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 4 of 4 completed successfully
echo .
if exist 4096x2048.jpg echo PROCESS COMPLETED
if not exist 4096x2048.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:create_8k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile temp.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile temp.jpg temp.jpg
echo Step 1 of 8 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile temp.jpg temp.jpg
echo Step 2 of 8 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile temp.jpg temp.jpg
echo Step 3 of 8 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile temp.jpg temp.jpg
echo Step 4 of 8 completed successfully
bin\jpegtran -crop 8192x4096+0+0 -outfile 8192x4096.jpg temp.jpg
echo .
echo Step 5 of 8 completed successfully
bin\jpegtran -drop +4096+0 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 6 of 8 completed successfully
bin\jpegtran -drop +0+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 7 of 8 completed successfully
bin\jpegtran -drop +4096+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 8 of 8 completed successfully
DEL "temp.jpg" /Q /S
echo .
if exist 8192x4096.jpg echo PROCESS COMPLETED
if not exist 8192x4096.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:tile_to_qrc
echo .
@if exist earth.qrc DEL "earth.qrc" /Q /S
echo earth.qrc cleared
@if exist "bin\temp\" DEL "bin\temp" /Q /S
echo .
@if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
@if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_clouds.jpg tile_clouds.jpg
bin\jpegtran -drop +512+0 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -drop +512+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
echo .
bin\jpegtran -drop +512+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -drop +0+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_clouds.jpg bin\temp\face_clouds.jpg
echo Completed: tile_clouds.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_ground.jpg tile_ground.jpg
bin\jpegtran -drop +512+0 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -drop +512+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
echo .
bin\jpegtran -drop +512+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -drop +0+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_ground.jpg bin\temp\face_ground.jpg
echo Completed: tile_ground.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_specular.jpg tile_specular.jpg
bin\jpegtran -drop +512+0 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -drop +512+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
echo .
bin\jpegtran -drop +512+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -drop +0+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_specular.jpg bin\temp\face_specular.jpg
echo Completed: tile_specular.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -drop +1024+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo Completed: face_clouds.jpg cloned into 4096x3072 cubemap cross (clouds)
bin\jpegtran -drop +1024+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo Completed: face_ground.jpg cloned into 4096x3072 cubemap cross (ground)
bin\jpegtran -drop +1024+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo Completed: face_specular.jpg cloned into 4096x3072 cubemap cross (specular)
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap_clouds.jpg" "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_ground.jpg" "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_specular.jpg" "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:face_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_clouds.jpg face_clouds.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_ground.jpg face_ground.jpg
echo.
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_specular.jpg face_specular.jpg
echo Completed: Cubemap templates created
bin\jpegtran -drop +1024+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +1024+2048 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo .
bin\jpegtran -drop +2048+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +3072+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +0+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo Completed: face_clouds.jpg cloned into 4096x3072 cubemap_clouds.jpg
bin\jpegtran -drop +1024+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +1024+2048 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo .
bin\jpegtran -drop +2048+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +3072+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +0+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo Completed: face_ground.jpg cloned into 4096x3072 cubemap_ground.jpg
bin\jpegtran -drop +1024+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +1024+2048 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo .
bin\jpegtran -drop +2048+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +3072+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +0+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo Completed: face_specular.jpg cloned into 4096x3072 cubemap_specular.jpg
bin\jpegtran -rotate 180 "bin\temp\cubemap_clouds.jpg" "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_ground.jpg" "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap_specular.jpg" "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:cubemap_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
echo .
bin\jpegtran -rotate 180 cubemap_clouds.jpg "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 cubemap_ground.jpg "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
bin\jpegtran -rotate 180 cubemap_specular.jpg "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:logo_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo Completed: Face 0.jpg to 5.jpg cut out
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpg tiles cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpg tiles cut
goto optimize_72_parts
:logo2_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and logo.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:6_sides_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg 4.jpg
echo .
bin\jpegtran -drop +3072+1024 0.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 1.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+1024 2.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 3.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 5.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: 0.jpg to 5.jpg made into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:banner_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1280 banner.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: banner.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:optimize_72_parts
echo .
@copy "bin\temp\Tiles\*.jpg" "bin\temp\Tiles\optimized\*.jpg"
echo Completed: Files copied ready for optimizing
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\01.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\02.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\03.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\04.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\05.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\06.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\07.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\08.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\09.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\10.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\11.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\12.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\13.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\14.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\15.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\16.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\17.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\18.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\19.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\20.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\21.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\22.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\23.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\24.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\25.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\26.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\27.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\28.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\29.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\30.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\31.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\32.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\33.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\34.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\35.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\36.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\37.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\38.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\39.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\40.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\41.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\42.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\43.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\44.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\45.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\46.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\47.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\48.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\49.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\50.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\51.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\52.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\53.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\54.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\55.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\56.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\57.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\58.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\59.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\60.jpg"
echo .
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\61.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\62.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\63.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\64.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\65.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\66.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\67.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\68.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\69.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\70.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\71.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\72.jpg"
echo Completed: Optimized jpgs to correct size for each available slot
:inject_72_parts
@copy bin\earth_template.qrcf bin\temp\earth.qrcf
echo .
echo Completed: Base template created
echo .
@bin\binsert 0x000658F0 bin\temp\Tiles\optimized\01.jpg bin\temp\earth.qrcf
@bin\binsert 0x0008B970 bin\temp\Tiles\optimized\02.jpg bin\temp\earth.qrcf
@bin\binsert 0x000B19F0 bin\temp\Tiles\optimized\03.jpg bin\temp\earth.qrcf
@bin\binsert 0x000D7A70 bin\temp\Tiles\optimized\04.jpg bin\temp\earth.qrcf
@bin\binsert 0x000FDAF0 bin\temp\Tiles\optimized\05.jpg bin\temp\earth.qrcf
@bin\binsert 0x00123B70 bin\temp\Tiles\optimized\06.jpg bin\temp\earth.qrcf
@bin\binsert 0x00149BF0 bin\temp\Tiles\optimized\07.jpg bin\temp\earth.qrcf
@bin\binsert 0x0016FC70 bin\temp\Tiles\optimized\08.jpg bin\temp\earth.qrcf
@bin\binsert 0x00195CF0 bin\temp\Tiles\optimized\09.jpg bin\temp\earth.qrcf
@bin\binsert 0x001BBD70 bin\temp\Tiles\optimized\10.jpg bin\temp\earth.qrcf
@bin\binsert 0x001E1DF0 bin\temp\Tiles\optimized\11.jpg bin\temp\earth.qrcf
@bin\binsert 0x00207E70 bin\temp\Tiles\optimized\12.jpg bin\temp\earth.qrcf
echo
@bin\binsert 0x0022DEF0 bin\temp\Tiles\optimized\13.jpg bin\temp\earth.qrcf
@bin\binsert 0x00253F70 bin\temp\Tiles\optimized\14.jpg bin\temp\earth.qrcf
@bin\binsert 0x00279FF0 bin\temp\Tiles\optimized\15.jpg bin\temp\earth.qrcf
@bin\binsert 0x002A0070 bin\temp\Tiles\optimized\16.jpg bin\temp\earth.qrcf
@bin\binsert 0x002C60F0 bin\temp\Tiles\optimized\17.jpg bin\temp\earth.qrcf
@bin\binsert 0x002EC170 bin\temp\Tiles\optimized\18.jpg bin\temp\earth.qrcf
@bin\binsert 0x003121F0 bin\temp\Tiles\optimized\19.jpg bin\temp\earth.qrcf
@bin\binsert 0x00338270 bin\temp\Tiles\optimized\20.jpg bin\temp\earth.qrcf
@bin\binsert 0x0035E2F0 bin\temp\Tiles\optimized\21.jpg bin\temp\earth.qrcf
@bin\binsert 0x00384370 bin\temp\Tiles\optimized\22.jpg bin\temp\earth.qrcf
@bin\binsert 0x003AA3F0 bin\temp\Tiles\optimized\23.jpg bin\temp\earth.qrcf
@bin\binsert 0x003D0470 bin\temp\Tiles\optimized\24.jpg bin\temp\earth.qrcf
echo Completed: Cloud layer injected
@bin\binsert 0x004790B0 bin\temp\Tiles\optimized\25.jpg bin\temp\earth.qrcf
@bin\binsert 0x0049F130 bin\temp\Tiles\optimized\26.jpg bin\temp\earth.qrcf
@bin\binsert 0x004C51B0 bin\temp\Tiles\optimized\27.jpg bin\temp\earth.qrcf
@bin\binsert 0x004EB230 bin\temp\Tiles\optimized\28.jpg bin\temp\earth.qrcf
@bin\binsert 0x005112B0 bin\temp\Tiles\optimized\29.jpg bin\temp\earth.qrcf
@bin\binsert 0x00537330 bin\temp\Tiles\optimized\30.jpg bin\temp\earth.qrcf
@bin\binsert 0x0055D3B0 bin\temp\Tiles\optimized\31.jpg bin\temp\earth.qrcf
@bin\binsert 0x00583430 bin\temp\Tiles\optimized\32.jpg bin\temp\earth.qrcf
@bin\binsert 0x005A94B0 bin\temp\Tiles\optimized\33.jpg bin\temp\earth.qrcf
@bin\binsert 0x005CF530 bin\temp\Tiles\optimized\34.jpg bin\temp\earth.qrcf
@bin\binsert 0x005F55B0 bin\temp\Tiles\optimized\35.jpg bin\temp\earth.qrcf
echo .
@bin\binsert 0x0061B630 bin\temp\Tiles\optimized\36.jpg bin\temp\earth.qrcf
@bin\binsert 0x006416B0 bin\temp\Tiles\optimized\37.jpg bin\temp\earth.qrcf
@bin\binsert 0x00667730 bin\temp\Tiles\optimized\38.jpg bin\temp\earth.qrcf
@bin\binsert 0x0068D7B0 bin\temp\Tiles\optimized\39.jpg bin\temp\earth.qrcf
@bin\binsert 0x006B3830 bin\temp\Tiles\optimized\40.jpg bin\temp\earth.qrcf
@bin\binsert 0x006D98B0 bin\temp\Tiles\optimized\41.jpg bin\temp\earth.qrcf
@bin\binsert 0x006FF930 bin\temp\Tiles\optimized\42.jpg bin\temp\earth.qrcf
@bin\binsert 0x007259B0 bin\temp\Tiles\optimized\43.jpg bin\temp\earth.qrcf
@bin\binsert 0x0074BA30 bin\temp\Tiles\optimized\44.jpg bin\temp\earth.qrcf
@bin\binsert 0x00771AB0 bin\temp\Tiles\optimized\45.jpg bin\temp\earth.qrcf
@bin\binsert 0x00797B30 bin\temp\Tiles\optimized\46.jpg bin\temp\earth.qrcf
@bin\binsert 0x007BDBB0 bin\temp\Tiles\optimized\47.jpg bin\temp\earth.qrcf
@bin\binsert 0x007E3C30 bin\temp\Tiles\optimized\48.jpg bin\temp\earth.qrcf
echo Completed: Ground layer injected
@bin\binsert 0x00809CB0 bin\temp\Tiles\optimized\49.jpg bin\temp\earth.qrcf
@bin\binsert 0x00817070 bin\temp\Tiles\optimized\50.jpg bin\temp\earth.qrcf
@bin\binsert 0x00824430 bin\temp\Tiles\optimized\51.jpg bin\temp\earth.qrcf
@bin\binsert 0x008317F0 bin\temp\Tiles\optimized\52.jpg bin\temp\earth.qrcf
@bin\binsert 0x0083EBB0 bin\temp\Tiles\optimized\53.jpg bin\temp\earth.qrcf
@bin\binsert 0x0084BF70 bin\temp\Tiles\optimized\54.jpg bin\temp\earth.qrcf
@bin\binsert 0x00859330 bin\temp\Tiles\optimized\55.jpg bin\temp\earth.qrcf
@bin\binsert 0x008666F0 bin\temp\Tiles\optimized\56.jpg bin\temp\earth.qrcf
@bin\binsert 0x00873AB0 bin\temp\Tiles\optimized\57.jpg bin\temp\earth.qrcf
@bin\binsert 0x00880E70 bin\temp\Tiles\optimized\58.jpg bin\temp\earth.qrcf
@bin\binsert 0x0088E230 bin\temp\Tiles\optimized\59.jpg bin\temp\earth.qrcf
echo .
@bin\binsert 0x0089B5F0 bin\temp\Tiles\optimized\60.jpg bin\temp\earth.qrcf
@bin\binsert 0x008A89B0 bin\temp\Tiles\optimized\61.jpg bin\temp\earth.qrcf
@bin\binsert 0x008B5D70 bin\temp\Tiles\optimized\62.jpg bin\temp\earth.qrcf
@bin\binsert 0x008C3130 bin\temp\Tiles\optimized\63.jpg bin\temp\earth.qrcf
@bin\binsert 0x008D04F0 bin\temp\Tiles\optimized\64.jpg bin\temp\earth.qrcf
@bin\binsert 0x008DD8B0 bin\temp\Tiles\optimized\65.jpg bin\temp\earth.qrcf
@bin\binsert 0x008EAC70 bin\temp\Tiles\optimized\66.jpg bin\temp\earth.qrcf
@bin\binsert 0x008F8030 bin\temp\Tiles\optimized\67.jpg bin\temp\earth.qrcf
@bin\binsert 0x009053F0 bin\temp\Tiles\optimized\68.jpg bin\temp\earth.qrcf
@bin\binsert 0x009127B0 bin\temp\Tiles\optimized\69.jpg bin\temp\earth.qrcf
@bin\binsert 0x0091FB70 bin\temp\Tiles\optimized\70.jpg bin\temp\earth.qrcf
@bin\binsert 0x0092CF30 bin\temp\Tiles\optimized\71.jpg bin\temp\earth.qrcf
@bin\binsert 0x0093A2F0 bin\temp\Tiles\optimized\72.jpg bin\temp\earth.qrcf
echo.
echo Completed: All jpgs injected into base QRCF..Compressing...
echo.
bin\zlib.exe -c "bin\temp\earth.qrcf" earth.qrc -h
echo Completed: earth.qrcf compressed to earth.qrc
echo.
if exist bin\temp\earth.qrcf echo QRCF successfully created
if not exist bin\temp\earth.qrcf echo ERROR - QRCF PROCESS FAILED
echo .
if exist earth.qrc echo PROCESS COMPLETED - QRC successfully created
if not exist earth.qrc echo ERROR - QRC PROCESS FAILED
echo .
echo Do you want to return to the options menu
@pause
goto options
:file_not_found_tile
echo Check your files - tile.jpg not found
@pause
goto options
:file_not_found_face
echo Check your files - face.jpg not found
@pause
goto options
:file_not_found_cubemap
echo Check your files - cubemap jpg not found
@pause
goto options
:file_not_found_logo
echo Check your files - logo.jpg not found
@pause
goto options
:file_not_found_fill
echo Check your files - fill.jpg not found
@pause
goto options
:file_not_found_banner
echo Check your files - banner.jpg not found
@pause
goto options
:file_not_found_0
echo Check your files - 0.jpg not found
@pause
goto options
:file_not_found_1
echo Check your files - 1.jpg not found
@pause
goto options
:file_not_found_2
echo Check your files - 2.jpg not found
@pause
goto options
:file_not_found_3
echo Check your files - 3.jpg not found
@pause
goto options
:file_not_found_4
echo Check your files - 4.jpg not found
@pause
goto options
:file_not_found_5
echo Check your files - 5.jpg not found
@pause
goto options
:files_not_found_tiles
echo Check your files - 01.jpg to 24.jpg not found in bin\temp\optimized\
@pause
goto options

Here is the main screen with some info about the jpgs it requires:
upload_2020-1-29_18-22-13.png



Here is what it can do, please whoever can do it test it out. Its now 1200 lines approx and getting kind of hard to work on. :)
upload_2020-1-29_18-24-28.png



Basically it looks for those jpgs with names like mentioned above in the root folder., it will work with whatever of the 3 it finds, or all 3, So for example if you dont want to inject a clouds layer, dont put a *_clouds.jpg in the folder and so on.

It will optimize the cloud layer and ground layer jpgs to 150KB each approx, and the specular layer jpgs to 50KB approx.

This can take 3 proper 4096x3072 cubemaps of a planet and cut them up into 72 jpgs and inject them and create a qrc up to 9.5MB
 

Attachments

Last edited:
Small hotfix applied to the file above... If you already got it please get beta2 instead. beta1 works fine 99% of the time, but the optimization that jpegoptim does is very approximate. I had it set to optimize all cloud and ground jpegs to 145KB but in one test it still allowed a jpg to exceed the maximum 152KB. I have reduced the max filesize to 143KB now, this should mean they stay under 152KB...it would of course be better if I had more exact optimization.

Anyway if you get a qrc that wont work, you can always check the filesizes in the bin\temp\Tiles\optimized folder. If any of those are over 152KB it will create a bad QRC...its unlikely to happen now with beta2 but every images is different so its hard to know.
 
Last edited:
Venus with water: The first oversized earth.qrc released at 5MB approx. :) i have run this for about 30 minutes with no freezes.

Some people might not have room for these bigger QRCs, that is your own problem. Delete some crap from flash :D

Great quality images. I made a custom specular layer for this too.

venus7.jpg


venus1.jpg venus2.jpg venus3.jpg venus4.jpg venus5.jpg venus6.jpg
 

Attachments

fictional planet Ceres

Ceres exist... :P It is a dwarf planet in first planetoid belt (like i.e Pluton on second planetoid belt). But she of course doesn't looks like Yours.

Your specular maps are to bright IMO. The lighter surface is, stronger "HDR" is used.

Binsert was created for me to do some easy task around 15 years ago, that's why is in Polish. If someone want translation of whole help, I can make it.
 
Ceres exist... :P It is a dwarf planet in first planetoid belt (like i.e Pluton on second planetoid belt). But she of course doesn't looks like Yours.
Ah ok, I did nt know that. I just got it from here: https://www.solarsystemscope.com/textures/
upload_2020-1-29_22-59-43.png


BTW: Binsert was created for me to do some easy task around 15 years ago, that's why is in Polish. If someone want translation of whole help, I can make it.
Can we just hex edit it to say stuff like "patched" etc instead of zxvzxvzxvzxv :D
 
Here is v1.5 of the BAT, many credits to pink1, sandungas and berion for all the help, would not be possible without you.

Here is a video of me using it to inject 2 cubemaps of Venus. Super easy now, just takes 2 minutes to make your own earth.qrc.


This works with qrc and qrcf extensions now to match pink1s application. When it completes you will find a QRC in the root folder, and a QRCF in the temp folder. Also the base template file is a QRCF.

Note: Option 1,2 and 3 are the only options that work with all 3 layers. The other options just work with the top clouds layer.

WARNING: Creating earth.qrc files larger than the official one is experimental and I have labeled this version a beta. It seems fine in my recent tests, earlier freezes seemed to be caused by jpegoptim not being 100# accurate.

I have also removed the official folder creation as it was being a pain for some reason. Its not required anyway for these apps to work.

Code:
cls
@echo off
echo                         +----------------------+
echo                               QRC Injector
echo                                   v1.5
echo                           Support at PSX-Place
echo                         +----------------------+
echo.
echo                             JPG REQUIREMENTS:
echo.              If using tile_clouds.jpg it must be 512x512
echo.              If using tile_ground.jpg it must be 512x512
echo.              If using tile_specular.jpg it must be 512x512
echo               If using face_clouds.jpg it must be 1024x1024
echo               If using face_ground.jpg it must be 1024x1024
echo               If using face_specular.jpg it must be 1024x1024
echo               If using cubemap_clouds.jpg it must be 4096x3072
echo               If using cubemap_ground.jpg it must be 4096x3072
echo               If using cubemap_specular.jpg it must be 4096x3072
echo               If using logo.jpg and fill.jpg they must be 1024x1024
echo               If using 0.jpg to 5.jpg they must all be 1024x1024
echo               If using banner.jpg it must be 4096x512 fill.jpg 1024x1024  
@pause
:options
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo +------------------------------------------------------------------------------+
echo                             QRC Injector v1.5
echo.
echo                               OPTIONS MENU
echo +------------------------------------------------------------------------------+
echo.
echo                        SELECT AN OPTION FROM 1 to 9
echo +------------------------------------------------------------------------------+
echo 1) Apply tile_clouds.jpg tile_ground.jpg and tile_specular.jpg to all 72 slots
echo 2) Apply face_clouds.jpg face_ground.jpg face_specular.jpg to all 6 faces
echo 3) Apply cubemap_clouds.jpg cubemap_ground.jpg and cubemap_specular.jpg
echo 4) Apply logo.jpg to only 2 opposite faces on the equator, fill.jpg the rest
echo 5) Apply logo.jpg to 4 faces around the equator, fill.jpg north+south
echo 6) Apply individual 0.jpg to 5.jpg to the 6 faces
echo 7) Apply banner.jpg all around the equator like a belt
echo 8) Clone tile.jpg into tiled 4096x2048 jpeg ready for cubemap generator
echo 9) Clone tile.jpg into tiled 8192x4096 jpeg ready for cubemap generator
echo.
echo.
echo.
echo.
set /p op=Type option:
if "%op%"=="1" goto tile_to_qrc_info
if "%op%"=="2" goto face_to_qrc_info
if "%op%"=="3" goto cubemap_to_qrc_info
if "%op%"=="4" goto logo1_info
if "%op%"=="5" goto logo2_info
if "%op%"=="6" goto 6_sides_info
if "%op%"=="7" goto banner_info
if "%op%"=="8" goto create_4k_from_512x512_info
if "%op%"=="9" goto create_8k_from_512x512_info
:tile_to_qrc_info
echo .
echo You chose to inject tile_clouds.jpg tile_ground.jpg and tile_specular.jpg (512x512)
echo The jpgs will be applied to every one of the 24 slots in all 3 layers
echo Working....
goto tile_to_qrc
:face_to_qrc_info
echo .
echo You chose to inject face.jpg (1024x1024) to earth.qrc
echo The jpg will be applied to every one of the 6 cube faces in all 3 layers
echo Working....
goto face_to_qrc
:cubemap_to_qrc_info
echo .
echo You chose to inject cubemap.jpg (4096x3072) to earth.qrc
echo The 3 cubemap jpgs will be applied all around the cube in all 3 layers
echo Working....
goto cubemap_to_qrc
:logo1_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied front + back faces, fill.jpg on sides + top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo_to_qrc
:logo2_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied to front + back + side faces, fill.jpg to top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo2_to_qrc
:banner_info
echo .
echo You chose to inject banner.jpg (4096x512) to earth.qrc
echo The banner.jpg will be applied all around the equator lke a belt
if not exist banner.jpg goto file_not_found_banner
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto banner_to_qrc
:6_sides_info
echo .
echo You chose to inject 6 individual sides 0.jpg to 5.jpg (1024x1024) to earth.qrc
echo These will be applied to every face using official numbering of the faces
if not exist 0.jpg goto file_not_found_0
if not exist 1.jpg goto file_not_found_1
if not exist 2.jpg goto file_not_found_2
if not exist 3.jpg goto file_not_found_3
if not exist 4.jpg goto file_not_found_4
if not exist 5.jpg goto file_not_found_5
echo Working....
goto 6_sides_to_qrc
:create_4k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 4096x2048 jpg
echo The tile.jpg will be prepared into 4k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_4k_from_512x512
:create_8k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 8192x4096 jpg.
echo The tile.jpg will be prepared into 8k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_8k_from_512x512
:create_4k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile 4096x2048.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 1 of 4 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 2 of 4 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 3 of 4 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 4 of 4 completed successfully
echo .
if exist 4096x2048.jpg echo PROCESS COMPLETED
if not exist 4096x2048.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:create_8k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile temp.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile temp.jpg temp.jpg
echo Step 1 of 8 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile temp.jpg temp.jpg
echo Step 2 of 8 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile temp.jpg temp.jpg
echo Step 3 of 8 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile temp.jpg temp.jpg
echo Step 4 of 8 completed successfully
bin\jpegtran -crop 8192x4096+0+0 -outfile 8192x4096.jpg temp.jpg
echo .
echo Step 5 of 8 completed successfully
bin\jpegtran -drop +4096+0 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 6 of 8 completed successfully
bin\jpegtran -drop +0+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 7 of 8 completed successfully
bin\jpegtran -drop +4096+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 8 of 8 completed successfully
DEL "temp.jpg" /Q /S
echo .
if exist 8192x4096.jpg echo PROCESS COMPLETED
if not exist 8192x4096.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:tile_to_qrc
echo .
@if exist earth.qrc DEL "earth.qrc" /Q /S
echo earth.qrc cleared
@if exist "bin\temp\" DEL "bin\temp" /Q /S
echo .
@if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
@if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_clouds.jpg tile_clouds.jpg
bin\jpegtran -drop +512+0 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -drop +512+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
echo .
bin\jpegtran -drop +512+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -drop +0+512 tile_clouds.jpg -outfile bin\temp\face_clouds.jpg bin\temp\face_clouds.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_clouds.jpg bin\temp\face_clouds.jpg
echo Completed: tile_clouds.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_ground.jpg tile_ground.jpg
bin\jpegtran -drop +512+0 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -drop +512+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
echo .
bin\jpegtran -drop +512+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -drop +0+512 tile_ground.jpg -outfile bin\temp\face_ground.jpg bin\temp\face_ground.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_ground.jpg bin\temp\face_ground.jpg
echo Completed: tile_ground.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face_specular.jpg tile_specular.jpg
bin\jpegtran -drop +512+0 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -drop +512+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
echo .
bin\jpegtran -drop +512+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -drop +0+512 tile_specular.jpg -outfile bin\temp\face_specular.jpg bin\temp\face_specular.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_specular.jpg bin\temp\face_specular.jpg
echo Completed: tile_specular.jpg cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -drop +1024+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo Completed: face_clouds.jpg cloned into 4096x3072 cubemap cross (clouds)
bin\jpegtran -drop +1024+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo Completed: face_ground.jpg cloned into 4096x3072 cubemap cross (ground)
bin\jpegtran -drop +1024+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +0+1024 bin\temp\face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo Completed: face_specular.jpg cloned into 4096x3072 cubemap cross (specular)
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap_clouds.jpg" "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_ground.jpg" "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_specular.jpg" "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:face_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_clouds.jpg face_clouds.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_ground.jpg face_ground.jpg
echo.
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap_specular.jpg face_specular.jpg
echo Completed: Cubemap templates created
bin\jpegtran -drop +1024+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +1024+2048 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo .
bin\jpegtran -drop +2048+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +3072+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
bin\jpegtran -drop +0+1024 face_clouds.jpg -outfile bin\temp\cubemap_clouds.jpg bin\temp\cubemap_clouds.jpg
echo Completed: face_clouds.jpg cloned into 4096x3072 cubemap_clouds.jpg
bin\jpegtran -drop +1024+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +1024+2048 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo .
bin\jpegtran -drop +2048+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +3072+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
bin\jpegtran -drop +0+1024 face_ground.jpg -outfile bin\temp\cubemap_ground.jpg bin\temp\cubemap_ground.jpg
echo Completed: face_ground.jpg cloned into 4096x3072 cubemap_ground.jpg
bin\jpegtran -drop +1024+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +1024+2048 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo .
bin\jpegtran -drop +2048+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +3072+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
bin\jpegtran -drop +0+1024 face_specular.jpg -outfile bin\temp\cubemap_specular.jpg bin\temp\cubemap_specular.jpg
echo Completed: face_specular.jpg cloned into 4096x3072 cubemap_specular.jpg
bin\jpegtran -rotate 180 "bin\temp\cubemap_clouds.jpg" "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 "bin\temp\cubemap_ground.jpg" "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap_specular.jpg" "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:cubemap_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
echo .
bin\jpegtran -rotate 180 cubemap_clouds.jpg "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg"
bin\jpegtran -rotate 180 cubemap_ground.jpg "bin\temp\Cube_faces\cubemap_ground_rotated.jpg"
bin\jpegtran -rotate 180 cubemap_specular.jpg "bin\temp\Cube_faces\cubemap_specular_rotated.jpg"
echo Completed: cubemaps rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_clouds_rotated.jpg" "bin\temp\Cube_faces\clouds_face5.jpg"
echo Completed: 6 cloud faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_ground_rotated.jpg" "bin\temp\Cube_faces\ground_face5.jpg"
echo Completed: 6 ground faces created
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face2.jpg"
echo .
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_specular_rotated.jpg" "bin\temp\Cube_faces\specular_face5.jpg"
echo Completed: 6 specular faces created
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\06.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\clouds_face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\25.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\26.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\27.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face0.jpg" "bin\temp\Tiles\28.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\29.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\30.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\31.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face1.jpg" "bin\temp\Tiles\32.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\33.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\34.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\35.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face2.jpg" "bin\temp\Tiles\36.jpg"
echo Completed: 36 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\37.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\38.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\39.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face3.jpg" "bin\temp\Tiles\40.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\41.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\42.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\43.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face4.jpg" "bin\temp\Tiles\44.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\45.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\46.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\47.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\ground_face5.jpg" "bin\temp\Tiles\48.jpg"
echo Completed: 48 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\49.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\50.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\51.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face0.jpg" "bin\temp\Tiles\52.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\53.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\54.jpg"
echo .
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\55.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face1.jpg" "bin\temp\Tiles\56.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\57.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\58.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\59.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face2.jpg" "bin\temp\Tiles\60.jpg"
echo Completed: 60 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\61.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\62.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\63.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face3.jpg" "bin\temp\Tiles\64.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\65.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\66.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\67.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face4.jpg" "bin\temp\Tiles\68.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\69.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\70.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\71.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\specular_face5.jpg" "bin\temp\Tiles\72.jpg"
echo Completed: 72 out of 72 jpgs cut
goto optimize_72_parts
:logo_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo Completed: Face 0.jpg to 5.jpg cut out
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 72 jpg tiles cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 72 jpg tiles cut
goto optimize_72_parts
:logo2_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and logo.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:6_sides_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg 4.jpg
echo .
bin\jpegtran -drop +3072+1024 0.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 1.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+1024 2.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 3.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 5.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: 0.jpg to 5.jpg made into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:banner_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1280 banner.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: banner.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 24 out of 72 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_72_parts
:optimize_72_parts
echo .
@copy "bin\temp\Tiles\*.jpg" "bin\temp\Tiles\optimized\*.jpg"
echo Completed: Files copied ready for optimizing
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\01.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\02.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\03.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\04.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\05.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\06.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\07.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\08.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\09.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\10.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\11.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\12.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\13.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\14.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\15.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\16.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\17.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\18.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\19.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\20.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\21.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\22.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\23.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\24.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\25.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\26.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\27.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\28.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\29.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\30.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\31.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\32.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\33.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\34.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\35.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\36.jpg"
echo .
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\37.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\38.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\39.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\40.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\41.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\42.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\43.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\44.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\45.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\46.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\47.jpg"
@bin\jpegoptim --size=145k "bin\temp\Tiles\optimized\48.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\49.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\50.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\51.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\52.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\53.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\54.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\55.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\56.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\57.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\58.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\59.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\60.jpg"
echo .
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\61.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\62.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\63.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\64.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\65.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\66.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\67.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\68.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\69.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\70.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\71.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\72.jpg"
echo Completed: Optimized jpgs to correct size for each available slot
:inject_72_parts
@copy bin\earth_template.qrcf bin\temp\earth.qrcf
echo .
echo Completed: Base template created
echo .
@bin\binsert 0x000658F0 bin\temp\Tiles\optimized\01.jpg bin\temp\earth.qrcf
@bin\binsert 0x0008B970 bin\temp\Tiles\optimized\02.jpg bin\temp\earth.qrcf
@bin\binsert 0x000B19F0 bin\temp\Tiles\optimized\03.jpg bin\temp\earth.qrcf
@bin\binsert 0x000D7A70 bin\temp\Tiles\optimized\04.jpg bin\temp\earth.qrcf
@bin\binsert 0x000FDAF0 bin\temp\Tiles\optimized\05.jpg bin\temp\earth.qrcf
@bin\binsert 0x00123B70 bin\temp\Tiles\optimized\06.jpg bin\temp\earth.qrcf
@bin\binsert 0x00149BF0 bin\temp\Tiles\optimized\07.jpg bin\temp\earth.qrcf
@bin\binsert 0x0016FC70 bin\temp\Tiles\optimized\08.jpg bin\temp\earth.qrcf
@bin\binsert 0x00195CF0 bin\temp\Tiles\optimized\09.jpg bin\temp\earth.qrcf
@bin\binsert 0x001BBD70 bin\temp\Tiles\optimized\10.jpg bin\temp\earth.qrcf
@bin\binsert 0x001E1DF0 bin\temp\Tiles\optimized\11.jpg bin\temp\earth.qrcf
@bin\binsert 0x00207E70 bin\temp\Tiles\optimized\12.jpg bin\temp\earth.qrcf
echo
@bin\binsert 0x0022DEF0 bin\temp\Tiles\optimized\13.jpg bin\temp\earth.qrcf
@bin\binsert 0x00253F70 bin\temp\Tiles\optimized\14.jpg bin\temp\earth.qrcf
@bin\binsert 0x00279FF0 bin\temp\Tiles\optimized\15.jpg bin\temp\earth.qrcf
@bin\binsert 0x002A0070 bin\temp\Tiles\optimized\16.jpg bin\temp\earth.qrcf
@bin\binsert 0x002C60F0 bin\temp\Tiles\optimized\17.jpg bin\temp\earth.qrcf
@bin\binsert 0x002EC170 bin\temp\Tiles\optimized\18.jpg bin\temp\earth.qrcf
@bin\binsert 0x003121F0 bin\temp\Tiles\optimized\19.jpg bin\temp\earth.qrcf
@bin\binsert 0x00338270 bin\temp\Tiles\optimized\20.jpg bin\temp\earth.qrcf
@bin\binsert 0x0035E2F0 bin\temp\Tiles\optimized\21.jpg bin\temp\earth.qrcf
@bin\binsert 0x00384370 bin\temp\Tiles\optimized\22.jpg bin\temp\earth.qrcf
@bin\binsert 0x003AA3F0 bin\temp\Tiles\optimized\23.jpg bin\temp\earth.qrcf
@bin\binsert 0x003D0470 bin\temp\Tiles\optimized\24.jpg bin\temp\earth.qrcf
echo Completed: Cloud layer injected
@bin\binsert 0x004790B0 bin\temp\Tiles\optimized\25.jpg bin\temp\earth.qrcf
@bin\binsert 0x0049F130 bin\temp\Tiles\optimized\26.jpg bin\temp\earth.qrcf
@bin\binsert 0x004C51B0 bin\temp\Tiles\optimized\27.jpg bin\temp\earth.qrcf
@bin\binsert 0x004EB230 bin\temp\Tiles\optimized\28.jpg bin\temp\earth.qrcf
@bin\binsert 0x005112B0 bin\temp\Tiles\optimized\29.jpg bin\temp\earth.qrcf
@bin\binsert 0x00537330 bin\temp\Tiles\optimized\30.jpg bin\temp\earth.qrcf
@bin\binsert 0x0055D3B0 bin\temp\Tiles\optimized\31.jpg bin\temp\earth.qrcf
@bin\binsert 0x00583430 bin\temp\Tiles\optimized\32.jpg bin\temp\earth.qrcf
@bin\binsert 0x005A94B0 bin\temp\Tiles\optimized\33.jpg bin\temp\earth.qrcf
@bin\binsert 0x005CF530 bin\temp\Tiles\optimized\34.jpg bin\temp\earth.qrcf
@bin\binsert 0x005F55B0 bin\temp\Tiles\optimized\35.jpg bin\temp\earth.qrcf
echo .
@bin\binsert 0x0061B630 bin\temp\Tiles\optimized\36.jpg bin\temp\earth.qrcf
@bin\binsert 0x006416B0 bin\temp\Tiles\optimized\37.jpg bin\temp\earth.qrcf
@bin\binsert 0x00667730 bin\temp\Tiles\optimized\38.jpg bin\temp\earth.qrcf
@bin\binsert 0x0068D7B0 bin\temp\Tiles\optimized\39.jpg bin\temp\earth.qrcf
@bin\binsert 0x006B3830 bin\temp\Tiles\optimized\40.jpg bin\temp\earth.qrcf
@bin\binsert 0x006D98B0 bin\temp\Tiles\optimized\41.jpg bin\temp\earth.qrcf
@bin\binsert 0x006FF930 bin\temp\Tiles\optimized\42.jpg bin\temp\earth.qrcf
@bin\binsert 0x007259B0 bin\temp\Tiles\optimized\43.jpg bin\temp\earth.qrcf
@bin\binsert 0x0074BA30 bin\temp\Tiles\optimized\44.jpg bin\temp\earth.qrcf
@bin\binsert 0x00771AB0 bin\temp\Tiles\optimized\45.jpg bin\temp\earth.qrcf
@bin\binsert 0x00797B30 bin\temp\Tiles\optimized\46.jpg bin\temp\earth.qrcf
@bin\binsert 0x007BDBB0 bin\temp\Tiles\optimized\47.jpg bin\temp\earth.qrcf
@bin\binsert 0x007E3C30 bin\temp\Tiles\optimized\48.jpg bin\temp\earth.qrcf
echo Completed: Ground layer injected
@bin\binsert 0x00809CB0 bin\temp\Tiles\optimized\49.jpg bin\temp\earth.qrcf
@bin\binsert 0x00817070 bin\temp\Tiles\optimized\50.jpg bin\temp\earth.qrcf
@bin\binsert 0x00824430 bin\temp\Tiles\optimized\51.jpg bin\temp\earth.qrcf
@bin\binsert 0x008317F0 bin\temp\Tiles\optimized\52.jpg bin\temp\earth.qrcf
@bin\binsert 0x0083EBB0 bin\temp\Tiles\optimized\53.jpg bin\temp\earth.qrcf
@bin\binsert 0x0084BF70 bin\temp\Tiles\optimized\54.jpg bin\temp\earth.qrcf
@bin\binsert 0x00859330 bin\temp\Tiles\optimized\55.jpg bin\temp\earth.qrcf
@bin\binsert 0x008666F0 bin\temp\Tiles\optimized\56.jpg bin\temp\earth.qrcf
@bin\binsert 0x00873AB0 bin\temp\Tiles\optimized\57.jpg bin\temp\earth.qrcf
@bin\binsert 0x00880E70 bin\temp\Tiles\optimized\58.jpg bin\temp\earth.qrcf
@bin\binsert 0x0088E230 bin\temp\Tiles\optimized\59.jpg bin\temp\earth.qrcf
echo .
@bin\binsert 0x0089B5F0 bin\temp\Tiles\optimized\60.jpg bin\temp\earth.qrcf
@bin\binsert 0x008A89B0 bin\temp\Tiles\optimized\61.jpg bin\temp\earth.qrcf
@bin\binsert 0x008B5D70 bin\temp\Tiles\optimized\62.jpg bin\temp\earth.qrcf
@bin\binsert 0x008C3130 bin\temp\Tiles\optimized\63.jpg bin\temp\earth.qrcf
@bin\binsert 0x008D04F0 bin\temp\Tiles\optimized\64.jpg bin\temp\earth.qrcf
@bin\binsert 0x008DD8B0 bin\temp\Tiles\optimized\65.jpg bin\temp\earth.qrcf
@bin\binsert 0x008EAC70 bin\temp\Tiles\optimized\66.jpg bin\temp\earth.qrcf
@bin\binsert 0x008F8030 bin\temp\Tiles\optimized\67.jpg bin\temp\earth.qrcf
@bin\binsert 0x009053F0 bin\temp\Tiles\optimized\68.jpg bin\temp\earth.qrcf
@bin\binsert 0x009127B0 bin\temp\Tiles\optimized\69.jpg bin\temp\earth.qrcf
@bin\binsert 0x0091FB70 bin\temp\Tiles\optimized\70.jpg bin\temp\earth.qrcf
@bin\binsert 0x0092CF30 bin\temp\Tiles\optimized\71.jpg bin\temp\earth.qrcf
@bin\binsert 0x0093A2F0 bin\temp\Tiles\optimized\72.jpg bin\temp\earth.qrcf
echo.
echo Completed: All jpgs injected into base QRCF..Compressing...
echo.
bin\zlib.exe -c "bin\temp\earth.qrcf" earth.qrc -h
echo Completed: earth.qrcf compressed to earth.qrc
echo.
if exist bin\temp\earth.qrcf echo QRCF successfully created
if not exist bin\temp\earth.qrcf echo ERROR - QRCF PROCESS FAILED
echo .
if exist earth.qrc echo PROCESS COMPLETED - QRC successfully created
if not exist earth.qrc echo ERROR - QRC PROCESS FAILED
echo .
echo Do you want to return to the options menu
@pause
goto options
:file_not_found_tile
echo Check your files - tile.jpg not found
@pause
goto options
:file_not_found_face
echo Check your files - face.jpg not found
@pause
goto options
:file_not_found_cubemap
echo Check your files - cubemap jpg not found
@pause
goto options
:file_not_found_logo
echo Check your files - logo.jpg not found
@pause
goto options
:file_not_found_fill
echo Check your files - fill.jpg not found
@pause
goto options
:file_not_found_banner
echo Check your files - banner.jpg not found
@pause
goto options
:file_not_found_0
echo Check your files - 0.jpg not found
@pause
goto options
:file_not_found_1
echo Check your files - 1.jpg not found
@pause
goto options
:file_not_found_2
echo Check your files - 2.jpg not found
@pause
goto options
:file_not_found_3
echo Check your files - 3.jpg not found
@pause
goto options
:file_not_found_4
echo Check your files - 4.jpg not found
@pause
goto options
:file_not_found_5
echo Check your files - 5.jpg not found
@pause
goto options
:files_not_found_tiles
echo Check your files - 01.jpg to 24.jpg not found in bin\temp\optimized\
@pause
goto options

Here is the main screen with some info about the jpgs it requires:
View attachment 23359


Here is what it can do, please whoever can do it test it out. Its now 1200 lines approx and getting kind of hard to work on. :)
View attachment 23360


Basically it looks for those jpgs with names like mentioned above in the root folder., it will work with whatever of the 3 it finds, or all 3, So for example if you dont want to inject a clouds layer, dont put a *_clouds.jpg in the folder and so on.

It will optimize the cloud layer and ground layer jpgs to 150KB each approx, and the specular layer jpgs to 50KB approx.

This can take 3 proper 4096x3072 cubemaps of a planet and cut them up into 72 jpgs and inject them and create a qrc up to 9.5MB
You're really moving along with this I hadn't realized how much you had it doing.
 
You're really moving along with this I hadn't realized how much you had it doing.
I kinda cheated. Using your tool I injected 48 x 152KB textures and 24 x 52KB textures, then i saved that QRC file at 9.5MB...Then i went in with a hex editor and replaced all 72 images with a 1KB black jpg and zero filled the rest of the space.... Now i have a 9.5MB QRC template,, that has room for 9.5MB of jpgs if it needs it but will of course compress all the 00s with zlib, so no real harm done.. :) Gotta do what you gotta do. :)
 
You want hexediting a program which was published with source code? ;)

Oh, that's it. I never thinking of Polish in such way. British peoples i.e says that we rustling. :)
 
You want hexediting a program which was published with source code? ;)
Yes, it will take me 2 minutes to hex edit it, how long will it take me to learn how to compile the source? I am all about making life easy here.


BTW, I think we will have fun with starfield mods. :) I have just learned we are in a giant cube :)

star_mod0.jpg


star_mod11.jpg



star_mod.jpg star_mod2.jpg star_mod3.jpg star_mod4.jpg star_mod5.jpg star_mod6.jpgstar_mod8.jpg star_mod9.jpg star_mod10.jpg
 
Last edited:
You guys are doing a fantastic job!! I'm very impressed with all your findings. Congratulations to the team!

@DeViL303 I think the following web command should be useful for everyone, specially because it avoid the need to write to /dev_flash and you can have all the earth_*.qrc files in a folder (without having to worry about free space in /dev_flash) and select the one that you need .

http://localhost/remap.ps3/dev_flash/vsh/resource/qgl/earth.qrc&to=/dev_hdd0/tmp/earth_mamba.qrc

@xf505 I like a lot your uploads... keep the great job!
 
Last edited:
@aldostools That is a great idea, actually I was thinking about something that you might be able to help with :) .

I want to really push the limit soon, see what is possible. 50MB earth.qrc. :)

EDIT: 57MB tested successfully, no problem :)

What if we had 20 earth.qrcs in a folder on hdd. And then there was an autexec bat that went like this on every boot or something like that. This method could be used with the remap too.

Maybe there is simpler way though?
Code:
copy earth_01.qrc to dev_flash\vsh\resource\qgl\earth.qrc
rename earth_20.qrc to earth_00.qrc
rename earth_19.qrc to earth_20.qrc
rename earth_18.qrc to earth_19.qrc
rename earth_17.qrc to earth_18.qrc
rename earth_16.qrc to earth_17.qrc
rename earth_15.qrc to earth_16.qrc
rename earth_14.qrc to earth_15.qrc
rename earth_13.qrc to earth_14.qrc
rename earth_12.qrc to earth_13.qrc
rename earth_11.qrc to earth_12.qrc
rename earth_10.qrc to earth_11.qrc
rename earth_09.qrc to earth_10.qrc
rename earth_08.qrc to earth_09.qrc
rename earth_07.qrc to earth_08.qrc
rename earth_06.qrc to earth_07.qrc
rename earth_05.qrc to earth_06.qrc
rename earth_04.qrc to earth_05.qrc
rename earth_03.qrc to earth_04.qrc
rename earth_02.qrc to earth_03.qrc
rename earth_01.qrc to earth_02.qrc
rename earth_00.qrc to earth_01.qrc
 
Last edited:

Similar threads

Back
Top