Sunday, August 27, 2006

Right, got thesis all printed and is now being bound. Will put it in the post today, but Mike gave me a longer deadline. Still no news on when/if I have to come and present it...

Just trying out google base, (woo for free file hosting by google). But has totally failed to upload my 10Mb pdf 4 times, from my pc and from another http server.

Now No. 3 on a google search for sity...Will put thesis online in a couple of days...

Lol, just added a hit counter to the bottom of the site, two interesting developments already - This is the top result for a google search of "pages like utube" and David Eppstein has a link to this page. Well that and I get 2 hits a day ;)

Finally also found the original straight skeleton paper. Was only invented in 1995...

All printed and done. Waste of paper if you ask me...

Tuesday, August 22, 2006

right, time to get some test renders out of this mess!-

Strange thing is today I only just used java's do...while construct for the first time. I think thats very wrong, just goes to show that convention can be damaging. It would have solved some ugly cludges I've put in, and made the code much nicer and simpler. Since if you thinking about ugly code your not thinking about what your doing it just goes to show that the language you think in does effect your results.

I switched to the beta version of blogger today, seems to have fixed my two gripes with blogger - the 80% failure rate when uploading images and the strange need for republishing to static pages. Big up guys!

oops, oh dear it looks like the pirates beat the straight skeleton in the google video download charts (however google is beating uTube 2:1 for pirate video hits, and is also not-quite-as-bad-a-quality-as-youtube):

Title Page Views Downloads
Fairy Lights 40 1
Voronoi computation 9 0
big test render 12 0
camp skeleton 30 0
crazy clown land 11 0
first city flyby 53 0
irregular weighted straight skeleton (camp skeleton) construction 22 0
more pirates! 469 4
mungo 12 0
night glow 6 0
pirates ahoy 800 6
straight skeleton animination 47 0
straight skeleton eve demo 38 0
trippy debugging 242 1
vornoi tesselation art 9 0
weighted straight skeleton 26 0
weighted straight skeleton 33 0
Totals 1859 12


I've wasted minutes of the lives of 1859 people...

Monday, August 21, 2006

First attempt at mental ray on a large city:

The city wasn't really worked on (that would take weeks to get right) but shows a lot of the types of buildings you can make with it - from overhanging rooves to flat ones with walls. A little silly because the rooves run into each other, and a bit too bleached out but its a good start. I'm considering leaving the streets without geometry just to add a bit of contrast...

Most of today was spent botching together some roof code so it works consitently enough for large cities. Tomorrow I'm going to make a proper grammar (now load and save are working) and see if I can get a 1Km square render out of maya....

lol also found the remote command to run maya over the network:
/usr/aw/maya/bin/Render -im ~/../mental/new -r mr -v 4
-x 600 -y 600 -of tiff -cam persp -rt 4 filename.mb

works great for a 600 square image in filename.mb using 4 threads and mental ray (mr) to a tiff file called "new".
Not quite sure how to set up final gather settings, I'm hoping they are in the maya binary you send. I know from last time i ran the command "y > /tmp/file" (go on try this....) on snow that i've got at least 4GB of tmp space to render tmp images into, and that snow doesnt clean or limit access to the tmp folder. This may be useful for animations at a later date.

Sunday, August 20, 2006

Right back from holiday last night so its time to get this thing published.

I think I've decided to publish all the code and the write up once it's been graded. I finally found the Bristol IP Policy, and it seems like its mine to do as I like with. I have half a mind to try and get some commercial recognition, but trying to deal with RED would be a chore and Sity is a long way from being commercially useful. Will probably release the material under the GPL, since I dont like the idea of people making money (without sharing the code) out of what I've done at bristol. I guess I've still got copyright stuff so I can commercialis(z!)e it at will. Would be cool to keep developing and turn it properly open source, would make the jMonkey team very happy to have a custom city generator custom made for them! But we're looking at hundreds of hours of work! I think the most likely track is to take it up as a phD, I just gotta find a CS department with a computational geometry department that doesn't suck! The alternative is to go underground and keep developing in the evenings until the program shows enough commerical promise to go live....

Strange thing is no one has ever talked about IP rights at bristol, I'm sure when I started the IP rights got assigned to the universtiy - I wonder when they changed it around. They seem to talk big about business, but as David May admitted, they've only had one commercial sucess with their MEng course, and with credentials like that (and James Barlow on the loose) I'd rather do it on my own.

Oh, and google video is back! Woo for a non Murdoch owned alternative to uTube! No more waiting for verification.... Look - our daft dog trying to burry a spade (something ironic there?) but failing big time:

Friday, August 11, 2006


Its been sent off for a draft reading. I didnt read the last half pretty well and I think the format the department demands make the business stuff look thin and the academic stuff hard to find.

Strange that the website says they collect the thesisis for an online library but one doesn't exist.

