Custom Terrain in Unity

I have completed Penny De Byl’s outstanding Custom Terrain Udemy course.  In this course, we built a menu full of tools to customize the terrain.  There are several algorithms that go across the entire terrain: Random, Voronoi, Perlin, Midpoint displacement, and actual mapping data available from Google Earth.  On top of these, you can add smoothing, and various types of erosion, such as rain, thermal, tidal, river, and wind.  In addition, you can add one of these techniques after another so that the effects build on top of each other.

We added options to create canyons, add water, rain, clouds, sky domes, and fog.  We created a ‘splatmap’ menu where you can add different textures to the landscape based on height and slope.  We had menus for vegetation like trees, and other details like rocks and ferns, using either billboards or prefabs. 

I have learned so much about creating environments from this course that I’m enjoying just experimenting with the settings.  The ‘big picture’ settings are especially fun to play with since they are not very intuitive unless you have recent experience with the math behind them.  Below are some examples that I’ve made.

The coolest and easiest is using actual geographic height maps, like this one from Alaska:

Random terrains need a lot of smoothing unless you use very small values.  This one was basically a bunch of spikes, but after 20 smoothing, it looks quite nice:

Perlin waves create sine waves, and can vary from a gentle undulating wave to tight rows like crops:

These Perlin waves shows one big wave across the x-axis, and several small waves across the y-axis.

Voronoi creates mounds where the height falls off until it gets closer to another peak where it starts rising again.

This landscape was created using Voronoi tessellation with serious river erosion effects, since the base voronoi settings usually give mild mounds:

Midpoint Displacement is one of the most varied and unpredictable. The following 3 examples used the exact same values.

I am still practicing, as I’m not at the point where I can reproduce a terrain easily.  I’m starting to know which types of values will yield which types of results, but it is still more random than I would like.  But the key is I understand the code and what it’s doing.  Now it’s just a matter of time.



Animation and Penny’s Excellent Udemy Course

I have been learning even more animation with Penny De Byl’s Udemy class ‘Mastering 3D Animation in Unity.’ I am very impressed with her classes.

Penny starts out teaching you how to use raw mocap data for Unity’s Mecanim system, and adding material physics to objects to affect how the bounce or stick or slide. She goes into depth on keyframing, timelines, and tweening. She shows how to use colliders to trigger animations. She shows how the bones and joints rigging system works with humanoid models. She makes great use of Mixamo, which I have learned to love. I hope Adobe keeps this great resource available.

There’s a lot of useful tips on importing animations and fixing common problems. She shows how to add animations to characters, and to skin them to characters from other characters. She shows the problems that root motion, baking Y, baking rotation, and baking XZ are designed to address, and when you need them. She shows how to mix the translation from root animations, with the scripted translations and how to pass control of the translation around. There are so many techniques such as using anchors to align your animations, and putting animation events at the end of an animation.

Then she goes into blendshapes, which I already know a lot about, even though it’s been years since my doctorate. I spent enough hours on that project that I’m not going to forget the basics any time soon. But what I did learn was using the animation window to add blend shape trees, and strafe sets.

Another excellent use of anchors is with inverse kinematics. This time the anchor is an object the character might reach out to, or follow with his head.

All in all, I can’t recommend this course highly enough. Between this and the AI techniques course she has, I feel like I’ve learned most of what I need to know to develop a VR game. Most importantly, I’ve learned what’s hard and what’s easy. I’ve been enjoying adapting her projects to work in VR, and adding to them of course.

Pocket Invoicer

I spent the last couple of months of 2018 completing a new app called Pocket Invoicer. I noticed that Estimate Maker was quite successful, and enhancing it enough to make it handle invoices was quite easy, and always the plan. I wanted it to be out in the wild to be sure I had no major bugs before adding what would be more crucial functionality.

Unfortunately, invoicing has more competition than estimating, and my little invoicing app is not doing very well. I’m going to drop the price on it yet again to see if I can’t get it to be at least as successful as Estimate Maker.  I tried changing the name to ‘Invoice in your pocket’ to see if it was the fact that invoice isn’t in the name that was causing it to rank so poorly in search.  But that did not help.


Posted in iOS

Vive VR

