Saturday, May 14, 2011

Blender tips

Reduce poly count:
Select object and add decimate modifier, decrease ratio and see how poly count changes.

Add object from another blender file:
Select File/Append, select the file containing the desired object, the file will be treated like a directory containing sub dirs like objects, mesh, etc. Go to the object directory and select the desired object to append.

Rotate view around selection:
By default blender rotate view around object origin, which may be far from the portion of the object you are interested in. In edit mode, you can rotate view around selected meshes instead of object origin. To enable this, enable Rotate Around Selection under File/User Preferences/Interface.

Fix non-manifold meshes:
Non-manifold meshes contain edges belonging to more than two triangles. They cause problem with decimate modifier therefore needs to be fixed. To do this, add decimate modifier to an object to be fixed and check if there is problem. Tab into edit mode, select half of the mesh and press p to separate the object into two. Check to see if the two new objects can be decimated. If not, continue dividing the object into smaller objects until there are only a few meshes in the problematic object. Do visual inspection of the problematic object and usually the edge belonging to more than two triangles will be obvious. Here is an example:

Simply deleting the triangle will fix the mesh. Then you can select all split objects and join them by Ctl-J.

Thursday, May 5, 2011

Xcode 3.x to 4.0 transition tips

To change your build configuration, choose Product/Edit scheme. You can select different build configurations for run/test/profile/analyze/archive.

Which profile to use is determined in different build configurations. To view/edit a build configuration, in the left panel select the project navigator and click the top most entry (project). The settings of build configuration will show up in the right panel.

Building and submitting app to app store is done through archive, therefore the build configuration used by archive should choose distribution profile in code signing identity. However this makes the app cannot be run with Xcode. To run it you need to use developer profile as code signing identity.

Some tips about testing iPhone in-app-purchase

1. log out of app store in system settings before testing
2. delete the old version of the app from your iphone before testing the new version of the app. For some reason the old app may not be able to enter sandbox environment
3. When testing, make sure you are in the sandbox environment. The "Confirm Your In App Purchase" alert view should show "[Environment: Sandbox]"