Sketchup exporter for Ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
ethankennerly
Gnoblar
Posts: 20
Joined: Tue May 29, 2007 8:45 pm
Location: Los Angeles, USA

SketchUp dotScene exporter works for Z-up, how about Y-up?

Post by ethankennerly » Sun Oct 19, 2008 7:55 pm

In my post above, I was wrong about SketchUp's transformation matrix. SketchUp matrix uses column-major, right-handed coordinates, Z-up.

Now, I've passed test cases in which scene and meshes have their up vectors aligned with the Z axis. I passed tests of translation, rotation, and scale on X, Y, Z axes. Here is the script:
http://motorola.usc.edu/svn/runesinger/tool/dotscene.rb

However Y is the conventional axis for Ogre; so I tried to convert Z up transformation to Y up. I tried a couple of techniques:

A) Swap translation only: x, y, z = x, z, -y
B) Rotate the matrix -90 about X only.
C) A and B.

The resulting mesh and nodes in Ogre renders rotated as if off-axis (apart from the desired rotation of the scene).

How can I convert Z-up scene (with Z-up meshes) to a Y-up scene (with Y-up meshes)?
0 x

jokoon
Goblin
Posts: 203
Joined: Sun Aug 23, 2009 8:30 am

Re: Sketchup exporter for Ogre

Post by jokoon » Sat Mar 26, 2011 10:33 pm

Hello back, almost 3 years later...
I'm exporting some counter strike's de_dust2 remake from the 3D warehouse with your script, and I was wondering: can it split it in several .mesh ?
0 x

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

Re: Sketchup exporter for Ogre

Post by Kojack » Sun Mar 27, 2011 7:45 am

At the moment it doesn't do multiple meshes from an entire scene automatically. But you can select different areas of the map and export them manually.
0 x

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Fri May 06, 2011 12:14 am

Hi!

since the sketchup expoter was not enough "user friendly" for a lot of users, I tried to simplified it a little.
so I made some little changes in the code and manage a simple dot scene format.
when exporting the mesh a file dialog box ask for the file path
The setup install Ogre 1.8 xml mesh converter in the sketchup directory to avoid manual modifications in the config file

# 1.3.0b0 - 110505
# - Update with Sketchup 8
# - Added dialog box for file destination
# - Added simple scene format for the exported mesh
# - change material colors for better result in ogre

download : https://arkeon.dyndns.org/svn-scol/trun ... etchup.exe
sources : https://arkeon.dyndns.org/svn-scol/trun ... rter/files
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

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

Re: Sketchup exporter for Ogre

Post by Kojack » Sat May 14, 2011 3:40 am

The setup install Ogre 1.8 xml mesh converter in the sketchup directory to avoid manual modifications in the config file
Actually manual modifications to the config file were removed in 2008 when I released the redesigned 1.1 version of the exporter which has a html based configuration screen with buttons for common scales, multiple paths, check boxes for turning on/off exporting of different data (textures, materials, etc) and allowing front faces, back faces or both to be exported.
(Being able to export both front and back faces was particularly handy, since so many sketchup models are made with back faces as important geometry)
0 x

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Sat May 14, 2011 5:14 pm

argg ^^

I didn't took the good version :/
one 1.2 was available elsewhere but without your last modifications!

same player try again ... :)
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

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

Re: Sketchup exporter for Ogre

Post by Kojack » Sun May 15, 2011 7:18 am

Yeah, the version numbers get a bit strange. I made 1.0, which was my first ever ruby script, I'd never even seen sketchup before, and it was a bit of a mess. The 1.2 was by someone else based on my 1.0 (pretty good job, fixing all my crap), while I scrapped all my old code and made a new module based (so it doesn't pollute the ruby global space) exporter called 1.1 with a simple gui. There's been a few updates people have made based on 1.0 instead of 1.1, maybe I didn't advertise it enough? :)

Thanks for the update. The file requester is a lot better than the little name dialog used in the 1.0 and 1.2 versions, and a real installer is much better than my releases. :)

(Damn, looking at the thread start... I wrote this thing 5 years ago? I really need to get back to work on the next version!)

(oh yeah, openspace3d looks groovy)
0 x

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Sun Jun 05, 2011 8:40 pm

Hi !

so I add my changes in your 1.1 version :)
I still use a dialog box to select the project folder since an input file type in html return c:\fakedir\ ^^
I also change the aplha detection in material, it usually est alpha because of a tga file but without transparency.

I'll try to work on multi mesh export when I'll have some time, tell me if you planned to work on it

https://arkeon.dyndns.org/svn-scol/trun ... etchup.exe
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Wed Jun 08, 2011 12:12 am

Hi ^^

