Sketchup exporter for Ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Sketchup exporter for Ogre

Post by Kojack » Sun May 14, 2006 7:51 am

Yes, it's download time. I've finished as much as I can be bothered doing for Version 1.0.0. :)

Sketchup Ogre Exporter Version 1.0.0 (edit: link is stuffing up)
Sketchup Ogre Exporter Version 1.0.0 alt link

Edit 13/06/06: Sketchup Ogre Exporter Version 1.0.1


All standard materials should be working now. Every model I throw at it comes out fine in Ogre (except for missing backfaces of course).

There's still more stuff to add, like dotScene support and visible edges, but that will come later. Unfortunately, configuration is via a text file for now. Remember to edit it before trying to export!

Remember, the free version of Sketchup is for non commercial use only. This exporter isn't tested with the Pro version, but I'm guessing it will work.

The exporter has a readme which explains installation and usage.

Enjoy. :)
Last edited by Kojack on Mon Jun 12, 2006 4:38 am, edited 2 times in total.
0 x

User avatar
Wretched_Wyx
Orc
Posts: 498
Joined: Thu Mar 16, 2006 5:27 pm
Contact:

Post by Wretched_Wyx » Sun May 14, 2006 8:35 am

Awesome! Thanks Kojack! I'll let you know if I run into any problems.
0 x

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Post by steven » Sun May 14, 2006 10:20 am

Thanks for this excellent work!

But I am not able to download !!
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Sun May 14, 2006 3:09 pm

Hmm, maybe you tried to get it at a bad time. It's only 16KB, but free web hosts usually suck. :)
0 x

User avatar
d3th_n1gG4
Gnome
Posts: 346
Joined: Thu May 19, 2005 10:32 am
Location: Durban, South Africa, No London, wait, where?
Contact:

Post by d3th_n1gG4 » Sun May 14, 2006 3:16 pm

yep getting a 404 as well
0 x
The cow it goes: "Shjazooo!"

User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS » Sun May 14, 2006 3:16 pm

same here
0 x
Image

User avatar
danharibo
Minaton
Posts: 997
Joined: Sat Feb 25, 2006 8:14 pm
Location: Wales, United Kingdom
Contact:

Post by danharibo » Sun May 14, 2006 3:20 pm

NOOOOOOOOOO 404!
0 x

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder » Sun May 14, 2006 3:51 pm

if its that small why dont you just add it to the wiki :) or i would be willing to host it on my website if not. just email it me if you want to.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Sun May 14, 2006 4:21 pm

Freaky. I can download it fine with a system which has never been to that site before, and I've used that host to give files on my forum for 2 years.

Oh well. Let's try again.

Here's another link

Now to get back to reinstalling windows... (only got firefox and kerio on, got so much to install)
0 x

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder » Sun May 14, 2006 10:31 pm

works fine for me now, shame we didnt have this a while ago. it would have been very useful as i am useless with modelling programs.

ive also just reinstalled windows too :), i hate installing everything. i even have to install two copies of VS as source sdk will only run on VS 2003 :(
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Wed May 17, 2006 4:21 am

Last night I was going to add edge exporting (a lot of sketchup models use the visible edges to add detail to models instead of textures).

But I discovered that ogre's xml mesh format doesn't support line lists, line strips or point lists. So there's no easy way to do it, unless I either:
- patch the xml converter to accept them
- export thin boxes or cylinders (so the edge can be seen as the same thickness from any angle)

I think the next feature for the exporter will be dotscene exporting (groups and components will form scene nodes and entities, instead of the entire Sketchup scene being turned into a single mesh). Of course that will just be an option, the current export style will be kept too.

Now that I've got xp reinstalled and running well, I need to install xp 64 and linux. I've got both visual studios too. :)
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Wed May 17, 2006 4:37 am

Just a thought - but how hard would it be to export to a collada file format?

It seems to me that being able to bring the asset into other 3d apps would be cool.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Wed May 17, 2006 5:32 am

It shouldn't be hard. Collada is a bit more complicated than ogre's xml format, but not too different.

I'll probably give it a try when I get time.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Wed May 17, 2006 6:44 am

Kojack wrote:It shouldn't be hard. Collada is a bit more complicated than ogre's xml format, but not too different.

I'll probably give it a try when I get time.
Thanks for considering it. I guess I could do it given time but it's unchartered territory for me. Actually both ruby and import/export are :o
0 x

ggunhouse
Kobold
Posts: 28
Joined: Tue May 17, 2005 2:10 pm
Location: Atlanta, Georgia
Contact:

