Reblog: Thoughts on SwiftUI from WWDC 19

SwiftUI

So what’s the big deal with SwiftUI? Well here’s why I think it’s great.

  1. One UI framework for all platforms It has always baffled me why Apple never made UIKit work on the Mac. If it worked for iOS and tvOS it could certainly also work on the Mac (which it does now thanks to Project Catalyst). For me, this means having double the work on many parts of the UI on Secrets for Mac and iOS. Now and then, you would see rumors that would give you hope. “Maybe next year” you’d think… but the years passed and nothing. Looking back, I can’t help but wonder if this was Apple’s plan all along. SwiftUI is certainly a multi-year effort. The underpinnings of the combined framework are at least 5 years old:

    Joe Groff@jckarter

    Combine goes back before even Swift existed. I’ve been helping the SwiftUI folks for at least three years, and they were probably working on stuff before I knew about it

    David Smith@Catfish_Man

    I was curious what the earliest Combine-related file I have on my computer is, and it turns out it’s August 14th 2013. I filed the radar it references on 10/23/2012.

    Also apparently yet another short-lived project name I forgot about?? pic.twitter.com/FR6NADWrs5

    View image on Twitter

    And although I haven’t played much with it yet certainly there’ll be a lot of bugs/shortcomings to iron out for next few years.

  2. Declarative To put it succinctly, this means that instead of telling the framework what to do you tell it what you want. The framework then figures out how to achieve. And you’ve seen this style of coding already with Auto Layout. It offloads much of the complexity to the framework.By introducing this abstraction and letting the framework do the job of composing the UI for you we get:
    • Automatic support for many of the system features: dynamic type, accessibility, dark mode, etc;
    • Adaptive layouts on different platforms (a switch on the iPhone becomes a checkbox on the Mac);
    • Freedom from having to adapt our UI whenever Apple needs to evolve it (what SwiftUI uses to satisfy a Text element may change on the next release).

    I had a professor that used to say:

    All problems in CS can be solved with one more level of indirection.

    It still holds.

  3. Reactive I’ve never invested much time with any of the reactive frameworks out there. I definitely appreciated the principles behind them but I’ve always been very critical of frameworks1 or technologies2 that are too invasive.With what I’ve already seen on the sessions and demos, I’m just about ready to forgive Apple for abandoning development of the controversial Cocoa Bindings3.

    We write so much glue code that I’ve got no problems accepting the learning curve of all the new stuff that is driving this both in the Swift language and the new Combine framework.

I’m cautiously excited about SwiftUI and sincerely hope it will live up to expectations.
Did you enjoy this article? Then read the full version from the author’s website.

Rapid Worldbuilding with Probuilder

Rapid Worldbuilding with ProBuilder

ProBuilder is totally free available through the package manager.
If you’re using 2017 or 5.6 you’ll get critical bug fixes. However, from 2018 onwards there’s more support, using 2018.1.0b3 I dealt with a considerably severe crash bug, so update to b12 IMO.
Polybrush and Progrids are things you’ll have to go get individually from Unity.
To replace Probuilder objects with polished geo you can play around with the Unity FBX exporter

Real Quick Prototyping Demo

  • Main Probuilder window (found by going to tools>probuilder>probuilder window) – has tools and Probuilder is designed so that you can ignore it when you’ a new to using Probuilder
  • Face, Object, etc. mode – will allow you to touch only the variable selectable
  • A good way to learn the tool is to go through the main probuilder window and check the shortcuts
  • It really helps to keep things as simple as possible from the get go. Don’t add tons of polys
  • Shape selector will help you quickly make stuff
  • Connect edges and insert edge loop
  • Holding shift to grab multiple
  • ‘R’ will give you scale mode
  • Extrude is a fantastic way to add geometry
  • Grid Size – keep at 1 for 1 meter this is important for avoiding mistakes when creating geo and knowing your angles
  • Use the ortho top down view to see if your geo fits your grid
  • Detach face settings is a way to split geo selected but it’s still part of your item
  • Detach face using a different setting to create a new game object
  • Pivot point needs to be rejigged often (solutions: object action or set it to a specific element using “Center Pivot”)
  • center pivot and put it on the grid by using progrids
  • Settings changes become the default
  • Use the Poly Shape tool to spin up a room + extrude quickly
  • Merge objects
  • think in terms of Quads
  • try selecting to vertices and connect (Alt + E) them
  • select hidden as a toggle is a great option, because in 3D you are seeing an orthographic projection so you will click on the thing that is drawn closest to the camera!
  • Crafting a doorway, can be done using extrude and grid meter changes, toggle the views (X, Y, and Z) to help with that
  • hold v to make geo snap; this will save you time later on
  • Alt+C will collapse verts (as in the ramp option where the speaker started with a cube)
  • Weld vs. Collapse — weld great for merging to hallways, or collapse which is more like pushing all verts within a specific distance together
  • Grow selection and smooth group

Polybrush Stuff

  • Add more detail with loops or subdivide (smart connect)
  • Polybrush will let you sculpt, smooth, texture blend, scatter objects, etc.
  • Modes like smoothing
  • todo explore something prefabs
  • N-gons are bad because everything is made up of tris

