Google Sketchup -> Second Life export

SketchUp is great. Not only is it free, but it supports Ruby as a scripting language, and provides plenty of interesting APIs and reasonable (though not very well inter-linked) documentation too. It’s long been discussed, in conjunction with Google Earth, as a potential virtual world, and rival to Second Life. While it will be fascinating to see how that develops, and whether they become more comparable over time, what interested me much more in the short term was some way of getting 3D data from SketchUp into Second Life. Dave did this recently with PowerPoint, which and it reminded me just how much I wanted to do the same thing in SketchUp.

What I really wanted was SketchUp -> Second Life exporter. I didn’t want to buy SketchUp pro (though I thought about it), because even that wouldn’t solve my problem. More recently, I saw that Blender 2.4.2 makes it possible to import SketchUp’s (proprietary, binary) .kmz file format. This is cool and potentially very useful, especially when you consider the Prim.Blender project allows you to draw SL prims and export them. Ideally, it would also do the hard work of creating simple SL style prims from the complex 3D data. This is not an easy project though, as discussed at 3pointD recently.

Eventually I gave up my search for a basic SketchUp -> Second Life exporter and realised I was going to have to write one. I’m really not a Ruby guru, but I surprised myself by knocking something up in 20 lines and no time flat. Ok, so it’s not very good, and it doesn’t bring us any closer to the nirvana of complex models being automagically generated using the minimum number of prims, but it was so easy that I’m very surprised not to be able to find anyone else taking this approach already. (Perhaps someone will fill me in it has already been done and I’ve simply missed it.)

Importing into SL as a notecard

So, what is it?

What I wrote was a short Ruby plugin for SketchUp. It writes out basic model information to a text file, allowing it to be imported again (as a notecard) into Second Life. From there, an object parses the notecard and re-generates the model in-world. It does not support the full power of SketchUp by any means, and takes some judicious short-cuts to avoid generating zillions of prims. In erring very heavily on the side of simplicity, I’ve made something that you’ll either find delightful or frustrating. Each face in your SketchUp model, you end up with a flat, rectangular prim which represents the bounds of that face. Imagine if every face of every shape in SketchUp was simplified down to a rectangle which marked it extents. That’s what my script does. It’s not perfect, but it’s a start. The interesting bit of the Ruby plugin looks something like this…

model = Sketchup.active_model
file = File.new("/testfile", "w")
model.active_entities.each do |entity|    
   if entity.typename == "Face" #ignore everything but faces 
      # (e.g. we won't pay any attention to edges, points, etc)
      face = entity.bounds # For now, make a rectangular prim
      ...
...

While it works very well for fairly basic models…

SketchUp - SL export (simple)

Something more complex ends up being made to look fairly ugly. Curves and non-regular faces are particularly badly hit…

SketchUp - SL export (complex)

Future developments will include colour/texture support, as well a bit more thought about the mapping between the SketchUp model and Second Life prims. I’m sure there are loads of things that can be done to improve it. I’m already enjoying it as a faster way to put simple things together though.

New Media Knowledge – “My So-called 2nd Life” conference

NMK are a UK based not-for-profit set up as an information hub around digital media and they run some lovely (and very affordable) events.

Darren pointed me at one recently, entitled My So-called 2nd Life. I was planning to attend, so I’m delighted to report that I was recently asked if I would speak at it. It’s in London, it’s not until the 24th October and it’s ridiculously good value, so I hope to see plenty of friendly faces there.

Amazon’s Jeff Barr comes to Hursley

Jeff Barr is Amazon’s Web Services Evangelist, and all round good guy. Just last week, Ian wrote about a presentation Jeff recently gave in Second Life. We were lucky enough to secure some time in Hursley with the man himself this week, where Andy and I were delighted to be able to get to know him a little better. It sounds like Jeff has been enjoying a very busy few weeks, so it was great that he could spare an hour to meet up in Hursley for a chat.

We talked about his recent presentation, the Fabjectory (which is very cool. Ian, who has been hugely excited about 3D printing for a long time, is going to go nuts over it.) We also talked about putting arbirary text on a surface in Second Life using an image created by a server-side script. We’d both been independently having the same idea, and Jeff was first to implement and blog it. 🙂

