Interactive instruction & Information In Image (i3i) Ove
Posted: 17.06.2006, 21:14
On top of Vincent's Celestia-1.4.1-Patch3, I created a new feature of interactive overlay image. For the time being, it is only in Win32 version. You can download the compiled pack and the modified source at:
http://www.provr.fsnet.co.uk/i3i.rar
1. ABOUT I3I FEATURE
=====================
It enables Celestia to load an overlay image (bmp, Jpg, png, the size of the image must be in 2's power) and use the hot sensor areas/buttons in the image to control and interact with Celestia.
For the time being, I have only built a Win32 version. Sorry for non-Win32 users, you need to build your own GUI.
2. INSTALLATION
=====================
(1) You must put celestia_1.4.1_patch_i3i.exe in the same folder where the normal celestia.exe is installed.
(2) I have provided for you a test file called keyboard.i3i. It is an editable text file and it associates with an image file called keyboard.png (this image can also be a *.bmp, *.jpg file of different name). Key this keyboard.i3i file and its associating image file in the SAME folder. I kept them within file folder I3I_TEST. You can put I3I_TEST folder in any directory.
(3) The I3I_TEST folder contains following files:
(a) celestia_1.4.1_patch_i3i_readme.txt
This current readme file
(b) default.bmp
Used by i3i_designer.exe as default image to load
(c) default.jpg
Used by i3i_designer.exe as default image to load
(d) default.png
Used by i3i_designer.exe as default image to load
(e) i3i_designer.exe
Image benchmarking programme
(f) I3I_designer.i3d
Native data file of image benchmarking programme
(g) keyboard.i3i
Generated, by the image benchmarking programme, editable i3i file for Celestia to load
(h) keyboard.png
Saved, by the image benchmarking programme, the overlay image file assocaited with the i3i file.
3. HOW TO RUN IT
=====================
--Activate celestia_1.4.1_patch_i3i.exe
--Select File menu
--Choose Load I3I... option
--From i3i_test folder, open keyboard.i3i file
--You will see a keyboard overlay appears in Celestia's window. Move your mouse cursor over the buttons H, J, K, L, an i3i hand-cursor appears
--Click H, J, K, or L button to interact with Celestia
--Press F9 key (in your key board) to toggle the overlay image.
I have provided only a few sensor buttons in the image. You can add more sensors by editing the keyboard.i3i file via a text editor. Because you must know the location of the sensor areas in relation to the image size, editing of keyboard.i3i file can be very laborious. I have built a very crude image benchmarking programme for you to generate the *.i3i file.
4. IMAGE BENCHMARKING
=====================
--Activate image benchmarking programme i3i_designer.exe, scrolling down the I3I_Designer window to see the default image (which is a rough keyboard image)
--You can use File->Import I3I Image option to load an bmp, jpg or png image if you do not want the default image. Remember to make sure that the image size must be kept in 2's power.
--Use View->Grid Lines or press g key in your keyboard to toggle the grid lines on and off.
--Use Rectangle drawing tool to draw a rectangle sensor area (e.g. around a button in the loaded image)
--Double click the rectangle just drawed to assign it the i3i properties:i3i SensorName and i3i SensorAction. Since the i3i SensorName is optional, you can leave it in the default name (Text). But for i3i SensorAction, you have to give it the correct command text if you want Celestia to be controlled by clicking the sensor area. For the keyboard image, if you have drawed a rectangle around button F, then you need to assign a letter F in the i3i SensorAction box. This will make this rectangle a sensor area to control switch Celestia in Follow mode.
Note: DO NOT OVERLAP ONE SENSOR AREA ON OTHERS
--Use File->Import I3I Image option to generate automatically the *.i3i file
--Use File->Save (or Save as) to save your benchmarking data (*.i3d) for later benchmarking session, so that your work in the current session will not be lost.
5. SOURCE CODE
=====================
I added the i3i feature on top of Vincent's celestia_1.4.1_patch3 version. However this feature does not rely on any modified code made by Vincent. You can build the i3i feature on top of the official Celestia source code by following changes:
(1) Modify the source code in following files. Search the word Zhao for the modified code blocks:
-- celestiacore.cpp
-- celestiacore.h
-- winmain.cpp
-- resource.h
-- celestia.rc
(2) Add following files to the new \src\celi3i folder:
-- celi3i.dsp
-- celi3i.vcproj
-- fileloading.cpp
-- fileloading.h
-- i3i.mak
-- sensori3i.cpp
-- sensori3i.h
(3) Add following i3i hand-pointer cursor file to the \src\celestia\res folder:
-- pointerhand.cur
6. SOURCE BUILD
=====================
You need first to get Vincent's celestia_1.4.1_patch3 source code. Then download my modified code in folder celestia-1.4.1. Copy everything from my celestia-1.4.1 folder to Vincent's celestia-1.4.1 folder.
Then you can compile the source either via Celestia.sln or using makerelease.bat file.
For non-Win32 users, you have to build your own GUI and do your own compilation files.
http://www.provr.fsnet.co.uk/i3i.rar
1. ABOUT I3I FEATURE
=====================
It enables Celestia to load an overlay image (bmp, Jpg, png, the size of the image must be in 2's power) and use the hot sensor areas/buttons in the image to control and interact with Celestia.
For the time being, I have only built a Win32 version. Sorry for non-Win32 users, you need to build your own GUI.
2. INSTALLATION
=====================
(1) You must put celestia_1.4.1_patch_i3i.exe in the same folder where the normal celestia.exe is installed.
(2) I have provided for you a test file called keyboard.i3i. It is an editable text file and it associates with an image file called keyboard.png (this image can also be a *.bmp, *.jpg file of different name). Key this keyboard.i3i file and its associating image file in the SAME folder. I kept them within file folder I3I_TEST. You can put I3I_TEST folder in any directory.
(3) The I3I_TEST folder contains following files:
(a) celestia_1.4.1_patch_i3i_readme.txt
This current readme file
(b) default.bmp
Used by i3i_designer.exe as default image to load
(c) default.jpg
Used by i3i_designer.exe as default image to load
(d) default.png
Used by i3i_designer.exe as default image to load
(e) i3i_designer.exe
Image benchmarking programme
(f) I3I_designer.i3d
Native data file of image benchmarking programme
(g) keyboard.i3i
Generated, by the image benchmarking programme, editable i3i file for Celestia to load
(h) keyboard.png
Saved, by the image benchmarking programme, the overlay image file assocaited with the i3i file.
3. HOW TO RUN IT
=====================
--Activate celestia_1.4.1_patch_i3i.exe
--Select File menu
--Choose Load I3I... option
--From i3i_test folder, open keyboard.i3i file
--You will see a keyboard overlay appears in Celestia's window. Move your mouse cursor over the buttons H, J, K, L, an i3i hand-cursor appears
--Click H, J, K, or L button to interact with Celestia
--Press F9 key (in your key board) to toggle the overlay image.
I have provided only a few sensor buttons in the image. You can add more sensors by editing the keyboard.i3i file via a text editor. Because you must know the location of the sensor areas in relation to the image size, editing of keyboard.i3i file can be very laborious. I have built a very crude image benchmarking programme for you to generate the *.i3i file.
4. IMAGE BENCHMARKING
=====================
--Activate image benchmarking programme i3i_designer.exe, scrolling down the I3I_Designer window to see the default image (which is a rough keyboard image)
--You can use File->Import I3I Image option to load an bmp, jpg or png image if you do not want the default image. Remember to make sure that the image size must be kept in 2's power.
--Use View->Grid Lines or press g key in your keyboard to toggle the grid lines on and off.
--Use Rectangle drawing tool to draw a rectangle sensor area (e.g. around a button in the loaded image)
--Double click the rectangle just drawed to assign it the i3i properties:i3i SensorName and i3i SensorAction. Since the i3i SensorName is optional, you can leave it in the default name (Text). But for i3i SensorAction, you have to give it the correct command text if you want Celestia to be controlled by clicking the sensor area. For the keyboard image, if you have drawed a rectangle around button F, then you need to assign a letter F in the i3i SensorAction box. This will make this rectangle a sensor area to control switch Celestia in Follow mode.
Note: DO NOT OVERLAP ONE SENSOR AREA ON OTHERS
--Use File->Import I3I Image option to generate automatically the *.i3i file
--Use File->Save (or Save as) to save your benchmarking data (*.i3d) for later benchmarking session, so that your work in the current session will not be lost.
5. SOURCE CODE
=====================
I added the i3i feature on top of Vincent's celestia_1.4.1_patch3 version. However this feature does not rely on any modified code made by Vincent. You can build the i3i feature on top of the official Celestia source code by following changes:
(1) Modify the source code in following files. Search the word Zhao for the modified code blocks:
-- celestiacore.cpp
-- celestiacore.h
-- winmain.cpp
-- resource.h
-- celestia.rc
(2) Add following files to the new \src\celi3i folder:
-- celi3i.dsp
-- celi3i.vcproj
-- fileloading.cpp
-- fileloading.h
-- i3i.mak
-- sensori3i.cpp
-- sensori3i.h
(3) Add following i3i hand-pointer cursor file to the \src\celestia\res folder:
-- pointerhand.cur
6. SOURCE BUILD
=====================
You need first to get Vincent's celestia_1.4.1_patch3 source code. Then download my modified code in folder celestia-1.4.1. Copy everything from my celestia-1.4.1 folder to Vincent's celestia-1.4.1 folder.
Then you can compile the source either via Celestia.sln or using makerelease.bat file.
For non-Win32 users, you have to build your own GUI and do your own compilation files.