Friday, September 22, 2017

TIPS / Few ways to hold your iPad

I have been using the iPad since the original iPad. Back then iPad was more bulky and I hold it with both hands most of the time. I remember there was this Grabbit iPad Case back then allowing me to simply hold the iPad single handed, by slipping my hand into some kind of handle. 

These days, the iPad is very slim and light. Even large size iPad Pro can be hold with a single hand, but just be careful not to drop it on your head or teeth while using it laying down (!).

WAYS TO HOLD YOUR IPAD


I found these are 7 most used stance I use when holding the iPad with a single hand:

1. STRONG PINKY

2. UPSIDE DOWN SEVEN, good for laying down, but do not drop it on your head (!)

3. CONSERVATIVE 

4. OCD

5. THUMB and PINKY

6. SIDEWAYS SEVEN, this is more stable landscape

7. SIDEWAYS CONSERVATIVE

EXTRA TIPS:


  • If you are placing the iPad on the table and without its case, I found Gorilla Pod is the best holder for it.
  • You can certainly place it on lap or on flat floor
  • You can also hold it using feet, but not the most comfortable, a bit advanced technique

Monday, August 21, 2017

SWIFT / Procedural SceneKit Test for ARKit

I have been studying the ARKit in iOS 11 for almost 2 months now since it is being announced at WWDC 2017. It has been quite an interesting experience for me. I am learning a lot about the iOS app development and Swift, especially in area like SceneKit usage for ARKit.

Swift language itself is very fun and expressive to use, I found a lot of interesting things that Swift can do inside XCode to make interactive app and also inside Swift Playground on iPad.

SCENEKIT WITH SWIFT

So far, with ARKit, I manage to bring in some 3D assets and animation from Blender into XCode, to view as AR in 3D. That is pretty fun in itself, but I wanted to do more, perhaps some kind of procedural 3D scene and some basic interactions.

I am thinking of collecting and writing some Swift codes that probably can help to generate 3D SceneKit asset on the fly in this blog.

Apart from XCode, I am also using open source Blender 3D and nodes add-on like Sverchok and Animation Nodes to help me with algorithms and logics, which I can convert to Swift bits by bits to generate a cool procedural SceneKit setup.

I could imagine that before 2020, I think the iPhone and iPad perhaps will have some kind of Node  Based tools and system to play with 3D and maybe AR.

Obviously for basic layout 3D Scene, the SceneKit editor inside XCode would be sufficient, but sometimes coding the scene and procedurally laying out 3D objects would be handy after all.

I think AR world is very powerful when treated like game environment. Familiarity with SceneKit, and SpriteKit is really a big bonus if you want to transfer the knowledge as ARKit environment.

SWIFT: PROCEDURAL GRID OF SPHERES

This is pretty much basic and classic task, many examples of coding start this way. To generate bunch of 3D objects in a grid XYZ, we simply use some kind of for loop, iterating based on range of number we specify.



I am testing it out like this:

CODE:
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Set the view's delegate
        sceneView.delegate = self
        
        // Show statistics such as fps and timing information
        sceneView.showsStatistics = false
        
        // Create a new scene
        let scene = SCNScene(named: "art.scnassets/ship.scn")!
        
        makeSphere(scene: scene, rangeX: 10, rangeY: 20)

        // Set the scene to the view
        sceneView.scene = scene
    }



The function to generate a grid of Sphere would be something like below:

func makeSphere(scene: SCNScene, rangeX: Int, rangeY: Int) {
    for i in 0...rangeX {
        for j in 0...rangeY {

            let sphere = SCNSphere(radius: 0.03)
            let sphereNode = SCNNode(geometry: sphere)
            
            sphereNode.position = SCNVector3(Double(i) * 0.1, Double(j) * 0.1, 0)
            
            // Parent sphere node into the rootNode of SCENE
            scene.rootNode.addChildNode(sphereNode)
        }
    }

}

The code above is a quick and dirty code, where I really does everything in one go as the viewDidLoad() being called. Perhaps we can make the code for the app nicer, not calling everything at the beginning. That I will think later.

Also, dealing with many objects, would be nice to always keep track of the nodes generated and put it inside array list or dictionary of some sort. 

For now, I really want to get a hang of being able to just procedurally generate bunch of spheres grid.



INTERACTION IN APP