We even found time to go to Hursley’s near-legendary pub, the Dolphin, for an early lunch. We ordered (and received!) cheese and ham baguettes before they were even open for food. Now that is what I call influence.

Virtual Worlds introduction presentation

When talking about Virtual Worlds with customers and other IBMers, I often start with some examples of the state of the art in Second Life. They give a flavour of why integration between the metaverse and real life is both possible and important, and why people are paying attention. I usually find it helpful to put Second Life in the context of Web 2.0; pointing out that it’s really all about two concepts that have already been changing the shape of the web: user generated content and social networking.

I reasoned that I could save everyone some time by putting the highlights of my introductory presentation up here. This is not intended to be a comprehensive list of projects, rather a taste of what has caught my attention (and that of the media) in the last few months.

Introduction

Depending on the audience, I will usually start by visiting the Second Life website to show the interactive map, all the time reeling off some interesting stats – largely gleened from Google TechTalk video – to help
people realise this is not just a game:

  • A glance at secondlife.com shows us the number of residents, how many residents have logged on recently, and how many US$ changed hands between players in the last 24 hours.
  • Yes, people make and sell things for money. 25% of users are currently sellers, 75% are primarily consumers.
  • Easy to build and script (using Linden Scripting Language but moving to support Mono).
  • Rich scripting API includes support for email, XML-RPC, HTTP Request, …
  • Video and audio streaming are easy. Mozilla’s Gekko core (Firefox’s rendering engine) is eventually being integrated, so any surface will be able to be a web page.
  • It’s growing fast. According to Linden Labs, the rate at which new land is added exceeds how fast you could explore it.

BBC One Big Weekend event

  • The BBC, who are frequently early adopters, announced an event in Second Life in May 2006. The streaming video from the One Big Weekend event (being held in Dundee) was shown in-world to provide people with another means of following the action.

  • The key thing here is the party happening in the foreground. People are dancing, showing off and chatting.

  • More: Read about BBC Radio 1 ‘One Big Weekend’ island on BBC Online, and the announcement.
    Eggy Lippmann collaborated with Rivers Run Red on this one.
  • The BBC also did a Second Life session for Newsnight around January 2006.

American Apparel

Warner Brothers

  • Warner Bros, who promote Regina Spektor, are marketing her latest album within Second Life.

  • The New York loft apartment (also built by Aimee Weber) houses a tape recorder playing clips of Regina Spektor’s music, with the mood of the room changing with the music.

  • More: read the press release and creator’s blog.

Baseball

  • Major League Baseball (MLB.com) paid the Electric Sheep Company for a virtual baseball stadium to host the Home Run Derby event.

  • I’m not a baseball fan, but even I was hooked enough by the lively atmosphere that staying up until 2am UK time was well worth it.

  • More: Eric Rice has a great summary and Ian wrote up the event on Eightbar too.

Forbidden City

Amazon

Wimbledon

  • Eightbar readers can’t have missed the fact that Ian Hughes worked on a prototype build for the Wimbledon tennis championships.

  • It involved displaying the path of the ball (thanks to the ‘Hawkeye’ data captured on-court) as well as clothing and even flying towels.

  • Read the original Eightbar post on Wimbledon demo for more.

So there you go. Naturally, this list will be out of date almost instantly, as more things are happening all the time. Let me know if I’ve missed something important though.

The Darren and Roo show: Day 1

We’re still in Nottingham, enjoying the first full day of the IT Specialist Institute, 2006. Since we’re staying in the University halls, the rooms are not quite hotel-quality, but definitely not bad. Probably the worst bit (for a 6’4″ freak like me) is the small bed.

The breakfast was great though, as was the opening presentation from Sudhir Chardha, who presented on innovation and the GIO (Global Innovation Outlook). We are not giving our presentation until tomorrow afternoon (2 – 3pm if you’re attending the Institute and want to attend). Today we’ve been mainly hanging around underneath Darren’s very cool posters, chatting to people, demonstrating Second Life and talking about why Virtual Worlds are important.

Darren and his posters

There has been a fairly steady stream of conversations. We’ve also managed to add two more people to our (probably not very comprehensive) list of over 100 known IBM SL users who can access Ian’s island.

Ambient Orbs, Rabbits, Penguins and the Availabot

