A Shopfront in Blender and Unity: Lazy Speedrun using UV Project from View

After encountering Ian Hubert’s World Building video (how did I not see this until now?) I had an epiphany about a different way of making in Blender, besides photogrammatising things or modelling everything up from scratch. For many years I had actively avoided trying to understand UV mapping because I considered it too time consuming, and like he mentions, it is this 3d person whose face is the stuff of nightmares:

HA I have surely attempted to create and unwrap a face like this countless times only to horribly botch it and create something unintentionally horrific (and horrific but in not even an interesting way).

Every time this happened, I had simply accepted this to mean that I was not likely to make it as a character designer or a UV mapping specialist in this life… I mean, you gotta pick your battles. But everytime I saw this map it was like a symbol of all the UV mapping I would never learn to do because I AIN’T GOT THE TIME TO DO IT…

So the UV project from view is an absolute game changer. I actually used the UV project from view to make some pieces of bread previously (for the titular BREAD in the BREAD AND BUTTER game i am working on), but I hadn’t connected the dots to the possibilities… till I saw this…

As a trial run, I did a screen recording of myself doing a speed run making a shop front in Blender and importing it into Unity which took 14 minutes in real time (including a lot of hemming and hawing and undoing). In fact, the editing of the video you see here in iMovie took way longer at 40 minutes (according to Rescuetime), including video exporting and uploading time.

The image I am using is a picture of Hiep Phat from Walworth Road Yes I know it is not even in Stoke Newington, but just another shop found via the keyword “Church Street Stoke Newington”. Sometimes you just need a little hook to get you started. The image can be found on Flickr from the user Emily Webber and it is shared on a CC BY-NC-SA 2.0 licence.

Ironically yes, I have titled this as a SPEED RUN using a LAZY technique because the point is that I ain’t got time to do it the complicated unwrapping way! I’m not sorry that I didn’t even unwrap the ground (pavement in front of shop) totally because even without the ground properly unwrapped it kinda passes muster!

The resulting shop front is very acceptable and definitely usable as a game asset that you might see glancingly from a distance.

Streetart Straße

Everyday when I open up a taxi or ride-share app to book a ride to work or a meeting, I have noticed one detail that sticks out on my map: there are several points near my home that are labelled “Streetart Straße”. Indeed, beautiful murals on shophouses is a common sight in the area that I live in, but why on earth are these points being highlighted to me above other actual landmarks here?

Why is it in German? And why is it that it seems that this map item has been set to show even at the highest zoom levels where most other details are filtered out? (Map zoom levels refer to how at the lowest levels, you might only see continents and broad country labels, but at the highest level, you see cities and their details. Data is selectively shown at different zoom levels, so that the map remains readable).

So I decided to google it a bit…


Contributions by Clara95 on OpenStreetMap

The answer is mundane. It appears that a (likely born 1995, female) German traveller toured through Singapore, Thailand and Vietnam and decided to create a half dozen map points of Street art, fast food, pizza places, and bus stops on Openstreetmap.  ¯\_(ツ)_/¯

Not gonna lie when I remembered that OSM was editable that my response to seeing this (and it being that I’ve lived here for years and still haven’t left my mark on Openstreetmap unlike a traveller through these parts…) it immediately led me to this… reactivating my account…

I’ll report back when I’ve finally managed to make a positive or interesting dent in the REAL MAP OF THE WORLD…

* Oh but also not this kind of dent. I found this when browsing in editor view. Por… whoever you are, er… we don’t need to know your exact house unit!!!

Tilemill – Conditional Label Placement, Pseudo 3D Building Effects, and Polygon Patterns

Tilemill is an excellent tool for map design and development, which really provides ease of use through CartoCSS. For me, I think it is very accessible for designers/artists who might not have a clue about arc/gis but just want to design a map decently. Today I’m finalising the maps for my Paris Postdated project so I sat down to figure out a few things…

Conditional Label Placements

Microsoft Excel