I worked on the export for multi mesh generation and dot scene
Now the mesh are generated by components or groups and models if you check the "merge components" option

https://arkeon.dyndns.org/svn-scol/trun ... etchup.exe
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

bigstink
Gnoblar
Posts: 1
Joined: Mon Jun 13, 2011 7:24 pm

Re: Sketchup exporter for Ogre

Post by bigstink » Mon Jun 13, 2011 9:10 pm

Excellent work guys! Thank you for your contribution :D
0 x

JonnyJP
Goblin
Posts: 231
Joined: Sun Nov 01, 2009 4:23 pm

Re: Sketchup exporter for Ogre

Post by JonnyJP » Tue Jul 12, 2011 2:06 pm

Hi.
First off, great work on the Sketchup exporter. It's really useful, particularly as it is very easy to create models in Sketchup so I can have basic models in my applications without waiting for someone to create the final models for me.

I just have a couple of questions...

1) One of our models has lines in SKetchup on certain edges but when the mesh is imported these lines aren't displayed. Is there any way to enable this without having to draw thick lines in Sketchup? For example, a NESW compass that has major and minor integrals for NE, SW, SSE etc.

2) The Ogre command line tools seem pretty useful. Has anyone bolted a UI onto them yet? When I was exporting models in the past the command line option was quite tedious (although I did create a batch file). This might make things easier for some people so I was thinking of developing a rough version and releasing it to the community (but obviously, I don't want to do that if it already exists!).

Cheers

JP
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Sketchup exporter for Ogre

Post by spacegaier » Tue Jul 12, 2011 2:11 pm

2) The only thing I am aware of is this: http://www.ogre3d.org/tikiwiki/Joof
It is heavily outdated though. I once tried to contact the author to ask for the source to extend/maintane it but never got an answer. But creating something new from scratch should be a piece of cake.

PS: You know that you can just drop your files on the OgreXMLConverter and it will automatically convert it?
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Tue Jul 12, 2011 2:15 pm

Hi,

1 / if you are talking about sketchup visible edges, this is not implemented in the exporter but it could :)
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

JonnyJP
Goblin
Posts: 231
Joined: Sun Nov 01, 2009 4:23 pm

Re: Sketchup exporter for Ogre

Post by JonnyJP » Tue Jul 12, 2011 2:24 pm

Cheers, I think those are the edges I'm after.

How difficult would it be to adjust the ruby scripts to do this? Is it quite complicated?

JP
0 x

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Tue Jul 12, 2011 3:08 pm

I'm not sure if this is you are looking for, but look at http://code.google.com/intl/fr-FR/apis/ ... /edge.html
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

JonnyJP
Goblin
Posts: 231
Joined: Sun Nov 01, 2009 4:23 pm

Re: Sketchup exporter for Ogre

Post by JonnyJP » Tue Jul 12, 2011 3:26 pm

I think that's it, thanks a lot.

I don't know how to dump it in the mesh.xml file but I'll give it a go, thanks.

If I (or someone else) gets this working then maybe it should go in the next release as a config option?
0 x

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Tue Jul 12, 2011 3:29 pm

Sure, tell me if you get it work, i could update it in the setup too.
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

JonnyJP
Goblin
Posts: 231
Joined: Sun Nov 01, 2009 4:23 pm

Re: Sketchup exporter for Ogre

Post by JonnyJP » Tue Jul 12, 2011 3:56 pm

I'll try and find some time in the next couple of weeks.
0 x

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

Re: Sketchup exporter for Ogre

Post by Kojack » Fri Jul 15, 2011 7:33 pm

One of our models has lines in SKetchup on certain edges but when the mesh is imported these lines aren't displayed. Is there any way to enable this without having to draw thick lines in Sketchup? For example, a NESW compass that has major and minor integrals for NE, SW, SSE etc.
While Ogre supports line rendering, the Ogre mesh format doesn't. Only triangles can be exported.
0 x

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1668
Joined: Mon Jan 21, 2008 10:26 pm

Re: Sketchup exporter for Ogre

Post by madmarx » Fri Jul 15, 2011 7:36 pm

I was able to make some line export (but not with sketchup) using materials, and not meshes (as pointed out by kojack).
Hope this helps,
Pierre
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

arkeon
Goblin
Posts: 269
Joined: Fri Dec 04, 2009 6:02 pm
x 1

Re: Sketchup exporter for Ogre

Post by arkeon » Wed Sep 28, 2011 2:35 pm

Hello,

I made some corrections on the exporter for bad node position with some sketchup scenes, now it also export only visible layers and components

V 1.3.4
http://www.openspace3d.com/support/download/


About edges, ogreMax export splines as mesh, I didn't look at it yet, but it could be a good solution
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

Post Reply