What interesting about ARKit app is that we can actually let USER to interact and experience the 3D and also give them the ability to spawn and generate the 3D objects, as much as we design and give them controls to do so when the app is running.

For the basic level SceneKit creations, using Swift, we should be able to easily:
- Generate some primitives 3D objects as provided by Apple XCode
- Assign Material, adjust the materials
- Place the 3D objects into the main SCN 
- Add Camera
- Add Light
- Add Particles
- Etc

This is a common task when working in 3D software, like Blender, Maya, Houdini. But a little bit more like game production, while giving more controls to the user when they actually experience the app. I found this quite interesting.

I supposed I shall continue collecting some knowledge around this area for AR experience.

Wednesday, July 26, 2017

JOURNEY / My First Sticker Pack app

I decided to write a little "Behind The Screen" story of my first iMessage Sticker Pack app made for iPhone and iPad, currently available at Apple App Store. Hopefully this would be helpful to inspire other artists, illustrator, animators, and creators thinking to make their own app.

Woofy Stickers

https://itunes.apple.com/au/app/woofy-stickers/id1234473192?mt=8


Just Like Writing A Book

Creating a collection of stickers is like writing a book. It is not actually a linear process.

You start by collecting a lot of photo references, and in my case, I do collect a lot of dogs photos. Then the next step is of course to draw a lot of doodles. Out of 1000 drawings over a long period of time, maybe you get roughly 10 good enough stickers. That is my quick estimation. But then again, we need to keep the similar style and combine some ideas for final product.

Especially with iMessage stickers, we need to think what kind of emotion or expression would like to be shared by a person sharing the sticker. I test this with some friends and my wife also.

Draw A Lot: Digital and Analog way combined

I used to bring my A5 drawing pads with me and draw using pen or pencil while inside the train or bus. These days, I am drawing using my iPad and sometimes my iPhone. I do not have to buy a new drawing pad each time and take photos for each little drawing. The process is a lot streamlined and smoother nowadays with iPad having built in camera and Internet capability.



With iPad, I am using this drawing app called Paper 53 app a lot. I think it is one of my favourite doodling tools, apart from Tasayui Sketches and also Pro Create.  But I think Paper 53 app is the best for me because I like to quickly put down my ideas and thought into drawings and Paper 53 is really fast and it also provides a set of very natural drawing tools.

I am currently using iPad Air and also Pencil 53 as you can see above, but finger drawing is still pretty handy in most cases. Sometimes I draw on sofa or even on bed, whenever I got a new drawing idea. I did get my iPad Pro quite recently and use the Apple Pencil a lot. I made my sticker pack app using iPad Pro and ArtRage app for paint brush look.

Whenever I finished drawings, I quickly send it as PDF or as PNG to my email as backup. Sometimes I posted them into Twitter or Instagram, if it has a bit of fun story to share.

Challenge Yourself

For me, the experience of creating the first app is a big deal, eventhough it is just a sticker app.

I learn to:

  • Use XCode 
  • Package the stickers
  • Design the app icon
  • Processing and preparing the product
  • Publishing the app

I always had this question: "I am not a programmer, but I always want to make some kind of app that other people can use and wondering if I can make one?" 

Luckily, since last WWDC 2016 - 2017, Apple made it really easy for artists and illustrators to make their own Sticker package for iMessage!

All we need to do is really to download XCode and use the iMessage Sticker Template. The minimum requirements:
- Have a MacBookPro (2010 or earlier)
- Have an iPhone
- Have a good Internet connection to get learning resources.

This video from Apple WWDC really helps me to make my sticker app:
https://developer.apple.com/videos/play/wwdc2016/204/

You can apparently have a free Apple Developer account simply by using your current Apple account. There is no need to pay for Apple Dev license until you decided to want to sell and publish your work at the App Store.

After learning some XCode and Swift, I found also that we can make so many simple apps you can install on your iPhone and iPad very easily. Such as Camera app, Calculator app, Notes app, and many more. Easier than you might have thought. Swift coding is apparently very friendly, similar to Python language.

What is Next?

My sticker app is probably not the top sticker apps out there, in fact far from successful project. But this is only the beginning.

I am currently learning a little bit more about Swift Programming and also how to make AR Augmented Reality app using Apple ARKit (introduced in WWDC 2017). This is really fun app! I think I should make my sticker a bit more animated.