I read a guide suggesting this method, which works. The funny thing is that I have not gotten it to properly “not overlap” in the past, and by setting it to “text-allow-overlap:false;” this usually results in NO LABELS at all. And in the end, sometimes I just want ONE or TWO labels to be done in another direction.

tilemilllabel

Solution: Created a new column called dir, and when dir = 1 it will be aligned to NW instead of NE.

Pseudo 3D Effects

TileMillpseudo3d

Pseudo 3D effects can be gotten for buildings as well. If my data had building heights (which sadly it does not) then I could multiply my height value by the actual height of the building! In other words, instead of this:

#building { building-height:5; }

you could actually have this (where “height” is the field in for your building height):

#building { building-height:[height]*5; }

Basically, values drawn onto the maps can be derived directly from attributes in one’s data source. So there is some room to be inventive in how you map out the values. Seems to work for a number of fields such as marker-width and marker-height and building-height. Probably works for directions/orientation of labels if your data has that…

Polygon Patterns

Another way in which to add texture to the maps is overlaying a pattern file over polygons. You can make your own, or alternatively Subtle Patterns has a whole bunch of useful patterns which are very suitable for overlaying onto your maps.

Screen Shot 2013-09-01 at 8.06.00 PM.png

There is a list of Compositing Operations (comp-op) available, including plus, minus, color-dodge, color-burn, invert, etc. You can use this to composite the pattern layer over the original colours selected, so the colours can be still fine-tuned live, along the way….

Map {
    polygon-pattern-file:url(images/patternfile.png);
    polygon-pattern-comp-op:multiply;
    polygon-pattern-alignment:global;
    polygon-gamma:0.5; 
}

In addition to that, there is also polygon-gamma (which you can set to around 0.5-1 and which will help make polygons sit together more seamlessly) and polygon-pattern-alignment, which can be local or global. Local means its just for that polygon, global mean its aligned to the overall metatile instead of each of the individual polygons. Here is an example of Singapore with some patterns…

Screen Shot 2013-09-01 at 8.11.04 PM.png

Well that was bit tiny. Also, these are only very simple, design-related operations. I’m having more difficulties figuring out how to use PostgreSQL and PostGIS to clean up some stuff, but I thought I’d at least document the easy parts first!…

The Making of StrangeLah

cleanandgreen_new_banner

IMG_5189

I was at the Clean & Green Hackathon over bits of the weekend, organised by NEA and run by the good guys from Newton Circus. Since this is Singapore, I figured that most of the people attending it would gravitate towards making fairly predictable, conventional mobile app or social media / community sites or data visualisation, or to just go about gamifying everything. And… this is exactly what happened there, it was all like LET’S GAMIFY RECYCLING! or LET’S GAMIFY FREECYCLING! or how about LET’S GAMIFY CYCLING! etc etc. I’m sure we’ve all heard that one before.

Whilst I love seeing the energy and passion that people have for building things at hackathons (and that’s the reason I go to them), I feel like sometimes a lot of this energy is not always directed efficiently into making new things and trying hard to think of new ideas. At any rate, I could also have made a version of App-o-tron for generating random ideas for a green app and then we could have given this list to people for them to work on. I noticed that phrases such as “green technologies” and “sustainability” and “we want to leverage on NFC” were practically overused, and to be honest even if the app can be described as “smart” and “scalable”, in the end it probably also contributes to the current saturation of unnecessary information. I mean, do we really need an app for everything? Do we need yet another social media app to share more things with each other all the time? Do we really want to read all the tweets automatically generated from our electrical appliances and power switches and storm drains? But then again, I know I am hardly one to talk about having practical objectives. In any case, I had already decided that my goal was not to build an app but simply to see which was the most interesting dataset provided, and to set about finding an unusual use for it.

