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.

123 thoughts on “Google Sketchup -> Second Life export

  1. Pingback: Secondlife Talk » 3D und Second Life - vom Web2.0 e-Business zum Web3.0 v-Business?

  2. Hey Roo, this is really great work. I am part of a student group here at Marist College, and we would really be interested in having a go at the plugin and the possibilities it provides us with Sketch-up, for some 3D modeling projects. I was hoping you could email me a copy of the plugin, or point me in the correct direction of downloading it. Thanks again.

  3. Hi Roo,

    As many here I would really like to try your Ruby plug-in for Sketch Up. Is there some URL where I could download it ? Can you maybe send it to me ?
    I cant stand for giving a try. It can definitely be nirvana.

    Thank you very much.

  4. The site looks great ! Thanks for all your help ( past, present and future !)

  5. I search since I install SecondLife fpr a tool to convert Sketchup Objects for SecondLife.I found only yours bit where can I get it?

  6. Hi Roo, thanks for creating this useful and necessary tool. However, as many comments on this page indicate, the download for your plugin is impossible to find, at least on this page. Could you please put it somewhere clearly marked?

    I’d like to learn more about Second Life’s fileformat for prims, so I might be able to create some useful tools for it as well.

    Thank you in advance and keep up the good work!

  7. Is your plugin available for others to use? If so, I’d like very much to get a copy. Where can we purchase?

  8. I’m delighted about the interest, but I’m afraid it’s not available for download. It’s incomplete, and rather more likely to be frustrating rather than useful at this stage. I’ll update if this changes though.

  9. Dear Roo,
    I think you are developing a very marketable tool. And if I were you I would get it to market ASAP. Not because of my own selfish reasons.. but you could sell this tool.. and by the looks of things you have really stirred up interest.
    Alternatively.. make it free or open source, put your name all over it – and you will be remembered forever. (Brand building)
    I am happy to Beta Test.

    – ED

  10. Pingback: Wikitecture 2.0: Designing the Architecture of Architectural Design Collaboration. « Studio Wikitecture

  11. Hey!!

    I’m a 3d modelor and ive been researching different programs to use in secondlife, (As they have now allowed the ability to import “displacement maps” into secondlife to apply to a special sculpt prim effectively allowing you to import models from maya,blender,3dmax, etc, into secondlife.

    I read through this post hoping someone would have figured out a way to have google sketch up create the uv displacement map that is needed to import the model into SL.

    if anyone knows of such a thing, or can develop it that’d be nice.

    my email is crashadams@hotmail.com if anyone has info on that,

    THANKS!!!!

    SL: Crash Prefect

  12. by the way,. the easiest way ive been able to shut down SL critics is point out that SL is essentially this:

    The internet, cept 3D. (useful in mass marketing, advertising, gaming, etc)

    also it is a very very customizable 3D game engine for more than just a small group of people, very large companies are currently scouting for talent to develop large gaming environments inside SL. I myself have been working full time in SL since 2004, (Yes that means I’ve not worked anywhere else pretty much the whole time).

  13. Pingback: To (Second) Live Or Not To (Second) Live, That’s The Question :-) « consultaglobal

  14. Pingback: botheredByBees » Blog Archive » links for 2007-06-20

  15. Pingback: sastgroup.com » Blog Archive » Importare prims second life da google SketchUp

  16. Pingback: Second Life web resources for June 25th 2007 through June 28th 2007 | VintFalken.com

  17. While this project never got public, maybe its interesting to know that there is another project of a Google SketchUp to Second Life Exporter. The Project intents to go open source after finishing. For more information:

    http://www.queo-blog.com/?cat=6

  18. Great! Love to see how things will progress… I’ve fiddled a little with maya, blender and thought about Sketch Up but somehow inworld building is the easiest (to me) for the moment. In reply to some comments stating they’re lacking gap/align abilities in SL, I’m not here to commercially promote a product, but I’ve used Skid Primz who has those features for over a year and couldn’t live without it….

  19. As a designer rather than a techy, I look forward to the interoperability of SketchUp and SL. SlL Iis an ideal medium for client presentation, interaction, for potential demonstation models etc etc etc. Urban planning with ‘real life scenarios, the list is endless. It would be an earner too. I have plenty of potential for the interaction of these two great packages- come on you guys get the job done.

  20. As a postscript, wouldnt it be more efficient to design outworld and import- given the endless crashes and downtime experienced by us humble users?

  21. Pingback: Importare da Google SketchUp in SecondLife

  22. ha… i was just thinking about this tonight, actually. i DL’d sketchup for the first time to draft a home i want to build in SL and was just itching for a post like this. i see this is old… new developments since then, maybe? i’m working on a square-ish modern home, so what is here would probably work fine, actually. the nice thing about being about to export from sketchup to blender is that you can then use blender to create baked in lighting. it’s a pain – you have to texture every face of every prim, but it looks fantastic in the end. the trouble is making sure your SL build is the same dimensions as your sketchup/blender build, and that’s almost worse. simply being able to preserve the dimensions and vertices would really be a big help. it’s not so hard to connect the dots, after all. 🙂 i’d love more info on this.

  23. hi,nice to see your work.

    but I want to know could you send me your full sourse code to me?

    I’m a IBMer in eightbar group too^_^

    I have to import some 3D model into Second life now.
    Thanks a lot.

  24. Is this project still active and have you come any closer to releasing the Ruby scripts? Many folks, me included, are inerested in trying your tool, however imperfect it may be at the moment. Perhaps we can actually give you feedback that will help in your further development of it? I hope we can help you get this beyond the hype stage relatively soon!

  25. hi i love google skechup! and making beautiful buildings in sl is much harder than in google skechup… i would love to try what you’ve invanted! so plz can you give a good explenation of how to do it… good buy! nico

  26. Pingback: I am just a programmer » Google Sketchup -> Second Life export

  27. I’m sure you’ve heard this question a billion times, but out of nagging curiosity, I just have to ask. Whatever became of that Sketchup to SL exporter? Do you still pick at it here and there, or have you dropped this project all together? It just seems, as I’m sure the traffic to your blog post about this exporter can attest, that there’s a nice size market out there that would be happy to even pay for a tool like this. No matter, how simplified it is. I’m just curious, is the hiatus in development due to time or money, or is it just too complicated to pursue further? If it’s money, what if someone was to finance development? And ultimately, if you don’t do it, why don’t you think someone else has done it already. You even mention in your post, your own curiosity in why someone hasn’t already created an exporter (and this was two years ago), which precipitated your need to code it yourself. I’m sure there’s a big chunk of information that I’m missing here, but on the surface, after two years, you’d thinking importing into SL, from any 3rd party modeling program, would be standard practice by now. Could you please indulge me with your viewpoint, I would indebted.

  28. Pingback: Importing and Exporting in Second Life: Oh, How I Pine. « Studio Wikitecture: Opening Architecture

  29. Pingback: Importing and Exporting in Second Life: Oh, How I Pine « The ARCH

  30. Pingback: 3D con Google - Caputo’s Blog - Di tutto di +

  31. Pingback: Stocking Club’s Blog » Blog Archive » Постим без капчи: бэклинки через Trackback и Pingback

  32. sl have a weakness in building mode, movement goes too fast and its not precise, the mesurment are also failing to the precision for inserting.

    sl should concentrate also that to put a special forlder tag in the inventory for building only, not to mixed with others, and to be capable to create forlders and name true the builder or to do so in the chat accessing commnad like autocad.

  33. what is the maximum filesize that you can upload to second life? also are poeple then able to download it and edit it/take dimensions?

  34. Thats an quite interesting program. I am an fairly good SketchUp user, and have a couple of models that I might just want to place in SL. And to prevent to remodeling them with the SL builder, it might be handy to use this tool. If it evolves more, that is ^^;

    Because the models I want to upload are far from simple, and vary in many textures and shapes. No point in using the exporter if it messes that all up. Anyway.. I really like the concept of this exporter.. and hope someone will continue on making this program work.

    Thanks for sharing this information.

  35. i believe google will write the code for the exporter if enough people ask! so please email google and ask them to make the exporter.

  36. I think that sketchup will be the best and fast way to buid in Second Life.
    Continue .. you have my support.
    Eric

  37. Hi There,

    I have jsut been messing about in scetch up and wondered if you could do the very same thing and then googled it and came across you! Crack on I think its a genius idea!!! USer friendly and fun being able to work it into SL would make it brilliant…. You could charge money for a decent plugin I suspect and get rich

  38. That is soo cool, I really want something like that.

    If you can make that work, you can shave my legs, wax my chest and use me as a surfboard. 🙂

    Great work

  39. Hi, I am a researcher trying to make the most of what the SL environment can offer…now and in the future. I am specifically interested in developing and designing product in SL. At the moment it is very limited due to the lack of detail that can be achieved. I have looked at sketchup and wonder if this conversation has moved on to allow exporting into SL. All comments and guidance welcome. thanks.

Comments are closed.