Showing posts with label ios game. Show all posts
Showing posts with label ios game. Show all posts

Monday, December 23, 2013

Blender 3D Mobile Enemy Plane Modelling & UV Map

Showing how to Model and UV Map a bit complicated plane for running on iOS, Android Devices using Bender 3d with Gamekit.
1. Insert your design as blender3D back ground
2. Create wing using box. Put mirror modifier. Then extrude the side face. Adjust nods on the way to form the shade. Finalize mirror modifier when finishes.
3. Create a cylinder and use extrude scale on the way to create fuselage and engines.
4. Repeat to do the back wing, join components together and give it name
5. Now to unwrap the model for texturing. Go to side ortho view and press 'B' to box select the under side half of the plane. Remove Top of wing faces from selection by Press 'Shift' and mouse right button.
6. Change to top view. Then click unwrap and use project from view.
7. Move the UV map for giving spaces for other parts' uv map.
8. Unwrap other parts of the plane
9. Overlap 2 sides of rudder for easier texturing in future.
10. export the uv map. open in Gimp2 or PhotoShop, paint plane skin
11. load image into Blender3d Texture. and Set the coordination as UV.
12. Select shadeless, for constant colouring.

13. Testing on Android and iOS, Check my other post / youtube for how to do this.














Saturday, September 7, 2013

How to Test Blender GameKit on Real IOS Device Tutorial

Finally, I figured out how to test the Blender3D GameKit on Real IOS devices, such as iphone 5 and iPad 4 in the video. This is using latest xcode 4.6 and ios 6.1 build. Took a while to work out this.

1. go to gamekit on google code site to get the source. copy the svn script and run it in a terminal. It will download the whole package onto your hard disk.
2. go to apple developer site register yourself and pay $99 to get the iOS developer licence. So you can test applications on your iOS devices.
3. go to mac application shop download Xcode. Currently using 4.6
4. open xcode and go to preference -> download install the command tools.
5. search cmake and install.
6. search xquartz and install.
7. open cmake. point source to gamekit-read-only you downloaded before. point target to a folder under it. normally named build.
8. Click configure once. And wait for the settings to come up. Turn on OGREKIT_BUILD_IPHONE,Turn on OGREKIT_BUILD_GLESRS.Turn off OGREKIT_BUILD_GLRS
9. click configure again. only one red line. and then click again. there will be no red lines.
10. click generate. This will generate a xcode project for you named ogrekit.xproject in the build folder.
11. link your iPhone, iPad to computer and start Xcode. this will bring you to a button to set your device for development. click and finish the process.
12. copy your own blender file for testing into iphoneDemo folder.
13. open ogrekit.xproject in xcode and drag the file under iphoneDemo.
14. open main.mm under iphoneDemo folder. edit the name of the blender file to the one you just copied.

const gkString gkDefaultBlend   = "planeTouchMoveIOS.blend";

 go to screen size to annotate them. It is not needed and will mess screen settings. 

// iPad
    //m_prefs.winsize.x        = 768;
    //m_prefs.winsize.y        = 1024;
    // iPhone
//960x640, 480x320
    //m_prefs.winsize.x        = 960;
    //m_prefs.winsize.y        = 640;

//m_prefs.winsize.x        = 320;
    //m_prefs.winsize.y        = 480;

Also search scale. and go to a line that defines scale, annotate it. replace it with:

//CGFloat screenScale = [[UIScreen mainScreen] scale];
    CGFloat screenScale = 1;

15. change the target to buildAll->your device name. and Command + B to build. for the first time it will take a while. but afterwards will be much faster.
16. After succeed the build. Make sure you have your device connected. Change the target to IphoneDemo->your device and click run. 
17. wait for several minutes. the files will be compiled and uploaded on to your device. The App will start running by itself.
18. for ipad just go to the summary page and change the target device to ipad.