I noticed NEA had provided a dataset of feedback on food hygiene which had not previously been released. It could not be not confirmed whether any or all these entries had been previously substantiated or not, and precise location data had been removed the entries – which was probably for the better, because no one wants to create a mass food hygiene panic (which is actually probably the state you will be in, after you read all the entries one by one, whether or not they are true). The litany of horrors go on and on and on, almost 10,000 entries of terrifying food-related atrocities. It is hard to tell whether they are all true, or merely one-off accidental food contamination incidents. Let’s face it but when in the face of random rage and being called on to be witnesses, Singaporeans sometimes lose objectivity, or the ability to describe something adequately. Sometimes the feedback entry was a compendium of a list of possible places where they might have contracted food poisoning, which isn’t very useful data either. For this dataset of user-submitted feedback, here was really no way of finding out how reliable the reportage truly was.

However, I still like this idea of these reports being significant points of data which might, as a whole, still point to something about each area. A high incidence of reports could mean that those places had a lot of food places and thus a lot of people eating there in general, or it could also mean that more people were having unhappy or unpleasant times there.

One of NEA’s feedback categories was a category titled “Strange taste”. It seemed that a number of people had described their food as strange possibly because of this somewhat suggestive category title. But, strange is not very specific. It could mean many things. There was no way I could find out who had been the person who lodged the feedback, so I would never be able to know precisely how strange it was, or in what manner.

Another dataset from Cleanlah included a set of cleanliness complaints with images. These were even more curious, because looking at these pictures was looking into an abyss of uncanny-ness. It was not always clear what we were supposed to be looking at. Amongst some of the obvious pictures of litter and dead rats were some ordinary pictures of normal, everyday scenes. But what was wrong with it? Were we supposed to search for the one thing that was amiss in the picture? Why had these photos been submitted? Did the person really mean to submit this picture of an empty corner? Why is that middle-aged man standing alone in a field? It was all a mystery!

So I wondered, what if we only looked for the strange, mysterious complaints?

So I began by stripping out all the fields except ones with vague words such as “strange”, “weird” and “funny”. After cleaning up the data and adding “Singapore” to the end of the street names, I opened a blank spreadsheet in Google Docs, and then imported my excel file to the Google Spreadsheet.

To Geocode it on your own (simplest method): set up Geo for Google Docs by going to Tools > Script Editor, paste mapbox.js into code.gs, rename code project as Geo, and then refresh your spreadsheet – you should see Geo appear as an option next to Tools. Now you can select the fields with the addresses you want to geocode. It will generate three new columns – geo_latitude, geo_longitude, and geo_accuracy. The last field (geo_accuracy) seems to describes whether its a primary/secondary/tertiary/trunk road or public building/retail/residential/house/mall/station.

Since this was to be a fixed set of data, I converted it to an xml (for my ease of use) and with my very limited vegetable powers of php, this is what I came up with:

<?php
  $doc = new DOMDocument();
  $doc->load( 'csv/strangefood.xml' );

$entries = $doc->getElementsByTagName( “row” );
$totalentries = $doc->getElementsByTagName(‘row’)->length;
$randtotalentries = rand(1, $totalentries);
$randcamera = rand(0, 359);

$Dates = $doc->getElementsByTagName( “date” );
$Date = $Dates->item($randtotalentries)->nodeValue;

$Titles = $doc->getElementsByTagName( “description” );
$Title = $Titles->item($randtotalentries)->nodeValue;

$Lats = $doc->getElementsByTagName( “lat” );
$Lat = $Lats->item($randtotalentries)->nodeValue;

$Lons = $doc->getElementsByTagName( “lon” );
$Lon = $Lons->item($randtotalentries)->nodeValue;

echo “<img src=http://maps.googleapis.com/maps/api/streetview?size=640×480&location=$Lat,$Lon&fov=90&heading=$randcamera&pitch=10&sensor=false>”;
echo “<div id=’strangelabel’>Date: $Date ($Lon, $Lat) <br /> <div id=’strangedescription’>$Title</div></div>”;
?>

Why a google street view image? Because I think it compounds the uncanny, uneasy feeling by showing you a quotidian, everyday Singapore street scene. You’re imbued with the knowledge that somewhere close to that location, you know someone has eaten something very, very strange – but you don’t know what, you just know it was strange enough for them to want to tell someone else about it.