Quite a few new bits and pieces were left out that will go unpublished (such as a cool reflection wrapper class, my plans for meta-java using the class loader) because of the fixed word limit, and 6 appendices is more than anyone'll read anywhoo. Its a shame becase the business stuff should have been left for the buisness plan as business and academia are pretty incompatible goals. Much of it I felt I was writing just to prove I knew stuff that was tested for in other units (the design stuff), but hopefully shows some of the thought that went into it. Much better would have been to let us decide the format. 1 business plan and 3 short academic style papers would have saved everyone a lot of reading (and a lot of trees). It is kinda insulting (to us and them) gettomg us to read papers that give complex and speedy overviews of a topic and then expect us to only be able to write a monolog about the processes we went through.

well enough of that I'm offta cornwall for a week in the rain :)

Thursday, August 10, 2006

Woo! all done.
50 pages, 25 pages of appendices, 17K words... seems a little pointless as it will only end up as another unread appendix...

should probably do a user guide while I have the chance... Will read the thing over tomorrow morning (I hate this, I almost have to read it out loud to stop myself skim reading) and send a copy to neill and colin.

Wednesday, August 09, 2006

Finished writeup of the straight skeleton last night, although I could add an extra section about straight angled corder and weights, It seems long enough as it is!

I think i've got mental ray figured out, it all seems to be about the ambient light and final scatter. Looks really nice doesnt it?

I'm giving a quick description of the Voronoi tesselation and then onto a description of Sity's grammar. Thats going to involve lots of horrible diagrams and explinations of my meta data system.

Found another insntance of the Holyer effect - "concave voronoi", damn self refencing internet. I demand a DAG replace the web.

I wonder if theres a convention for quoting the source from whom you copied the reference from using google scholar? If you get an ammusingly-authored reference into google scholar, I'm sure you can get hundreds of published papers to quote "Sutherland and Cohen - the use of scissors in line clipping (1968)"

Right I reached what I thought was my goal for the word count by midday on Wednesay, I'm so not going to write another 12K words in the rest of the week, but hopefully make a lot of pretty pictures (worth at least 1K words each)

I've also just found out that:
  • Rob's got Maya 7 and mental ray installed on snow
  • snow's got 2 processors
  • snow's got 5GB memory
  • no one is using snow in the holiday
  • you can run maya from the command line
This means that there is a chance I can render out a massive image of an entire city in mental ray. Everything in mental ray looks cool. Lol then again if only I could get into the graphics department's cluster, I might be able to match the resolution of the printer that sits behind colin

Hmmm... have just realised that UML just isnt designed to deal with reflection gracefully, expect lots of annoying notes saying what a connection really it!

Well end of today and I'm up to 14K words, 45ish pages, 4 appendices (although one is naff) and 2 pages of references . There's a 50 page limit, so I guess its time to make constant references to an appendix to annoy the reader. It may even be sensible to put all the results into an appendix. Should be able to do all except the user guide and results tomorrow :)

Tuesday, August 08, 2006

Lol woke up to find my mental ray rendering option had dissapeared, luckily this post was near the top of google results! Yay for mental ray!:
Still not quite sure how to get the perfect images that you see in some the publications, I cant find the ambience bounce option that is present in mighty radiosity...

Wrote a lot of words today about the straight skeleton hoodicky. Now up to 9.800 words and 30 pages. Lets hope the rest is a little more brief, some could be cut out to the appendix, but a lot of it is my own work built around someone elses so i dont really want to relegate it that far. but anyway it looks like I'm over half way to the thesis 'minimum' of 50 pages. Its a bit of an arbitrary limit.

It was one of those days when trying to concentrate on any one section would just result in me adding more to a different, unconnected chapter. Not very good really.

I did however manage to use the phrase "hollow point" and produce a reasonable argument to name my modifications to the straight skeleton as a "camp skeleton"

I just realised that I dont really want to give the source code of the project to anyone. It does seem kinda childish, I guess I thought about this when I signed up for a degree but dont remember now. It feels like its all my work, and since I'm paying Bristol for tuition it feels unfair that Bristol owns the IP to the work. I wonder if this will change when they start screwing (I guess they've already started) students out of more tuition. It would certainally make bristol's business credientials (its outstanding positive feature) more plausable and attractive to business minded students. But I guess I'll leave it up on the website for a while. I think the critical thing here is that there is no work here that couldn't be hacked together by a C guru with the right libraries in 24 hours...

To be honest for the amount that they are charging students to go to bristol my honest advice for computer scientists is to move to california and use the same money (as an in-state student) to get into one of the UC campuses near silicon valley. People would become much better scientists in that culture, and have a the inside track to a dev job with one of the big companies over there (unlike being a sales and marketing monkey if you join in the uk).

Monday, August 07, 2006

First day of right up. Kinda cheating here, but used my notes on research (3K words), tidied them up and wrapped it all up in some business plan fluff, in total 5,207 words (not that a high word count == good!) .This just about covers the background section of the thesis, described on the course website as

Background - why what you have done is a good idea. What work your project builds upon. Explain your new idea or application. Remember this is aimed at a technically competent person. [15 pages]In here you are explaining all the specialist knowledge that we need to understand the particular branch of computer science you have been involved with.