Ambient (or ‘calm’) technologies, as demonstrated by the lovely creations of Ambient Devices and the whacky French Nabaztag rabbit, unobtrusively display ever-changing data. Something which can be left on the desk and ignored, but catches your attention as it softly changes throughout the day, is a valuable tool in this information-overloaded age.

Roo\'s desk, complete with ambient orb

Eightbar has previously reported on a friend and colleague who is responsible for a wireless ambient penguin (see the a description and video). Using bi-colour LEDs, this ‘Wallace And Gromit’ inspired creation keeps track of our manager’s instant messaging status (off for online, green for active and red for away).

Ambient penguin

When I read about the Availabot recently, I was very impressed. It brings together not just ambient online status awareness, but also rapid-prototyping ‘3D printing’, for a truly personal touch. Having a desktop avatar which not only represents a friend’s online status but also looks like them is a great idea. The fact that it physically falls over in such an amusing way helps too. (Don’t miss the video of the Availabot in action.)

When 3D printing becomes a bit more affordable, this sort of hack is going to be wonderfully easy and popular. I’m looking forward to a world overrun by hobbyist gadgets.

Amazonians push the envelope

3pointD are reporting on the recent news from Supernova 2006 about pioneering ‘Amazonians’. Some Second Life users, who also happen to be Amazon employees, are exploring the potential of “a bridge between Amazon Web services and Second Life so you can go into Second Life and actually try things on there and buy them”. Interesting news indeed.

I have been wondering for a while which existing major online brand will be the first to make the move from e-business to v-business. American Apparel recently announced its virtual store, but if the Amazonians can get their company’s support might Amazon be the first company to really start the blur the boundaries between the real, the online and the virtual marketplace?

The fact that it’s “not being done under the auspices of the company” is not necessarily a bad sign either. The need for early-adopter employees to try some things out before their employer really ‘gets’ something (or can feels it can support it) is something most bleeding edge types can probably relate to.

A tool for browsing and choosing items to be sent to your home in meatspace would be the next baby step for online shopping. At its most basic, using a virtual world to act as a store and shopping cart for existing real life goods will be a refreshing change from current online shopping models, and provides some pretty interesting possibilities for a richer user experience too. In the same way that some booksellers already offer a PDF download while the dead tree is in the post, I wonder how long before Cafepress (or one of their competitors) offers avatarwear as an option for its user-designed products. Here’s my design. I need that on a T-shirt, a cap, oh and something off-the-shoulder for my avatar while I’m waiting.

Gradually, the metaverse matures.

My latest Second Life toy – a Last.fm player

I’ve been a fan of Last.fm for a while, and a really big fan ever since I noticed that Matt Biddulph, while he still worked at the BBC, pulled a very nice hack to update his ‘sekrit’ user every time Radio 6 plays a song.

Anyone following Eightbar in the last few months can’t have failed to notice that we’re getting pretty interested in virtual worlds and the metaverse. Second Life is not the only virtual world out there, but it’s a popular one. Since it makes it fairly easy to build things, and now lets you make HTTP requests from within scripted objects, it’s a pretty handy environment for knocking up 3D artifacts which render web data in slightly more interesting ways than, say, the average RSS reader.

Roo\'s last.fm player on Second Life

In between enjoying Second Life’s third birthday celebrations, I created this ugly beast. My Last.fm feed watcher (despite its similarity to a squashed fly – those are supposed to remind you of speakers rather then eyes) displays the title and artist of the last song I listened to. Eventually it might provide a more complete interface to show more information about my listening habits, but for now I’m happy to keep it simple.

ThinkPad tilting revisited

Back in March we started talking about some hacks which demonstrate the coolness that can be achieved using the accelerometer inside the ThinkPad (the ‘Active Protection System’).

Thanks to Steve Farrell for pointing me at something which Mark Smith (of IBM’s research center in Almaden) has been working on; a modified version of SDL (the Simple DirectMedia Library) which supports the ThinkPad accelerometer in any game (on Windows or Linux) which uses the SDL to provide input. Using Mark’s modified library means you can tilt your way to a high score on all these games and more.

Ever wanted to work at Hursley?

If you’ve been following our adventures here on eightbar for a while and have always wondered what it’s really like to work at IBM Hursley, now may be your chance to find out. Hursley is hiring. Current job openings in research and development include…

The above list is not exhaustive; several more openings are listed at the Jobs at IBM Career Center too.