Screen Shot 2013-04-30 at 9.21.57 AM.png

Visit StrangeLah

 

A Meeting with a Land Surveyor

This weekend I was very fortunate to meet Mr KL Loh, a land surveyor who has been working for over 40 years in land surveying (and an avid collector of Killifish and moss expert!). He was very kind to invite me over to his house, and to tell me more about his work as a land surveyor, and we also looked through the symbols I’ve been collecting for the last few years. (Many thanks to Mr Loh and his family for having me over – and Caleb for introducing us in the first place!)

It was really really amazing to finally speak with a real land surveyor and to hear it directly from someone who makes official, practical marks which are being used in actual architectural and civil engineering projects in Singapore and we had many many urban stories or anecdotes to share and talk about. I will slowly process it all and write more about it in time to come.

It appears that most of what I have been collecting is not always “survey markers” but also a lot of informal civil engineering markers. True survey markers always have a plate and a reference number. The number is stored inside a big database known as the Integrated Land Information Service and anyone can retrieve information from this service (such as property titles, boundary plans, cadastral maps, control points) for a small fee.

P7085980
This is the cover plate for what would be a real control point made by a land surveyor.

On INLIS, this is a list of information that is provided:

a. Property Title Information comprising title, ownership, encumbrances, last transaction information and Land Encroachment Details
b. Property Ownership Information
c. Property Title Information – Estate and Land Description
d. Property Title Information – Encumbrances Information
e. Property Title Information with Cadastral Map
f. Historical Information which lists instruments and caveats lodged against a title or unregistered land after it has been computerised
g. Caveat Index Information which lists caveats lodged and still affecting an unregistered land
h. Land Information – Lot Particulars
i. Land Information – Lot History
j. Encroachment Boundary Plan
k. Certified Plan
l. Strata Certified Plan
m. Registrar of Title Plan
n. Road Line Plan
o. Horizontal Control Point & Vertical Control Point
p. Image of HDB Leases
q. Image of HDB Instruments
r. Image of Private Property Instruments
s. Image of Index to Land Book
t. Image of Index to Caveat Book
u. Image of Private Property Deeds

Available Graphical Information (as listed on INLIS):

• Cadastral Map
• Property Title Information with Cadastral Map
• Road Line Plan
• Horizontal Control Point & Vertical Control Point

IMG_7578

 

Trimble CU Controller

Some of the interesting things I learnt were that (1) the control points are also sometimes on turf and i have only collected ones on pavements but surveyed points sometimes aren’t always on concrete pavements or roads, and (2) the control points have the potential to go missing – KL said that many control points were made much more quickly in modern times, and as a result some of them would disappear after a few years. So when surveyors returned to look for them after many years (or when looking for other control points listed on INLIS) these points might have disappeared (soil movement might also cause their position to shift!). Apparently in the old days some of the control points were marked out with granite blocks and they were laid into the turf/ground with more time and care; a few still exist in older places such as Bukit Timah Nature Reserve and possibly Bukit Brown.

With regards to blocks that stick out on grassy turf… having read a book on LTA Guidelines recently, I have also realized that there is also much more to learn about those boxes and pipes we sometimes see on roads. I have frequently wondered why sometimes pavements have little metal boxes sticking out and it appears they are not all the same! Those little boxes or tubes serve very different purposes in monitoring different things. Here are diagrams of what some things that stick out from roads might be:

IMG_7378
Pneumatic Piezometer

IMG_7376

Inclinometer

IMG_7377

Water Standpipe

 

More significantly, for my work, it seems the variance in shapes and drawing depends a lot on the individual surveyor/clerk of works who is drawing it on the ground – whether for his own reference, or for his company to be able to recognise the mark. As many of these marks aren’t official survey marks, the person drawing it for their temporary reference while working on a civil engineering or road project could technically take any “artistic” liberties with it and draw almost anything so as to make the marking recognisable to himself during the duration of the project.