Post by ggunhouse » Thu May 18, 2006 2:56 am

Great work, Kojack. I used your exporter to convert one of the Sketchup sample buildings (the Craftsman House) to an OGRE mesh, and then incorporated the mesh into a Blink3d environment. Here's a screenshot:

Image

You can perhaps just make out a problem with the windows, which appear in front of everything, instead of appearing behind overlapping objects (like the porch columns). I manually edited the material file to turn depth_check on, which corrected the problem. Because of the backface issue, which you note, views through the transparent windows to the interior of the house go all the way to the horizon, as the walls are invisible from the inside. Aside from that, the export worked great. Thanks, again.
0 x
Glenn

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Thu May 18, 2006 4:18 am

Cool. :)

All the models I tested had no transparent objects objects occluded by non transparents due to backface removal, so I didn't notice the material bug. I'll fix it in Version 1.0.1.
0 x

ggunhouse
Kobold
Posts: 28
Joined: Tue May 17, 2005 2:10 pm
Location: Atlanta, Georgia
Contact:

Post by ggunhouse » Thu May 18, 2006 3:14 pm

I've made another test using one of the free, shared models in the Google/Sketchup 3D Warehouse (http://sketchup.google.com/3dwarehouse/ ... c553ce5e84):

Here is the model viewed in Sketchup:

Image

and here is the exported OGRE mesh viewed in Blink:

Image

You'll notice that the texture on one side of the tower did not make it through the export process. The faces of the tower are textured as a group, and that group is inside the larger group that encompasses the whole church, if that helps. Let me know what other info you might need to figure out what's going on here.
0 x
Glenn

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Thu May 18, 2006 5:53 pm

Hmm, freaky.
I've got the model loaded and I'm examining the data (the ruby console is handy)...

The face with the missing texture has no texture assigned to the front (it's nil). Normally a nil material will appear as the default material. But it seems that groups can be assigned materials too. A material assigned to a group will override the default material of all children of the group. In the case of the church, both the church group and the tower group have Material5, so any faces with no material show up as Material 5 too.

It shouldn't be hard to fix.
0 x

stuartf
Gnoblar
Posts: 13
Joined: Thu Aug 04, 2005 8:12 pm

Post by stuartf » Sun May 21, 2006 12:41 pm

Hi Kojack

Your sketchup exporter is brill - thanks - using like glenn to convert to Blink.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Mon May 22, 2006 9:21 pm

I tested a file on Google's 3d site and it worked well. One problem was that a window made it possible to see all the way through the object. The inside wall did not show. I will look for the file again if needed.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Tue May 23, 2006 1:14 am

Yep, that's to be expected. A lot of sketchup models on the net use backfaces, which the exporter doesn't handle yet. So most models with transparent bits will look wrong.



I've got a fix for the church model, but I've been busy and haven't released it yet. I'll try to get it out tonight. It turns out that not only do faces with no materials inherit from their parent, but their uv coords are different. A normal face has uv coords of around 0-1 (or more, for tiled textures), but faces with an inherited material return the absolute world coordinates of the vertices in inches as the uv coords. Luckily, I can ask textures what their size is in inches, and use that to calculate the real uv coords.
0 x

User avatar
jmonw
Goblin
Posts: 232
Joined: Sat Apr 23, 2005 3:21 am
Location: Atlanta, GA

Post by jmonw » Tue May 23, 2006 2:19 am

Just for reference: the exporter works in the pro version (at least up to version 5.0.232 - don't know what the newest is)

Thanks very much for the great work!
0 x

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 2

Post by syedhs » Sat May 27, 2006 7:11 am

@Kojack,

When can we get your updated plugin? Nothing urgent.. I am still not testing it.. but sounds wonderful.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Thu Jun 08, 2006 11:34 pm

Ok, I'm really late to this party.

I love the idea of this. A quick and easy modeller for 'normal' people ;) Hell, I might even be able to make something that doesn't look like a dogs arse in it (assuming I wasn't trying to model a dogs arse of course, in which case it would look like a yak's intestine).

I'm sure we could find space in ogreaddons for this, you game?
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Post by Kojack » Mon Jun 12, 2006 4:46 am

Damn work always getting in the way. :(

Here's Sketchup Ogre Exporter Version 1.0.1

The material problems with the church above should be fixed.

I've got some ideas for more features and better configuration. I'll try them out when I get free time.

I certainly wouldn't have any objections to the exporter being in ogreaddons. :)
0 x

Post Reply