Texturing stuff

Open up the UV editor
  • By default, everything is on auto which means that on in-scene handles toggle
  • When you’re prototyping this allows you to not use fancy toolbar stuff

Question

  • Why is progrids helpful? Short answer: if you’re not super familiar with 3D modeling and creation software (i.e. Maya) you can create simple geo without leaving Unity editor.
  • Why would you be obsessive about making sure your geo fits your 1 meter grid size? Short answer: This helps you avoid errors with geo creation such as horrid angles and hidden faces.
  • Can you talk a little bit about automation with Probuilder?

Reblog: Google creates coffee making sim to test VR learning

Most VR experiences so far have been games and 360-degree videos, but Google is exploring the idea that VR can be a way to learn real life skills. The skill it chose to use as a test of this hypothesis is making coffee. So of course, it created a coffee making simulator in VR.

As explained by author, Ryan Whitwam, this simulation proved more effective over the other group in the study that had just a video primer on the coffee-making technique herein.

Participants were allowed to watch the video or do the VR simulation as many times as they wanted, and then the test—they had to make real espresso. According to Google, the people who used the VR simulator learned faster and better, needing less time to get confident enough to do the real thing and making fewer mistakes when they did.

As you all know, I have the Future of Farming project going right now with Oculus Launch Pad. It is my ambition to impart some knowledge about farming/gardening to users of that experience. Therefore I found this article to be quite intriguing. How fast can we all learn to crop tend using novel equipment should we be primed first by an interactive experience/tutorial. This is what I’d name ‘environment transferable learning’ or ETL. The idea that in one environment you can learn core concepts or skills that transcend the tactical elements of the environment. For example, a skill learned in VR that translates into a real world environment, maybe “Environment Transferable Skills” or ETS.

A fantastic alternate example, also comes from Google, with Google Blocks. This application allows Oculus Rift or HTC Vive users to craft 3D models with controllers, and the tutorial walks users through how to use their virtual apparatuses. This example doesn’t use ETL, but we can learn from the design of the tutorial nonetheless for ETL applications. For instance, when Blocks teaches how to use the 3D shape tool it focuses on teaching the user by showing outlines of 3D models that it wants the user to place. The correct button is colored differently relative to other touch controller buttons. This signals a constraint to the user that this is the button to use. With sensors found in the Oculus Touch controllers, one could force the constraint of pointing with the index finger or grasping. In the example of farming, if there is a button interface in both the real and virtual world (the latter modeled closely to mimic the real world) I can then show a user how to push the correct buttons on the equipment to get started.

What I want to highlight is that it’s kind of a re-engineering of having someone walk you through your first time exercising a skill (i.e. espresso-making). It’s cool that the tutorial can animate a sign pointing your hands to the correct locations etc. Maybe not super useful for complicated tasks but to kind of instruct anything that requires basic motor skills VR ETL can be very interesting.

via Did you enjoy this article? Then read the full version from the author’s website.

Update; Oculus Launch Pad 2017: Future of Farming

Everything is hierarchical in the brain. In VR design for users, my hypothesis is that this can be really helpful for setting the context. For example, at Virtually Live where the VR content is “Formula E Season 2 Highlights”, meaning the one donning the headset is able to watch races. I once proposed that we use the amazing UX of Realities.io to use an interactive model of Earth as the highest level of abstraction from the races (which occur all over the world). The user can spin the globe around and find a location to load in. The hierarchy written abstractly in this example is, Globe is a superset of Countries, Countries that of Cities, and Cities that of Places. I figured that this would be perfect for an electric motorsport championship series that travels to famous cities each month. We went with a carousel design that was more expeditious than the globe in the end.

The Future of Farming
 takes place largely in a metropolitan area, namely San Francisco. So I’ve decided that to begin, I’ll borrow from the hierarchical plan. I want to showcase an orthographic project of San Francisco to the user with maybe a handful of locations highlighted as interactable. To do this I’ve setup WRLD in my project for city landscape.

Upon selection of one of the highlighted locations with the GearVR controller, a scene will load with a focal piece of farming equipment that has made its way into the type of place (e.g. Warehouse, House, or Apartment, etc.).

A quick aside, last week I had a tough travel and work schedule to New York. I came upon a pretty bare blog post upon reading back what I wrote, so I decided, it was better to not share. One of the other hurdles I had, was an unfortunate loss of the teammate I announced two weeks prior, simply due to his prioritizing projects with budgets more appealing to him. I dwelled on this for awhile, as I admired his plant modeling work a lot. With the loss of that collaborator and weighing a few other factors, I’ve decided to pursue an art style much akin to that of Virtual Virtual Reality or that of Superhot. Less geometry all created in VR. Doing most of this via Google Blocks and a workflow involving pushing created environments to Unity which is pretty straight-forward. After you have created your model in Google Blocks, visit on an Internet browser with WebGL-friendly settings and download your model. From there, you can unzip that file and drag it into Unity Assets>Blocks Import which I recommend you create as a way of staying organized. You’ll note that Blocks imports speciate a .mtl, materials folder, and a .obj model usually. In order to have your intended Google Blocks model to show through you need to change one setting called “Material Naming” after you’ve clicked on your .obj. Change it to “By Base Texture Name” and Material Search can be by “Recursive Up”.

