Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PlayUp Tools now exports from SketchUp to Unity 3D

Discussion in 'Asset Importing & Exporting' started by nintari, Apr 17, 2010.

  1. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    The new alpha version supports the ability to export levels from SketchUp into Unity. Please note that nested components / groups are not yet supported. Enjoy!

    http://playuptools.com/
     
  2. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    Thanks for the heads up. I've never heard of this plugin before but know it'll help (if it works) a good friend of mine who has issues getting assets from Sketchup to Unity.

    Many Thanks,
    Matt.
     
  3. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I made a quick video showing how it works.

    http://www.playuptools.com/videos/playup2unity.html

    I still need to get it working for nested components/groups though. Plus, you need to be careful that everything has a unique name. It's importing all of the groups and components as prefabs, so if you have two groups with the name "car", it will write over the first prefab for "car" with the last loaded group. It will still load 2 cars in your scene when you import the level, but it will be the same car mesh.

    If I could access the scene file (if it weren't binary) I wouldn't have to bring in everything as prefabs, but alas that's the way it is unless people vote for it. (hint hint)
     
  4. amigo

    amigo

    Joined:
    Feb 20, 2010
    Posts:
    51
    This is Win only? :(
     
  5. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I don't even own a Mac to test it on, so yes. That said, the actual plugin script files for SketchUp MAY work on a Mac if you copy it from a PC to a Mac... I'm not sure.

    If you try it, let me know if it works.
     
  6. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    I tried this out on my macbook. Once i added the plugin and selected it under extensions it showed up fine. But when i try and go into playup's prefernces, nothing happens :(
     
  7. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I'm using wxSU for the interfaces. It's possible that wxSU doesn't work on Macs.
     
  8. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Ah right. Is it possible I didn't copy all the required files? I only copied the Playup files from the plugins folder.
     
  9. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    It installed the following files/directories:

    Plugins/PlayUpExtension.rbs
    Plugins/PlayUpEN.strings
    Plugins/wxSU/
    Plugins/PlayUp/
    Resources/en-US/PlayUp/
    Styles/PlayUp Styles/
     
  10. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    FYI-- I just updated the playup.unitypackage in the PlayUpTools.zip file to include the ability to right-click on the level file name to import it. Saves a little time.
     
  11. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Right, i'll email them over to myself and try on the mac xD
     
  12. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Okay, I copied over all the required files, but still no luck. I am getting an error now though when i start up Sketchup, which reads...

    "Error Loading File /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/PlayUp/PlayUp.rb
    (eval):1744:in `require': no such file to load -- PlayUp/PlayUp_Convert"

    Nothing happens when I click prefernces too, still.

    ===UPDATE===

    Mmm.... I just opened Ruby Console and clicked the preferences button. This error appears...

    "Error: #<NameError: uninitialized constant PlayUp::preferences>
    (eval):61:in `preferences_dialog'"

    It would be cool this helps you to solve the issue, as i would love to be able to use this tool on my mac.
     
  13. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    That would make sense. PlayUp_Convert is a .DLL file which isn't going to work on a Mac. And without owning a Mac to test on, I have no way to try things out.

    I'm not sure if this will work (my knowledge of Mac development is pretty limited), but it's worth a try. I noticed there seems to be some software out there that will convert .DLL files into a .LIB format. You could try that and see if it will load in SketchUp.
     
  14. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Yeah, I can try that out no problem. Will you be converting the DLL's?
     
  15. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I will try converting it in a few hours.

    If that doesn't work, it may be possible to make a few tweaks and omit the converter from the Mac version altogether. That file converts textures into TGA files since some of the other engines PlayUp exports to require it. If Unity can read JPGs, GIFs, and PNGs, it may not be necessary to use the converter.

    But before I start branching code, let's see if the LIB file will work.
     
  16. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
  17. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
  18. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Did it work?
     
  19. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Oh sorry, I didn't see that message when I last posted :S no idea how I missed that. I'll try it
     
  20. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    still no luck, it keeps coming up with an error about playup.rb on startup.
     
  21. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Strange... since that file isn't even calling Playup_convert. Can you cut and paste the error message?
     
  22. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    yeah

    Code (csharp):
    1. Error Loading File /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/PlayUp/PlayUp.rb
    2. (eval):1744:in `require': no such file to load -- PlayUp/PlayUp_Convert
     
  23. TheLorax

    TheLorax

    Joined:
    Mar 25, 2007
    Posts:
    86
    Is there any movement on the Mac version of this plugin?

    Thanks

    TheLorax
     
  24. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    There is a new version available (posted today) that now supports exporting nested components and groups from SketchUp to Unity 3D.

    Check it out at www.playuptools.com.

    As for the Mac version, that is next on my list. And since I don't actually own a Mac, I will be depending on the Mac users on this forum for feedback. ;)
     
  25. mortalhuman

    mortalhuman

    Joined:
    Dec 23, 2009
    Posts:
    40
    someone please show me a game ready model wireframe from sketchup...


    when you do that, I will say one of two things:

    1: "there is a model that took entirely too long to make to proper game-ready quality."

    or

    2: "That is not a game ready model and would get you fired."

    This tool is not for games, you can't make real meshes in it unless you spend 10x as long. It's not economic. The "ease" of use just removes quality and makes the time needed too long to be productive unless you don't do professional work.

    my 2 cents. Gmax is 100x better.
     
  26. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Considering how many game designers (working on AAA titles) I've met who use SketchUp, I respectfully disagree with your assertion that it is not a tool for game development.

    For example, Lionhead Studios used SketchUp for Fable 2 during their level design process:
    http://www.siliconera.com/2006/08/1...onhead-to-assist-making-the-world-of-fable-2/

    It's not a tool I would suggest for character animation/wireframe modeling (can't do animation in SketchUp anyway), but it has its place. Not to mention, it's fast. I've seen people kick out models and prototype levels quite quickly in it.

    But hey, you do whatever works for you. Not everyone is going for high realism. Some people want to focus on creating good game play rather than spending a ton of time modeling.
     
  27. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    I use Sketchup for it's ease of use. Lots of people think it's this crappy basic 3d app for beginners. But all the toolbars that are turned off by default, open up many more advanced features to use. I tried Gmax once and it's pretty good. But i'm soo used to the way that sketchup models now, I can't use anything else. I saw in a lionhead video that they used sketchup for prototype levels :p. pretty cool knowing that a game studio uses it.
     
  28. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    just gave it a try on mac, and i do get some problems, firstly i get this error

    Code (csharp):
    1. Error:  Failed to load wxRuby.
    2.  
    3. This error usually occurs if you are missing any of the required DLL files:  gdiplus.dll, msvcp71.dll, or msvcr71.dll
    4.  
    5. These DLLs are free downloads from multiple websites.  After downloading, put the files in your Windows system directory and try to start wxSU again.
    then the preferences window wont open, the export level option doesnt work either. The other export one does though, but i dont know where that exported to XD.
     
  29. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Hm... I was afraid of that. Can't use wxSU for the interface then. The errors are just associated with your preferences menu but it sounds like the exporter itself is working-- you just need a way to specify where it goes.

    Well I did have an older interface that doesn't use wxSU. I'll dig it up and let you know.
     
  30. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Ah cool, thanks. :).
     
  31. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    Stupid question... but hopefully someone can field it for me...

    I installed PlayUP and have built a small test scene in Sketchup...

    The problem is.. when I try to export, the only thing that gets exported is the little man billboard model that Sketchup throws into scenes. If I remove him and export again, nothing is exported.

    Does PlayUP not work on created geometry? Or am I just doing something horribly wrong?

    Thanks in advance.
     
  32. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
  33. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    Thanks for the fast reply.

    I haven't created any components I don't think... I have just quickly sketched up a few squares and arranged them into some mini-level.

    I've tried exporting after hitting ctrl+a (to highlight everything) and also after having selected nothing... both produce the same thing.... a dialogue saying that the export is done and that 0 models were processed.

    Do I have to do something special to what I've drawn up in Sketchup before it recognizes it as a model?
     
  34. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    I dont think so. I havent really used this app much as i have UU3D. You could always try and make the level a component, and see if that helps.
     
  35. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    And that did the trick, I had to make a component out of it. Thanks a bunch! You just saved all of that work I did haha.
     
  36. richardsimpo123456

    richardsimpo123456

    Joined:
    Oct 13, 2009
    Posts:
    33
    Glad to help! :D
     
  37. Bantis

    Bantis

    Joined:
    Jul 1, 2010
    Posts:
    20
    Hey Nintari - first off, amazing job. PlayUp is a life saver and works pretty much perfectly. I've only run into one issue that's easy enough to work around, but I'm not exactly sure where the point of failure is.

    I create a 6ft x 6ft cube in Sketchup, which matches the height of a character I already have imported and functioning in engine. The character is definitely the correct scale.

    However, when I import said 6ft cube, the scale is completely off. I actually have to adjust the scale in unity to be .03 - this gets things JUST about right, but its not a perfect science.

    I was wondering if you've seen any issues where Sketchup's scale isn't being reflected in Unity with Playup?
     
  38. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Free floating geometry that's not within any group/component doesn't get processed, although I suppose I should handle that case as you've demonstrated how someone might think it doesn't work by not realizing you need it. Issue noted.

    I have not noticed the issue you're describing. Are you exporting the character and the character box at the same time in the same level? Within the same component/group or separately?
     
  39. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Keep in mind that scale is either translated from within a group/component or is applied to a group or component from a level file. So if you are scaling in such a way where it's updating the level file, and you are not using the level file to bring your box into your scene, I can see how you might have varying scale issues from just using the assets.

    PS - If you open the level file with notepad, you can see the scale modifier that was generated when you exported.
     
  40. dagbud

    dagbud

    Joined:
    Nov 10, 2009
    Posts:
    22
    This is a really great tool that has wonderful potential. I am running into a similar problem with the scaling of my objects when exporting though.

    The Sketchup Ruby APIs default units are in inches. Unity is loading the data as meters. Therefore a 1m cube is exported as a 39.370079m cube. You would need to perform the conversion when saving the file so the proper scale is exported. The ruby API has a Numeric class which should prove very useful for these conversions.

    In order to get the correct scale in Unity, set your scale factor for each object imported to 0.0254 which should correctly scale the objects.

    Thanks for a wonderful tool and I am looking forward for more updates.
     
  41. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Thanks for the input. I'll take a look at it.
     
  42. afalk

    afalk

    Joined:
    Jun 21, 2010
    Posts:
    164
    I've given these tools a try - and WOW -- nice work! Biggest issue I've experienced is in exporting a SU made room - flat poly, etched in the walls, raised them, up and exported the level (grouped of course). Over in Unity the floor surfaces are backwards and unavailable. Best results I've had are to 'carve' my room geometry instead. IE create a full box, inset and push down your floor from the top to reveal your walls.

    The other method would be a lot more exact - any idea on why that's not working?
     
  43. dagbud

    dagbud

    Joined:
    Nov 10, 2009
    Posts:
    22
    My first thought would be to make sure your polys are facing the proper direction. If you are using the default template without changing the styles, front faces should be an off white color while back faces should have a bluish tint in SU.

    As a test, select the derelict polys in SU, context click, and select Reverse Faces. Then export your model and see if that changes things.
     
  44. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    There is a style that PlayUp installs (it adds a button to your top bar for it) that will show dark gray for forward-facing faces (say that 3 times fast) and bright green for backwards-facing ones. It's very helpful in ensuring that your faces are in the right direction.

    Click once to show it and again to return to your previous style.
     
  45. afalk

    afalk

    Joined:
    Jun 21, 2010
    Posts:
    164
    I'll look into those styles! Thanks for the tip - hopefully that'll prove to be what the issue was. Still in love with the PlayUP tools regardless.
     
  46. Pixero

    Pixero

    Joined:
    Dec 10, 2009
    Posts:
    130
  47. afalk

    afalk

    Joined:
    Jun 21, 2010
    Posts:
    164
    Your tips worked great ! THANKS! Very VERY cool tool - looking forward to seeing updates for this! Best thing to add for sake of sanity would be to use the saved file name as your level name instead of having a level always come in as _0 :D
     
  48. dagbud

    dagbud

    Joined:
    Nov 10, 2009
    Posts:
    22
    I had this same thought. I recently discovered that when you are exporting groups and components, groups are exported as groupname_0.dae while components are done as componentname.dae. Note: unnamed groups are saved as _0.dae, so make sure to name your groups.

    So instead of using groups for my object geometry I make components and problem solved. Cheers.
     
  49. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    That post is old. The new version of wxSU bundled with PlayUp fixed that problem.

    EDIT: Errr... actually that post isn't that old. That's strange, I contacted the people who worked on wxSU about the problem, and they did fix their code a while back. I tested it with PlayUp and LightUp and it was working just fine, so I started packaging the later version of wxSU with PlayUp.

    It's possible that Thea Renderer is installing the older version of wxSU still, because that problem should no longer exist. It worked fine for me in both SU6 and SU7 with LightUp and PlayUp installed.
     
  50. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    That's correct. Components are instanced objects, whereas groups with the same name can be different from each other. In SketchUp, you cannot have two different components with the same name. So exporting as componentname.dae works fine. But with groups, you can. So if I didn't add the _#.dae at the end of a group name that gets exported, and if you named two groups with the same name, one would write over the other on export.

    That is why I did it this way.