This was not a particularly clear starting point, so I just explained what sity is, who will want it & why - and moved onto a review of papers in the area interspaced with my own comments and observations. I'm not sure what 'specialist knowledge' means but apart from a short section on the skelton and voronoi (the details of which are much better saved for the implementation chapter), I'm sure words like 'roof', 'road' and 'house' are kinda self explanitory. Also some stuff about the point of view of the people who will be using it (artists hopefully) and how it should be easy to us, but again leaving the meat of the discussion to a technical chapter.

and i dedicated it to green & blacks....(ginger in particular) not sure if your allowed to dedicate thesi but I just did....
Lol, righty ho last dev day today, so time to crank up the outputs.

I can now have buildings with overhanging rooves, ridges marking the boundries between stories and different walls with different slopes.

In breaking news, a google search for sity no places this blog at number 4. In your face sity communications. I guess thats what you get for having a blog with google...good rankings even if no one links to the blog!

Tomorrow I'm starting writing up. I think I should have a reasonable draft to show colin by the end of the week (then I'm off on holiday for another week)...Chapter headings to include:
  • research
  • voronoi
  • straight skeleton
  • overview of method
  • gui
  • engineering
  • a user guide
I think about a day each for those (or less, I've already got most of the illustrations). About 2K words for each probably so about 12K in total. Should be able to do it mostly in a week!

Friday, August 04, 2006

Righty ho fed up of arbitrary limits on city sizes due to speed of dump to wrote an .obj export. Once the files are in .obj format (and because i do a bunch of optimisations of only outputting each vertex once now, am thinking the jMonkey bit would also benefit a lot from this...) maya can import in seconds and display (lighted in real time) a 400mx400m section of city without any problems...

And a 1Km by 1Km (the obj file alone, with no normals is 30mb...) Adding more detail to these houses suddenly looks like a daunting task, doors and windows would be something like x6 effect on the polycount. Lets put the solution to this down to More's Law...

Have also added a simple load and save facility (that doesnt really work) to allow waterfalls to be written to disk as serialised objects, and read back again. Something is stopping it working and the stack traces are unuseful! Probably best to leave this until after writeup has been submitted - I intend to go on a big bug hun tto make the thing more presentable. I dont pretend to get rid of them all, I dont pretend that I can, but I may be get to the point where it doesn't crash in a 10 minute demo!

One of the main problems in programming speed seems to be familiriarity with the code. I wonder if it should be possible to add automated tests to a program that checks that the programmer understands what they are doing?

Thursday, August 03, 2006

Todays job is to get interesting roof shapes into the buildings. The idea is to repeatedly use a straight skeleton transform to create the walls and roof of a building the changes in wall angle will and sudden additions (such as adding an overhanging roof) will be handelled by a DFA like structure that will use a priority queue.

This is a lot of work for the second (or third) last day of development. If the straight skeleton doesn't work as expected under these condition I'll have to roll it back!

I'm also beginning to think about the writeup. Previous years' thesi that I've read dont seem to be so hot on diagrams as I anticipates (ok so this is a geometry based project, but i didnt see any UML in my skim reading either).

In other news I'm trying out opera as a browser and liking it a lot. Probably the way forward as firefox becomes more mainstream and prone to malware!

Wednesday, August 02, 2006

Had more problems with me forgetting myself - the Collections.shuffle(List) command was used and of course this made the decisions made random. This was replaced by Collections.shuffle(List, Random), to make the result deterministic to my program. I also had a go with a static code anyalsis technique - finding all instance of HashSet or HashMap (due to VM optimisation these arn't deterministic), as well as System.exit s used in debugging that got forgotten about. Still trying to track down a NullPointer in the new roof union, strangely it only occurs with fat walls, something about merging all sides of a cell is my guess!

The Voronoi and camp skeleton algorithms complement each other. The skeleton creates very rigid geometry, with interesting exceptions that appeal to the eye as man made. The Voronoi is able to clean up these anomalyies into something that is suitable for additional computation.

Here's a description of the unioning procedure I made up it runs in linear time compared to the number of points added, so I'm quite happy with it. Theres also a render of a 200mx200m square sity, the maya transfre was so slow after 3K triangles, that I gave up on the cenre bit...

Tuesday, August 01, 2006

Wrote a thing that merges the panel of a roof into one, this will let us create walls and overhanging roofes with ease. So far the results arn't perfect, but look promising:

Kinda cool things are: houses share one wall, so houses will have built several walls of their preffered hight around them. The top of the walls can be bevelled, using the skeleton procedure too!

Lol found the bug that was making some of the walls come out upside down: When we traverse the hashset of points when merging the woof panels into a wall, it is critical that the first panel output to sheet builder is a positive one, else theres a chance sheetbuilder will decide up is down. To solve this we just ensure that the first point traversed is on the edge of the shape (corelDraw to come tomrw!

da Jesus of suburbia:

I don't really like the walls, a bit too twee for my liking, perhaps an option to have them in the back gardens, and then ensure the default is to use them sparingly.

Tomorrow is onto the dredded task of making roofs with overhangs and roofs with hatchings. Will probably take rest of week/project!