Unity_2017_1_1f1_Personal__64bit__-_blocks2unity_unity_-_Blocks_Tutorial_-_Android__Personal___OpenGL_4_1_

 

Here’s a look at the artwork for a studio apartment in SF for the app, as viewed from above. It’s a public bedroom that I’m remixing and you can see I’ve added a triangular floor space for a kitchen and this is likely where the window sill variety of hydroponic crop equipment will go. Modeling one such piece is going to be really fun.

 

 

View from Above

 

room

Angle View

 

 

 

In the past weeks, I’ve dedicated myself to edification on gardening and farming practices via readings, podcasts, and talking to people in business ecosystems involving food product suppliers. I learned about growing shitake mushrooms and broccoli sprouts in the home and got hands on with these. I learned about the technology evolution behind rice cookers and about relevant policy for farmers on the west coast over the last dozen years. In the industry, there are a number of effective farming methods that I’m planning to draw on (indoor hydroponic and aeroponic) that I can see working in some capacity in the home, and milieus I will highlight such as a legitimate vertical indoor farm facility (https://techcrunch.com/2017/07/19/billionaires-make-it-rain-on-plenty-the-indoor-farming-startup/).

I have asked for help from a design consultant standpoint from someone that works at Local Bushel.

To expound on why Local Bushel is perhaps a helpful reference point: Local Bushel is a community of individuals dedicated to increasing our consumption of responsibly raised food. Their values align well with edifying me (the creator) about the marketplace that I want to project into the future about. Those are:

  1. Fostering Community
  2. Being Sustainable and Responsible
  3. Providing High Quality, Fresh Ingredients

——
For interactions, I can start simple and use info-cards/move scenes based on the orientation of the users head using ray casts. Working in Oculus Gear VR Controller eventually.

Project Futures: The Future of Farming

The following is the 1 – 5 paragraph proposal I submitted to Oculus Launchpad 2017. In terms of why you should care about this, I am open to suggestions on what installments to make next.

Project Futures is a virtual reality series that aims to put people right in the middle of a realized product vision. I’ll set out to make a couple example experiences to share from rolling out over the next couple of months. The first will be about the future of farming. Vertical, climate controlled orchards that are shippable to anywhere in the world. 

“His product proposes hydrant irrigation feed vertical stacks of edible crops—arugula, shiso, basil, and chard, among others—the equivalent of two acres of cultivated land inside a climate-controlled 320-square-foot shell. This is essentially an orchard accessible by families in metropolitan settings. People will need help a) envisioning how this fits into the American day b) how to actually use an orchard/garden like this”

Industrial Landscape

Since VR is such an infant technology, if you can communicate your idea introduce your product, using a more traditional method (e.g. through illustration, powerpoint, or video as below) then you probably should.

vertical_farm_2

There are, however, some ideas that are very bad to communicate using traditional methods. That’s why it’s an appealing idea to use VR to introduce product ideas today. Climate controlled vertical farms that are shippable are extremely difficult to conceptualize for the average American. There is real value for the customer; who gets a learning experience fueled by virtual interactions and immersive technology about what it’s like to use one such orchard for grocery shopping. 

Now here’s where my story starts to converge with this idea for the series. I keenly seek out constraints that will allow me to keep healthy and eat healthily. Incredibly, I’m using a service which allows local bay area farms to deliver groceries for the week to my door every Tuesday.  I only order paleo, or rather plant based pairings with a protein, ingredients.

What I want to focus on, is that currently, this service isn’t ready to scale across the nation. I guess, there simply aren’t resources for the same crops in different places among other logistical reasons for not scaling far beyond the bay area. So I thought…. this delivery infrastructure obviously sits atop resources created by farmers. So, to scale this delivery which can be so good for the consumer’s health, well, the infrastructure promise of a shippable orchard can be huge. Conditional on the climate controlled, shippable orchard’s effectiveness, all geographic areas would be addressable markets for such a delivery service.

I would like to empower people across the world to have access to healthy foods. But an important point in this process is a shift in thinking about how this healthy future might exist. VR is a device that I’ve paid close attention to for a couple of years and before I get too far ahead of myself, I will see what I can produce with it to communicate on the idea of the climate controlled shippable orchard. An example of the interaction a user would have is depicted here.

411HRB1dUHL_jpg__500×360_.png

 

As a user puts the tracked controller into the collider of the plant she can spatially pick one of the options (“pluck”, “about”, “farm”).

‘Pluck’ will do exactly what you’d expect, spawning perhaps a grocery bag for the user to place that bit of shiso (or kale) in. ‘About’ would detail more about the crop (i.e. origins and health benefits). ‘Farm’ would articulate the local of optimal growth and known farmers of such a crop.

If you have an idea that you think would slot well into the Project Futures virtual reality series about the future of different products. Ping me at dilan [dot] shah [at] gmail [dot] com as I would love to talk to you about it.