I finished Penny de Byl’s ‘Beginner’s Guide to Artificial Intelligence in Unity’ course from Udemy. Actually, I’ve begun about a dozen 3D/Animation/Game Udemy courses, but Penny’s was spectacular and I’ve learned the most and enjoyed hers immensely. I will get the rest of her courses. I’ve adapted her tutorials to run in VR, which really brings them alive!

Penny’s first chapters teaches the basics of animation, as you manually calculate trajectories, and tweak parameters to get turning speeds and realistic movement, manually set up waypoints, etc. Then she teaches Unity’s built-in Waypoints and NavMesh which calculates paths for you automatically as you simply set destinations.

The crowds and flocking behavior logic were the most amazing ones in my VR world, as I gaze around my schools of fish as they flee an upcoming shark, or walk around in a crowd of Mixamo characters who politely walk around me, except for the one I put Capoeira animation on after he runs up to me!

Penny also covers behavior trees and goal-oriented action planning. Oh, and she covered how to import external models and animations, and how to get them to interact with the NavMesh animation, which was extremely useful. And the basis for what I want to learn next.

There are two other courses that I’ve spent significant time with. One is ‘The complete Unity Masterclass: Build 2d, 3d, and VR games.’ The sheer volume of material here is impressive, and the tutorials are great for people who have zero experience with Unity’s C# programming, but it wasn’t remotely VR related, so its misleading but still well done. The other is ‘Fast Animation and Rigging Techniques Using Maya 2017.’ I’m finding this one a bit laborious, but that may just be the nature of Maya.


Unity and Vive!

Ahh, I am having so much fun with Vive! I can now create little games and animations in Unity and view and control them with my Vive VR. I can take 360 photos and teleport around to different scenes made from these photos in Vive. This is so much cooler than plain old 3D modeling.



June 4, 2018

WWDC! I love this time of year. All the dev conferences, but especially this one! And the pool and ocean get warm and inviting, but for the most part, it’s nice to just program and look at the beauty of our hot, humid summers from indoors.

I have just updated my Estimate maker app with a few minor enhancements, but mostly to implement an uncaught exception handler. I have big plans for this app once I’m sure it’s stable. I have one field report that I cannot duplicate and do not have a sense of how common it is.  Now that I have the error handling framework, I will put it in all my apps.

I am also enjoying Udemy courses, of which I bought an embarrassing number of during a sale they had a few months back. I’m getting proficient with Unity, and have the beginnings of a good VR game in my head.

The difficult part, as usual, is not to go off in too many directions. The Estimate app is doing well without any promotion on my part, so I think it warrants enhancing. But I am going to spend a lot of time with VR this year.

Live long and prosper!


Posted in iOS

2017 in Review

Wow, again it’s been a year since my last blog post.  So I’ll make this post a synopsis of my year.  I did update all of my apps with the latest SDK, and some improvements all around.  I’m 95% done with my estimation app.  My goal is to publish it by Christmas, so I can focus totally on the exciting new stuff I can do with my new iPhoneX!  I’ve played around quite a bit with Maya and Unity this year, trying to get prepared for AR/VR opportunities, but I have to admit, I took off quite a few weekends to dive, read, dance, take cooking classes, and otherwise unwind.    

Now I have to decide if I want to buy an external GPU so I can do a VR app.  I think it’s brilliant that Apple has standardized the NN models.  There is so much potential here.  The problem with VR is it’s still at a stage where it’s just as much about optimizing the performance to get all those pixels to the screen within 10ms, and it’s pretty low level stuff.  Even with the computer graphics class that I taught last year, that level of detail is outside of my expertise.  I know I need to understand enough of it to program it efficiently, but I don’t really have the desire to learn the low-level gpu performance tweaks necessary to get 90 fps.  So I’m leaning towards developing an AR app as I think it will provide some crucial foundation skills.  

On the professional side, in addition to learning some Kotlin for Android, I created VUI apps for Amazon Alexa and Google Home.  I used JNode on their respective servers to provide the dialog and collect the necessary information, and submitted the design document for our ColdFusion experts to implement on our own servers.   I suggested it be done on our servers since VUI is going to be ubiquitous shortly, and even web browsers will eventually be more voice activated than not, so it makes sense.  And even though the free service sounds like a lot of at 100k requests a month before they start billing you, my company gets more hits than that in a day, by far, so it could get unnecessarily expensive quickly if we have to pay for Amazon and Google server usage.   I really enjoyed working with JNode, and with the Voice assistants in general.  You can throw up little private apps quickly that are only meaningful for you and your family.   To talk to a server, though, I need a secure site, and I’m not quite willing to spring for that yet.   

I am officially my company’s ‘AI Expert.’  I know because I’ve heard them refer to me as that on several occasions, not that I’ve been given any kind of title or official recognition.  Plus they gave me the VUI project to design, so that’s a benefit in itself.  New things are always more fun than old things.   There are quite a few companies touting themselves as bringing AI to the travel industry, so I have another goal of trying to understand the value that they offer.   This is primarily because it will benefit Hotelplanner, and I want to provide as much value as I can to my employer, and I am the most qualified to do it.  Unfortunately, it consists of listening to marketing types overhype and sensationalize what they can do, and I don’t relish those types of conversations.  I suspect VR will transform our industry faster than AI will.   But it will be interesting to find out what really is available underneath all the BS.  

Computer Graphics using WebGL

Wow, it’s been almost a year. But in my defense, I took on too many projects, and had no spare time this past year. I taught a class in Computer Graphics, using WebGL at Nova Southeastern University. Since I work full-time at Hotelplanner during the week, most of my weekend was spent preparing for classes, and grading assignments. It was quite the learning experience, but not one I’d choose to repeat. I enjoy programming 100 times more than I enjoy teaching. But still, it was motivation to become immersed in WebGL and learn more than I ever would have casually with the three.js libraries and javascript. Creating graphics is rewarding in and of itself.  And being able to say I was an adjunct professor helps me remember what a bad-ass I actually am!

So here it is, my first totally free weekend in a very long time. No duties or obligations forcing the path ahead. I feel torn in several directions. I’d love to create something in VR. I’d love to create some 3D models in three.js and Maya or Autodesk. I’d love to dabble in some AI tech. I’d love to revamp my aging apps that are in desperate need of updating to remain current. I’d love to develop some server skills so I can have some cool things on the web. So many exciting tangential things to all of these. It’s difficult to decide where to go. And most of it involves deciding on new platforms and new languages or frameworks to learn. All of which takes time.

New stuff is always more fun than old stuff. But I probably will at least update my RhythmID app since its my oldest and most popular.

I just signed up for the Safari Books Online update. I think it’s a really great deal at $199 a year and unlimited access. What a world we live in, where so much information is available!



Android Volley Framework

I’m close to finishing the multiple feeds to get hotel quotes on the Android app for HotelPlanner. I’m using the volley messaging framework, which is quite nice at handling the lower levels of message transport. In both the hotel list and the room rate list, I request rates from multiple vendors and merge them into the native UI as they arrive. In the end, I was very sorry that I used wkWebViews in the iOS app. It was quite expensive in terms of both memory and performance, and not as reliable as I would like. But the json feeds are lightening fast and I am very happy with them. I am keeping the webview for the checkout page only since I don’t have a good api for that, and it’s difficult to test thoroughly. And quite important when you’re taking people’s money that you don’t make mistakes!

Fun with WKWebviews and Javascript

Forgive me, o God of Blogs. It has been 3 months since my last posting.

I’ve been working with WKWebviews in my Actually, I’m using the Sencha javascript and datastores to populate the native UI elements. One of my top goals this year was to incorporate hotel rates from all of our feeds, and start pulling reviews from a different site than I’d been using. Since the browser already has this logic, I just keep the browser hidden and use its logic, which is powered by javascript. Just as relevant for the app as it is for the browser. I just never show the browser, except for check-out. This gives me the ability to add a lot of functionality to the check-out page, which is difficult to test without actually booking rooms. All in all, I’m very happy with how easily it all ties together. With the speed of Nitro js in the iOS browser, HTML5 is becoming faster on the phones.

And, since I’m getting involved with javascript, I thought it might be nice to learn some Node.js, so I’m working through a book on that. I may power my website using js rather than coldFusion. I haven’t decided yet. The advantage of js is it is growing more popular by the day, which is the disadvantage of coldFusion. But Hotelplanner uses coldfusion, so it would be quite useful to become more proficient in that language. Not to mention I have lots of examples on how to do things!  Life is full of trade offs.